Description Usage Arguments Methods (by class) See Also
Make predictions using a model
Generic function for testing a model by making predictions
1 2 3 4 5 6 7 8 9 10 11 12 13 | make_predictions(model, data, test, ...)
## Default S3 method:
make_predictions(model, data, test, ...)
## S3 method for class 'rpart'
make_predictions(model, data, test, ...)
## S3 method for class 'boosting'
make_predictions(model, data, test, ...)
## S3 method for class 'gbm'
make_predictions(model, data, test, ...)
|
model |
A classification or regression model |
data |
The list of train and holdout data sets |
test |
The test being conducted |
... |
Extra arguments to make_predictions |
default
: This function is a simple wrapper to predict
, which it with the trained model and holdout data. Model classes that require extra arguments to predict can do so through a separate implementations or, less desirably, through the extra arguments.
rpart
: Calls predict.rpart with appropriate type: "class" for classifcation problems and "vector" for regression problems. Other problem types are not supported, providing a test with another class throws an error.
boosting
: Calls predict.boosting on the created model
gbm
: Calls predict.gbm on the created model with n.trees
= 100
predict.rpart
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.