create_toolset: Create a set of tools

Description Usage Arguments Value See Also Examples

View source: R/tool_interface.R

Description

The create_toolset function takes names of predefined tools and generates a list of wrapper functions for Precision-Recall curve calculations.

Usage

1
2
3
4
5
6
create_toolset(
  tool_names = NULL,
  set_names = NULL,
  calc_auc = TRUE,
  store_res = TRUE
)

Arguments

tool_names

A character vector to specify the names of performance evaluation tools. The names for the following five tools can be currently used.

  • ROCR

  • AUCCalculator

  • PerfMeas

  • PRROC

  • precrec

set_names

A character vector to specify a predefined set name. Following six sets are currently available.

"def5"

A set of 5 tools with calc_auc = TRUE and store_res = TRUE

"auc5"

A set of 5 tools with calc_auc = TRUE and store_res = FALSE

"crv5"

A set of 5 tools with calc_auc = FALSE and store_res = TRUE

"def4"

A set of 4 tools with calc_auc = TRUE and store_res = TRUE

"auc4"

A set of 4 tools with calc_auc = TRUE and store_res = FALSE

"crv4"

A set of 4 tools with calc_auc = FALSE and store_res = TRUE

calc_auc

A Boolean value to specify whether the AUC score should be calculated.

store_res

A Boolean value to specify whether the calculated curve is retrieved and stored

Value

A list of R6 tool objects.

See Also

run_benchmark and run_evalcurve require the list of the tools generated by this function ToolROCR, ToolAUCCalculator, ToolPerfMeas, ToolPRROC, and Toolprecrec as R6 tool classes.

Examples

1
2
3
4
5
6
7
## Create ROCR and precrec
toolset1 <- create_toolset(c("ROCR", "precrec"))
toolset1

## Create auc5 tools
toolset2 <- create_toolset(set_names = "auc5")
toolset2

prcbench documentation built on April 7, 2021, 5:10 p.m.