`predict_caret`, `predict_tidymodels`, and `predict_h2o` are wrappers for making predictions from a model using caret, tidymodels, and h2o backends, respectively. These wrapper functions provide uniformity of input arguments to easily switch between the different modeling packages (see `predict_models()`).

predict_caret(fit, Xtest, ...)

predict_h2o(fit, Xtest, ...)

predict_tidymodels(fit, Xtest, ...)

Arguments

fit

Model fit. Typically the output of `fit_caret()`, `fit_h2o()`, or `fit_tidymodels()`.

Xtest

Data matrix or data frame on which to make predictions.

...

Additional arguments to pass to `predict.train()` in `fit_caret()`, `h2o.predict()` in `fit_h2o()`, or `predict.workflow()` in `fit_tidymodels()`.

Value

A tibble with the following columns:

predictions

Raw predicted value (e.g., the predicted class in a classification problem and the predicted continuous value in a regression problem.)

prob_predictions

In a classification problem, this is a tibble with the predicted probabilities for each class. This column is omitted for regression problems.

See also

Other predict_models_family: predict_models()