R/loss_functions.R
risk_functions.Rd
Factory function for estimating an ROCR-based risk for a given ROCR measure, and the risk is defined as one minus the performance measure.
custom_ROCR_risk(measure, cutoff = 0.5, name = NULL, ...)
A character indicating which ROCR
performance measure
to use for evaluation. The measure
must be either cutoff-dependent
so a single value can be selected (e.g., "tpr"), or it's value is a scalar
(e.g., "aucpr"). For more information, see performance
.
A numeric value specifying the cutoff for choosing a single
performance measure from the returned set. Only used for performance
measures that are cutoff-dependent and default is 0.5. See
performance
for more detail.
An optional character string for user to supply their desired
name for the performance measure, which will be used for naming subsequent
risk-related tables and metrics (e.g., cv_risk
column names). When
name
is not supplied, the measure
will be used for naming.
Optional arguments to specific ROCR
performance
measures. See performance
for more detail.
This risk does not take into account weights. In order to use this risk, it must first be instantiated with respect to the ROCR performance measure of interest, and then the user-defined function can be used.