calc_curve: This function takes the elements of the 'activity' column and...

View source: R/eval.R

calc_curveR Documentation

This function takes the elements of the activity column and calculates precision-recall and ROC curves (depending on curve). The activity column is populated with the output for each stat method and results from the run_benchmark() function. Each of the elements in activity are results from runs of the decouple wrapper.

Description

This function takes the elements of the activity column and calculates precision-recall and ROC curves (depending on curve). The activity column is populated with the output for each stat method and results from the run_benchmark() function. Each of the elements in activity are results from runs of the decouple wrapper.

Usage

calc_curve(df, downsampling = FALSE, times = 1000, curve = "ROC", seed = 420)

Arguments

df

run_benchmark roc column provided as input

downsampling

logical flag indicating if the number of Negatives should be downsampled to the number of Positives

times

integer showing the number of downsampling

curve

whether to return a Precision-Recall Curve ("PR") or ROC ("ROC")

seed

An integer to set the RNG state for random number generation. Use NULL for random number generation.

Value

tidy data frame with precision, recall, auc, n, cp, cn and coverage in the case of PR curve; or sensitivity and specificity, auc, n, cp, cn and coverage in the case of ROC.


saezlab/decoupleRBench documentation built on March 20, 2022, 3:02 p.m.