Extract probability predictions from any R model in a standardised format

extract_probabilities(model, X, y_train = NULL, verbose = FALSE)

Arguments

model

Fitted model object (any class)

X

Feature matrix or data.frame for predictions

y_train

Optional training labels used to name output columns

verbose

Print diagnostic information (default: FALSE)

Value

Numeric matrix of shape n_samples x n_classes with column names as class labels. Attributes extraction_method and model_class record how predictions were obtained.