bedroc: Implementation of Boltzmann-enhanced discrimination of...

View source: R/bedroc.R

bedrocR Documentation

Implementation of Boltzmann-enhanced discrimination of receiver operating characteristic (BEDROC)

Description

Calculates a metric often used in virtual screening - BEDROC

Usage

bedroc(data, ...)

## S3 method for class 'data.frame'
bedroc(
  data,
  truth,
  ...,
  alpha = 20,
  estimator = NULL,
  na_rm = TRUE,
  event_level = "first"
)

bedroc_vec(
  truth,
  estimate,
  alpha = 20,
  estimator = NULL,
  event_level = "first",
  na_rm = TRUE
)

Arguments

data

A data.frame containing the truth and estimate columns.

...

A set of unquoted column names or one or more dplyr selector functions to choose which variables contain the class probabilities. If truth is binary, only 1 column should be selected. Otherwise, there should be as many columns as factor levels of truth.

truth

The column identifier for the true class results (that is a factor). This should be an unquoted column name although this argument is passed by expression and supports quasiquotation (you can unquote column names). For _vec() functions, a factor vector.

alpha

The early recognition parameter (defaults to 20 or as in enrichvs::bedroc())

estimator

One of "binary", "hand_till", "macro", or "macro_weighted" to specify the type of averaging to be done. "binary" is only relevant for the two class case. The others are general methods for calculating multiclass metrics. The default will automatically choose "binary" or "hand_till" based on truth.

na_rm

A logical value indicating whether NA values should be stripped before the computation proceeds.

event_level

A single string. Either "first" or "second" to specify which level of truth to consider as the "event". This argument is only applicable when estimator = "binary". The default uses an internal helper that generally defaults to "first", however, if the deprecated global option yardstick.event_first is set, that will be used instead with a warning.

Value

A tibble with columns .metric, .estimator, and .estimate and 1 row of values.

For grouped data frames, the number of rows returned will be the same as the number of groups.

For bedroc_vec(), a single numeric value (or NA).

#' @seealso

ef() for computing the enrichment factor.

References

Truchon J-F, Bayly CI. Evaluating virtual screening methods: good and bad metrics for the “early recognition” problem. J Chem Inf Model. 2007 Mar;47(2):488–508.


zamanianlab/ZamanianLabVSTools documentation built on April 16, 2022, 12:53 a.m.