The create_usrdata function creates various types of test datasets.
create_usrdata(
  test_type,
  scores = NULL,
  labels = NULL,
  tsname = NULL,
  base_x = NULL,
  base_y = NULL,
  text_x = NULL,
  text_y = NULL,
  text_x2 = text_x,
  text_y2 = text_y
)A single string to specify the type of dataset generated by this function.
Create a test dataset for benchmarking
Create a test dataset for curve evaluation
A numeric vector to set scores.
A numeric vector to set labels.
A single string to specify the name of the dataset.
A numeric vector to set pre-calculated recall values for curve evaluation.
A numeric vector to set pre-calculated precision values for curve evaluation.
A single numeric value to set the x position for displaying the test result in a plot
A single numeric value to set the y position for displaying the test result in a plot
A single numeric value to set the x position for displaying the test result (group into categories) in a plot
A single numeric value to set the y position for displaying the test result (group into categories) in a plot
A list of R6 test dataset objects.
create_testset for creating a predefined test set.
 TestDataB for benchmarking test data.
 TestDataC for curve evaluation test data.
## Create a test dataset for benchmarking
testset2 <- create_usrdata("bench",
  scores = c(0.1, 0.2), labels = c(1, 0),
  tsname = "m1"
)
testset2
#> $m1
#> 
#>     === Test dataset for prcbench functions ===
#> 
#>     Testset name:     m1 
#>     # of positives:   1 
#>     # of negatives:   1 
#>     Scores:           0.1 (min) 
#>                       0.15 (mean) 
#>                       0.2 (max) 
#>     Labels:           0 (neg), 1 (pos)
#> 
#> 
## Create a test dataset for curve evaluation
testset <- create_usrdata("curve",
  scores = c(0.1, 0.2), labels = c(1, 0),
  base_x = c(0, 1.0), base_y = c(0, 0.5)
)
testset
#> $usr
#> 
#>     === Test dataset for prcbench functions ===
#> 
#>     Testset name:     usr 
#>     # 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)
#> 
#>