Reputation: 37
How can I use the function adaboost.M1? I am testing the following codes in R. But I always have the error message: Error: could not find function "adaboost.M1". What packages do I miss? Thanks
library(rpart)
library(mlbench)
library(adabag)
data(iris)
names(iris)<-c("LS","AS","LP","AP","Especies")
iris.adaboost <- adaboost.M1(Especies~LS +AS +LP+ AP, data=iris, boos=TRUE, mfinal=10)
Upvotes: 1
Views: 1302
Reputation: 3930
Please try:
iris.adaboost <- boosting(Species~., data=iris, boos=TRUE, mfinal=10)
Seems that in newer versions of adabag package you have to use method boosting.
Upvotes: 2