create_usrdata: Create a user-defined test dataset

View source: R/data_interface.R

create_usrdataR Documentation

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,
  text_x2 = text_x,
  text_y2 = text_y
)

Arguments

test_type

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

"bench"

Create a test dataset for benchmarking

"curve"

Create a test dataset for curve evaluation

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

text_x2

A single numeric value to set the x position for displaying the test result (group into categories) in a plot

text_y2

A single numeric value to set the y position for displaying the test result (group into categories) 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

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

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


prcbench documentation built on March 31, 2023, 5:27 p.m.