colaccs: Many binary classification metrics

View source: R/col_binary_metrics.R

Many binary classification metricsR Documentation

Many binary classification metrics

Description

Many binary classification metrics.

Usage

colaccs(group, preds)
colsens(group, preds)
colspecs(group, preds)
colprecs(group, preds)
colfscores(group, preds)
colfbscores(group, preds, b)
colfmis(group, preds)

Arguments

group

A numerical vector with two values, 0 and 1.

preds

A numerical matrix with scores, probabilities or any other measure.

b

The \beta parameter in the F_{\beta}-score.

Details

The accuracies, sensitivities, specificities, precisions, F-scores, F_{\beta}-scores and the Fowlkes-Mallows index are calculated column-wise. The colaccs is the only metric that can be used with a multinomial response as well.

Value

A vector with length equal to the number of columns of the "preds" argument containing the relevant values computed for each column.

Author(s)

Michail Tsagris.

R implementation and documentation: Michail Tsagris mtsagris@uoc.gr.

References

https://en.wikipedia.org/wiki/Sensitivity_and_specificity

https://en.wikipedia.org/wiki/Precision_and_recall

See Also

colmses, bernoulli.nb, bigknn.cv

Examples

## 20 variables, hence 20 accuracies will be calculated
ina <- rbinom(100, 1, 0.6)
x <- matrix( rnorm(100 * 20), ncol = 20 )
a <- colaccs(ina, x)

Rfast2 documentation built on Aug. 8, 2023, 1:11 a.m.