R6
class of test dataset for Precision-Recall curve evaluation.
An R6
class object.
TestDataC
is a class that contains scores and label for performance
evaluation tools. It provides necessary methods for curve evaluation.
create_testset
for creating a list of test datasets.
It is derived from TestDataB
.
prcbench::TestDataB
-> TestDataC
## Initialize with scores, labels, and a dataset name
testset <- TestDataC$new(c(0.1, 0.2), c(1, 0), "c4")
testset
#>
#> === Test dataset for prcbench functions ===
#>
#> Testset name: c4
#> # of positives: 1
#> # of negatives: 1
#> Scores: 0.1 (min)
#> 0.15 (mean)
#> 0.2 (max)
#> Labels: 0 (neg), 1 (pos)
#> Pre-calculated: Yes
#> # of base points: 1
#> Text position: (0.75, 0.25)
#> Text position2: (0.75, 0.25)
#>
## Set base points
testset$set_basepoints_x(c(0.13, 0.2))
testset$set_basepoints_y(c(0.5, 0.6))
testset
#>
#> === Test dataset for prcbench functions ===
#>
#> Testset name: c4
#> # of positives: 1
#> # of negatives: 1
#> Scores: 0.1 (min)
#> 0.15 (mean)
#> 0.2 (max)
#> Labels: 0 (neg), 1 (pos)
#> Pre-calculated: Yes
#> # of base points: 2
#> Text position: (0.75, 0.25)
#> Text position2: (0.75, 0.25)
#>