Description Usage Arguments Details
View source: R/predict-train-test.R
Make predictions using in train
and test
data using a model
. The model
object must have a S3 predict method. In other words, there should be a predict.class
for whatever class the model is. To check the class of a model run class model_obj
. Also, check methods('predict')
to check if your model class is supported as a S3 predict method.
1 | pred_train_test(model, train, test, type = "response")
|
model |
Model object |
train |
Training data |
test |
Testing data |
type |
Type of prediction; passed to |
Both training and testing must contian all the predictors used in the model. Predictor names must be a full match.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.