View source: R/predict_model.R
| predict.classbound | R Documentation |
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().
## S3 method for class 'classbound'
predict(object, newdata, predict_args = list(), predfun = NULL, ...)
## S3 method for class 'classbound_multi'
predict(object, newdata, predict_args = list(), predfun = NULL, ...)
object |
A fitted classbound model. This is the object returned by |
newdata |
A data frame of new observations to predict on. |
predict_args |
A named list of additional arguments passed to |
predfun |
A custom function to generate predictions for non-standard models.
The function must accept at least two arguments: |
... |
Additional arguments passed to the specific model adapter. |
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.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.