R6 class of test data set for performance evaluation tools.

Format

An R6 class object.

Details

TestDataB is a class that contains scores and label for performance evaluation tools. It provides necessary methods for benchmarking.

See also

create_testset for creating a list of test datasets. TestDataC is derived from this class for curve evaluation.

Methods


Method new()

Default class initialization method.

Usage

TestDataB$new(scores = NULL, labels = NULL, tsname = NA)

Arguments

scores

A vector of scores.

labels

A vector of labels.

tsname

A dataset name.


Method get_tsname()

Get the dataset name.

Usage

TestDataB$get_tsname()


Method get_scores()

Get a vector of scores.

Usage

TestDataB$get_scores()


Method get_labels()

Get a vector of labels.

Usage

TestDataB$get_labels()


Method get_fg()

Get a vector of positive scores.

Usage

TestDataB$get_fg()


Method get_bg()

Get a vector of negative scores.

Usage

TestDataB$get_bg()


Method get_fname()

Get a file name that contains scores and labels.

Usage

TestDataB$get_fname()


Method del_file()

Delete the file with scores and labels.

Usage

TestDataB$del_file()


Method print()

Pretty print of the test dataset.

Usage

TestDataB$print(...)

Arguments

...

Not used.


Method clone()

The objects of this class are cloneable with this method.

Usage

TestDataB$clone(deep = FALSE)

Arguments

deep

Whether to make a deep clone.

Examples

## Initialize with scores, labels, and a dataset name
testset <- TestDataB$new(c(0.1, 0.2, 0.3), c(0, 1, 1), "m1")
testset
#> 
#>     === Test dataset for prcbench functions ===
#> 
#>     Testset name:     m1 
#>     # of positives:   2 
#>     # of negatives:   1 
#>     Scores:           0.1 (min) 
#>                       0.2 (mean) 
#>                       0.3 (max) 
#>     Labels:           0 (neg), 1 (pos)
#>