How the value of mfinal effect in boosting



I am currently trying to use boosting in rpart decision tree algorithm while creating model I came across the attribute name mfinal .I want to know the value of mfinal effect the model.

sub <- c(sample(1:50, 25), sample(51:100, 25), sample(101:150, 25))
iris.adaboost <- boosting(Species ~ ., data=iris[sub,], mfinal=10)
iris.predboosting<- predict.boosting(iris.adaboost, newdata=iris[-sub,])

here I have used the value of mfinal as 10 as default for creating the model


hello @harry,

The help for this function under ‘adabag’ package shows:

an integer, the number of iterations for which boosting is run or the number of trees to use. Defaults to mfinal=100 iterations.

So you can say that mfinal is the number of times your boosting will run before finding an optimal model.In case of decision trees it can also mean the number of tree generated.So if you type `iris.adaboost$trees you will see that there are 10 trees whereas for mfinal = 15 there will be 15 trees.