Generates predictions using a unified interface across all classifiers.
Dispatches natively on objects of class "classbound". Attempting to call
predict() directly on a "classbound_multi" object will result in an error,
as multi-model boundaries are evaluated internally by boundary_compute().
Arguments
- object
A fitted classbound model. This is the object returned by
fit_model()orclassbound().- newdata
A data frame of new observations to predict on.
- predict_args
A named list of additional arguments passed to
predict_adapter.- predfun
A custom function to generate predictions for non-standard models. The function must accept at least two arguments:
model(the fitted native model) andnewdata(a data frame of new observations). It should return either a vector/factor of predicted classes, or a list containingclass(predicted labels) andprobs(a probability matrix).- ...
Additional arguments passed to the specific model adapter.
Value
A list containing class (a factor of predicted labels) and probs
(a probability matrix, or strictly NULL if the classifier lacks probability support).
Downstream functions like boundary_compute() are designed to handle probs = NULL gracefully.