user1901690
user1901690

Reputation: 37

How to install boosting.m1 package in R?

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

Answers (1)

milos.ai
milos.ai

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

Related Questions