Learn R Programming

prcbench (version 0.3.2)

create_usrdata: Create a user-defined test dataset

Description

The create_usrdata function creates various types of test datasets.

Usage

create_usrdata(test_type, scores = NULL, labels = NULL, tsname = NULL,
  base_x = NULL, base_y = NULL, text_x = NULL, text_y = NULL)

Arguments

test_type
A single string to specify the type of dataset generated by this function.

[object Object],[object Object]

scores
A numeric vector to set scores.
labels
A numeric vector to set labels.
tsname
A single string to specify the name of the dataset.
base_x
A numeric vector to set pre-calculated recall values for curve evaluation.
base_y
A numeric vector to set pre-calculated precision values for curve evaluation.
text_x
A single numeric value to set the x position for displaying the test result in a plot
text_y
A single numeric value to set the y position for displaying the test result in a plot

Value

  • A list of R6 test dataset objects.

See Also

create_testset for creating a predefined test set. TestDataB for benchmarking test data. TestDataC for curve evaluation test data.

Examples

Run this code
## Create a test dataset for benchmarking
testset2 <- create_usrdata("bench", scores = c(0.1, 0.2), labels = c(1, 0),
                           tsname = "m1")

## 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))

Run the code above in your browser using DataLab