How to calculate the performance of boosting model at each iteration?

r
boosting

#1

I am currently solving a problem of classification using boosting model .I have created the bagging model .I want to know how to calculate the performance of the model after each tree iteration .So that I can know what should be the value of mfinal argument.

library(adabag)
 adadata<-iris
head(adadata)
  Sepal.Length Sepal.Width Petal.Length Petal.Width Species
1          5.1         3.5          1.4         0.2  setosa
2          4.9         3.0          1.4         0.2  setosa
3          4.7         3.2          1.3         0.2  setosa
4          4.6         3.1          1.5         0.2  setosa
5          5.0         3.6          1.4         0.2  setosa
6          5.4         3.9          1.7         0.4  setosa
adaboost<-boosting(Species~., data=adadata, boos=TRUE, mfinal=20,coeflearn='Breiman')

As I have created the model with mfinal equals to 20.I want to know the performance of boosting model at each tree.


#2

@harry-
You can check the performance of bagging model at each tree by using the function errorevol
erroreval-show the evolution of error during the boosting process.

errorevol(adaboost,adadata) 

$error
 [1] 0.033333333 0.033333333 0.020000000 0.013333333 0.013333333 0.006666667
 [7] 0.000000000 0.000000000 0.000000000 0.000000000 0.000000000 0.000000000
[13] 0.000000000 0.000000000 0.000000000 0.000000000 0.000000000 0.000000000
[19] 0.000000000 0.000000000

attr(,"class")
[1] "errorevol"

Here it shows that the error is 0.0333 in the classification if the model uses only one tree for classification and error is zero if a number of the tree is 7.

Hope this helps!

Regards,
Hinduja