caret (version 5.05.004)

predict.bagEarth: Predicted values based on bagged Earth and FDA models

Description

Predicted values based on bagged Earth and FDA models

Usage

## S3 method for class 'bagEarth':
predict(object, newdata = NULL, type = "response", ...)
## S3 method for class 'bagFDA':
predict(object, newdata = NULL, type = "class", ...)

Arguments

Value

  • a vector of predictions

See Also

bagEarth

Examples

Run this code
data(trees)
fit1 <- bagEarth(Volume ~ ., data = trees, keepX = TRUE)
fit2 <- bagEarth(Volume ~ ., data = trees, keepX = FALSE)
hist(predict(fit1) - predict(fit2))

Run the code above in your browser using DataCamp Workspace