ef | R Documentation |
Calculates a metric often used in virtual screening - enrichment factor.
ef(data, ...) ## S3 method for class 'data.frame' ef( data, truth, ..., cutoff = 0.01, estimator = NULL, na_rm = TRUE, event_level = "first" ) ef_vec( truth, estimate, cutoff = 0.01, estimator = NULL, event_level = "first", na_rm = TRUE )
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. |
cutoff |
The percent value for enrichment (defaults to 0.01 or 1%) |
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. |
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 ef_vec(), a single numeric value (or NA).
bedroc()
for computing the Boltzmann-enhanced discrimination of ROC and rie()
for computing the Robust Initial Enhancement.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.