Skip to contents

Calculate the phi matrix for stock composition analysis.

Usage

get_phi(predicted_class, true_labels, np)

Arguments

predicted_class

Integer vector of predictions

true_labels

Factor of true labels

np

Number of populations (levels)

Value

Matrix of phi values

Examples

if (FALSE) { # \dontrun{
pred <- c(1, 2, 1, 2)
true <- c(1, 2, 1, 1)
phi_matrix <- get_phi(pred, true, np = 2)
} # }