R/prcbench.R
prcbench.RdThe prcbench package provides four categories of important functions: tool interface, test data interface, benchmarking, and curve evaluation.
The create_toolset function creates a common interface for
seven different tools that calculate Precision-Recall curves. These tools
are ROCR,
AUCCalculator,
PerfMeas,
PRROC,
precrec,
yardstick, and
scikit-learn.
The sklearn tool is calculated by a standalone Python module that is
bundled with prcbench and derived from the scikit-learn source
code. It requires reticulate, a working Python installation and
numpy. Without them it returns a flat dummy curve rather than
raising an error, so the predefined tool sets that contain it stay
usable.
The create_usrtool function helps users to make the same
interface of the predefined ones for their own tools.
The create_testset function creates two different types of test
data sets. The first type is for benchmarking, and the second type is for
curve evaluation.
The create_usrdata function helps users to make their own test
data sets.
The run_benchmark function takes a tool set and a test data set
and run microbenchmark for them.
The timing of the sklearn tool includes the cost of crossing the
R/Python boundary, so it is not comparable with the timings of the tools
written in R.
The run_evalcurve function takes a tool set and a test data set
and evaluates the accuracy of Precision-Recall curves for them.
Useful links: