Learn R Programming

crtests (version 0.2.1)

make_predictions: Make predictions using a model Generic function for testing a model by making predictions

Description

Make predictions using a model Generic function for testing a model by making predictions

Usage

make_predictions(model, data, test, ...)
"make_predictions"(model, data, test, ...)
"make_predictions"(model, data, test, ...)
"make_predictions"(model, data, test, ...)
"make_predictions"(model, data, test, ...)

Arguments

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

Methods (by class)

  • 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

See Also

predict.rpart