Skip to contents

Formula: Se_i = TTP_all/(TTP_all + TFN_i) (eq. 4.10) and Sp_i = TTN_i/(TTN_i + TFP_i) (eq. 4.11).

Usage

Msm008(y_true, y_pred, class_index = 0, n_classes = NULL)

Arguments

y_true

Observed class labels, zero-based.

y_pred

Predicted class labels, zero-based.

class_index

Zero-based index of the focal class.

n_classes

Number of classes; inferred when NULL.

Value

List with estimate, sensitivity, specificity, TFN, TTN, method.

References

Montesinos Lopez, Montesinos Lopez & Crossa (2022), Multivariate Statistical Machine Learning Methods for Genomic Prediction, Springer, eqs. (4.10)-(4.11) p.132. DOI 10.1007/978-3-030-89010-0.

Examples

V <- c(1, 2, 3, 4, 5, 6, 7, 8)
Msm008(V, V)
#> $estimate
#> [1] 1
#> 
#> $sensitivity
#> [1] 1
#> 
#> $specificity
#> [1] 1
#> 
#> $TFN
#> [1] 0
#> 
#> $TTN
#> [1] 8
#> 
#> $method
#> [1] "generalized sensitivity/specificity (MVSML 2022 eq. 4.10-4.11)"
#>