Skip to contents

Formula: P_i = TTP_all / (TTP_all + TFP_i) on a one-versus-all basis (eq. 4.9), with TFP_i = sum_{j != i} n_ji from eq. (4.6).

Usage

Msm007(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, TFP, TTP_all, pCCC, method.

References

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

Examples

V <- c(1, 2, 3, 4, 5, 6, 7, 8)
Msm007(V, V)
#> $estimate
#> [1] 1
#> 
#> $TFP
#> [1] 0
#> 
#> $TTP_all
#> [1] 8
#> 
#> $pCCC
#> [1] 1
#> 
#> $method
#> [1] "generalized precision (MVSML 2022 eq. 4.9)"
#>