predict.adaBoost: predict method for adaboost objects

Description Usage Arguments Value See Also Examples

Description

predictions for model corresponding to adaboost.m1 algorithm makes predictions for an adaboost object on a new dataset and also calculates the error if the target variable is avaiable in the dataset. The target variable is not required for the prediction to work. However, the user must ensure that the test data has the same columns which were used as inputs to fit the original model.

Usage

1
2
## S3 method for class 'adaboost'
predict(object, newdata, ...)

Arguments

object

an object of class adaboost

newdata

dataframe on which we are looking to predict

...

arguments passed to predict.default

Value

predictor predicted object with prediction probabilities

See Also

adaboost

Examples

1
2
3
4
5
fakedata <- data.frame( X=c(rnorm(100,0,1),rnorm(100,1,1)), Y=c(rep(0,100),rep(1,100) ) )
fakedata$Y <- factor(fakedata$Y)
test_adaboost <- adaboost(Y~X, fakedata, 10)
pred <- predict( test_adaboost,newdata=fakedata)
print(pred$error)

souravc83/fastBoost documentation built on May 30, 2019, 6:34 a.m.