library(adabag)
## Loading required package: rpart
## Loading required package: caret
## Loading required package: ggplot2
## Loading required package: lattice
## Loading required package: foreach
## Loading required package: doParallel
## Loading required package: iterators
## Loading required package: parallel
df <- iris
set.seed(1234)
split.index <- sample(1:nrow(df), 100)
df.train <- df[split.index,]
df.test <- df[-split.index,]
ad.iris <- boosting(Species~.,df.train, mfinal = 100, control = rpart.control(maxdepth = 1))
ad.predictions <- predict.boosting(ad.iris, newdata = df.test, newmfinal = 42)
This code snippet performs boosting on the “df.train” dataset using the “Species” variable as the target variable and all other variables as predictors. It then makes predictions on the “df.test” dataset using the fitted boosting model and a “newmfinal” parameter of 42. Here’s a step-by-step explanation of the code:
The first line fits a boosting model to the “df.train” dataset using the “boosting” function from the “adabag” package in R. The “Species~.” syntax specifies that the “Species” variable is the target variable and all other variables in the dataset are predictors. The “mfinal” parameter specifies the maximum number of trees to fit in the boosting model, and is set to 100 in this case. The “control” parameter specifies the control options for the underlying decision tree algorithm, which is specified here as “rpart.control(maxdepth = 1)” to limit the depth of the trees to 1.
The second line makes predictions on the “df.test” dataset using the fitted boosting model and the “predict.boosting” function from the “adabag” package. The “newdata” parameter specifies the new data to make predictions on (in this case, “df.test”), and the “newmfinal” parameter specifies the number of trees to use in the prediction (in this case, 42).
Boosting is an ensemble learning technique that combines multiple weak models (in this case, decision trees with a maximum depth of 1) to form a stronger model that can improve prediction accuracy. The “adabag” package provides a convenient way to perform boosting in R, and the resulting model can be used to make predictions on new data using the “predict.boosting” function.
ad.iris
## $formula
## Species ~ .
##
## $trees
## $trees[[1]]
## n= 100
##
## node), split, n, loss, yval, (yprob)
## * denotes terminal node
##
## 1) root 100 62 versicolor (0.27000000 0.38000000 0.35000000)
## 2) Petal.Length< 4.85 66 29 versicolor (0.40909091 0.56060606 0.03030303) *
## 3) Petal.Length>=4.85 34 1 virginica (0.00000000 0.02941176 0.97058824) *
##
## $trees[[2]]
## n= 100
##
## node), split, n, loss, yval, (yprob)
## * denotes terminal node
##
## 1) root 100 64 setosa (0.3600000 0.3200000 0.3200000)
## 2) Petal.Length< 2.7 36 0 setosa (1.0000000 0.0000000 0.0000000) *
## 3) Petal.Length>=2.7 64 32 versicolor (0.0000000 0.5000000 0.5000000) *
##
## $trees[[3]]
## n= 100
##
## node), split, n, loss, yval, (yprob)
## * denotes terminal node
##
## 1) root 100 58 virginica (0.35000000 0.23000000 0.42000000)
## 2) Petal.Width< 1.55 59 24 setosa (0.59322034 0.38983051 0.01694915) *
## 3) Petal.Width>=1.55 41 0 virginica (0.00000000 0.00000000 1.00000000) *
##
## $trees[[4]]
## n= 100
##
## node), split, n, loss, yval, (yprob)
## * denotes terminal node
##
## 1) root 100 58 versicolor (0.2500000 0.4200000 0.3300000)
## 2) Petal.Length< 2.6 25 0 setosa (1.0000000 0.0000000 0.0000000) *
## 3) Petal.Length>=2.6 75 33 versicolor (0.0000000 0.5600000 0.4400000) *
##
## $trees[[5]]
## n= 100
##
## node), split, n, loss, yval, (yprob)
## * denotes terminal node
##
## 1) root 100 57 virginica (0.20000000 0.37000000 0.43000000)
## 2) Petal.Length< 4.95 58 23 versicolor (0.34482759 0.60344828 0.05172414) *
## 3) Petal.Length>=4.95 42 2 virginica (0.00000000 0.04761905 0.95238095) *
##
## $trees[[6]]
## n= 100
##
## node), split, n, loss, yval, (yprob)
## * denotes terminal node
##
## 1) root 100 53 virginica (0.3400000 0.1900000 0.4700000)
## 2) Petal.Length< 2.7 34 0 setosa (1.0000000 0.0000000 0.0000000) *
## 3) Petal.Length>=2.7 66 19 virginica (0.0000000 0.2878788 0.7121212) *
##
## $trees[[7]]
## n= 100
##
## node), split, n, loss, yval, (yprob)
## * denotes terminal node
##
## 1) root 100 63 virginica (0.3000000 0.3300000 0.3700000)
## 2) Petal.Length< 2.5 30 0 setosa (1.0000000 0.0000000 0.0000000) *
## 3) Petal.Length>=2.5 70 33 virginica (0.0000000 0.4714286 0.5285714) *
##
## $trees[[8]]
## n= 100
##
## node), split, n, loss, yval, (yprob)
## * denotes terminal node
##
## 1) root 100 51 versicolor (0.2500000 0.4900000 0.2600000)
## 2) Petal.Length< 2.6 25 0 setosa (1.0000000 0.0000000 0.0000000) *
## 3) Petal.Length>=2.6 75 26 versicolor (0.0000000 0.6533333 0.3466667) *
##
## $trees[[9]]
## n= 100
##
## node), split, n, loss, yval, (yprob)
## * denotes terminal node
##
## 1) root 100 62 versicolor (0.26000000 0.38000000 0.36000000)
## 2) Petal.Length< 4.75 63 27 versicolor (0.41269841 0.57142857 0.01587302) *
## 3) Petal.Length>=4.75 37 2 virginica (0.00000000 0.05405405 0.94594595) *
##
## $trees[[10]]
## n= 100
##
## node), split, n, loss, yval, (yprob)
## * denotes terminal node
##
## 1) root 100 65 setosa (0.3500000 0.3000000 0.3500000)
## 2) Petal.Length< 2.6 35 0 setosa (1.0000000 0.0000000 0.0000000) *
## 3) Petal.Length>=2.6 65 30 virginica (0.0000000 0.4615385 0.5384615) *
##
## $trees[[11]]
## n= 100
##
## node), split, n, loss, yval, (yprob)
## * denotes terminal node
##
## 1) root 100 62 virginica (0.2900000 0.3300000 0.3800000)
## 2) Petal.Width< 1.65 62 29 versicolor (0.4677419 0.5322581 0.0000000) *
## 3) Petal.Width>=1.65 38 0 virginica (0.0000000 0.0000000 1.0000000) *
##
## $trees[[12]]
## n= 100
##
## node), split, n, loss, yval, (yprob)
## * denotes terminal node
##
## 1) root 100 65 versicolor (0.3400000 0.3500000 0.3100000)
## 2) Petal.Length< 2.6 34 0 setosa (1.0000000 0.0000000 0.0000000) *
## 3) Petal.Length>=2.6 66 31 versicolor (0.0000000 0.5303030 0.4696970) *
##
## $trees[[13]]
## n= 100
##
## node), split, n, loss, yval, (yprob)
## * denotes terminal node
##
## 1) root 100 61 virginica (0.2900000 0.3200000 0.3900000)
## 2) Petal.Length< 2.5 29 0 setosa (1.0000000 0.0000000 0.0000000) *
## 3) Petal.Length>=2.5 71 32 virginica (0.0000000 0.4507042 0.5492958) *
##
## $trees[[14]]
## n= 100
##
## node), split, n, loss, yval, (yprob)
## * denotes terminal node
##
## 1) root 100 59 virginica (0.23000000 0.36000000 0.41000000)
## 2) Petal.Length< 4.85 59 25 versicolor (0.38983051 0.57627119 0.03389831) *
## 3) Petal.Length>=4.85 41 2 virginica (0.00000000 0.04878049 0.95121951) *
##
## $trees[[15]]
## n= 100
##
## node), split, n, loss, yval, (yprob)
## * denotes terminal node
##
## 1) root 100 63 setosa (0.3700000 0.3100000 0.3200000)
## 2) Petal.Length< 2.5 37 0 setosa (1.0000000 0.0000000 0.0000000) *
## 3) Petal.Length>=2.5 63 31 virginica (0.0000000 0.4920635 0.5079365) *
##
## $trees[[16]]
## n= 100
##
## node), split, n, loss, yval, (yprob)
## * denotes terminal node
##
## 1) root 100 58 versicolor (0.2800000 0.4200000 0.3000000)
## 2) Petal.Length< 2.7 28 0 setosa (1.0000000 0.0000000 0.0000000) *
## 3) Petal.Length>=2.7 72 30 versicolor (0.0000000 0.5833333 0.4166667) *
##
## $trees[[17]]
## n= 100
##
## node), split, n, loss, yval, (yprob)
## * denotes terminal node
##
## 1) root 100 64 versicolor (0.2800000 0.3600000 0.3600000)
## 2) Petal.Length< 2.5 28 0 setosa (1.0000000 0.0000000 0.0000000) *
## 3) Petal.Length>=2.5 72 36 versicolor (0.0000000 0.5000000 0.5000000) *
##
## $trees[[18]]
## n= 100
##
## node), split, n, loss, yval, (yprob)
## * denotes terminal node
##
## 1) root 100 56 virginica (0.22000000 0.34000000 0.44000000)
## 2) Petal.Width< 1.65 58 26 versicolor (0.37931034 0.55172414 0.06896552) *
## 3) Petal.Width>=1.65 42 2 virginica (0.00000000 0.04761905 0.95238095) *
##
## $trees[[19]]
## n= 100
##
## node), split, n, loss, yval, (yprob)
## * denotes terminal node
##
## 1) root 100 53 virginica (0.2300000 0.3000000 0.4700000)
## 2) Petal.Length< 2.6 23 0 setosa (1.0000000 0.0000000 0.0000000) *
## 3) Petal.Length>=2.6 77 30 virginica (0.0000000 0.3896104 0.6103896) *
##
## $trees[[20]]
## n= 100
##
## node), split, n, loss, yval, (yprob)
## * denotes terminal node
##
## 1) root 100 65 virginica (0.3400000 0.3100000 0.3500000)
## 2) Petal.Length< 2.6 34 0 setosa (1.0000000 0.0000000 0.0000000) *
## 3) Petal.Length>=2.6 66 31 virginica (0.0000000 0.4696970 0.5303030) *
##
## $trees[[21]]
## n= 100
##
## node), split, n, loss, yval, (yprob)
## * denotes terminal node
##
## 1) root 100 57 versicolor (0.2400000 0.4300000 0.3300000)
## 2) Petal.Length< 2.5 24 0 setosa (1.0000000 0.0000000 0.0000000) *
## 3) Petal.Length>=2.5 76 33 versicolor (0.0000000 0.5657895 0.4342105) *
##
## $trees[[22]]
## n= 100
##
## node), split, n, loss, yval, (yprob)
## * denotes terminal node
##
## 1) root 100 50 virginica (0.1400000 0.3600000 0.5000000)
## 2) Petal.Width< 1.65 52 22 versicolor (0.2692308 0.5769231 0.1538462) *
## 3) Petal.Width>=1.65 48 6 virginica (0.0000000 0.1250000 0.8750000) *
##
## $trees[[23]]
## n= 100
##
## node), split, n, loss, yval, (yprob)
## * denotes terminal node
##
## 1) root 100 62 versicolor (0.2800000 0.3800000 0.3400000)
## 2) Petal.Length< 2.6 28 0 setosa (1.0000000 0.0000000 0.0000000) *
## 3) Petal.Length>=2.6 72 34 versicolor (0.0000000 0.5277778 0.4722222) *
##
## $trees[[24]]
## n= 100
##
## node), split, n, loss, yval, (yprob)
## * denotes terminal node
##
## 1) root 100 57 virginica (0.22000000 0.35000000 0.43000000)
## 2) Petal.Length< 4.85 63 29 versicolor (0.34920635 0.53968254 0.11111111) *
## 3) Petal.Length>=4.85 37 1 virginica (0.00000000 0.02702703 0.97297297) *
##
## $trees[[25]]
## n= 100
##
## node), split, n, loss, yval, (yprob)
## * denotes terminal node
##
## 1) root 100 47 virginica (0.2700000 0.2000000 0.5300000)
## 2) Petal.Length< 2.6 27 0 setosa (1.0000000 0.0000000 0.0000000) *
## 3) Petal.Length>=2.6 73 20 virginica (0.0000000 0.2739726 0.7260274) *
##
## $trees[[26]]
## n= 100
##
## node), split, n, loss, yval, (yprob)
## * denotes terminal node
##
## 1) root 100 63 virginica (0.2900000 0.3400000 0.3700000)
## 2) Petal.Length< 2.7 29 0 setosa (1.0000000 0.0000000 0.0000000) *
## 3) Petal.Length>=2.7 71 34 virginica (0.0000000 0.4788732 0.5211268) *
##
## $trees[[27]]
## n= 100
##
## node), split, n, loss, yval, (yprob)
## * denotes terminal node
##
## 1) root 100 56 versicolor (0.2200000 0.4400000 0.3400000)
## 2) Petal.Length< 2.5 22 0 setosa (1.0000000 0.0000000 0.0000000) *
## 3) Petal.Length>=2.5 78 34 versicolor (0.0000000 0.5641026 0.4358974) *
##
## $trees[[28]]
## n= 100
##
## node), split, n, loss, yval, (yprob)
## * denotes terminal node
##
## 1) root 100 56 versicolor (0.1400000 0.4400000 0.4200000)
## 2) Petal.Length< 5.2 71 27 versicolor (0.1971831 0.6197183 0.1830986) *
## 3) Petal.Length>=5.2 29 0 virginica (0.0000000 0.0000000 1.0000000) *
##
## $trees[[29]]
## n= 100
##
## node), split, n, loss, yval, (yprob)
## * denotes terminal node
##
## 1) root 100 57 versicolor (0.2100000 0.4300000 0.3600000)
## 2) Petal.Length< 2.6 21 0 setosa (1.0000000 0.0000000 0.0000000) *
## 3) Petal.Length>=2.6 79 36 versicolor (0.0000000 0.5443038 0.4556962) *
##
## $trees[[30]]
## n= 100
##
## node), split, n, loss, yval, (yprob)
## * denotes terminal node
##
## 1) root 100 56 virginica (0.2100000 0.3500000 0.4400000)
## 2) Petal.Length< 2.6 21 0 setosa (1.0000000 0.0000000 0.0000000) *
## 3) Petal.Length>=2.6 79 35 virginica (0.0000000 0.4430380 0.5569620) *
##
## $trees[[31]]
## n= 100
##
## node), split, n, loss, yval, (yprob)
## * denotes terminal node
##
## 1) root 100 57 versicolor (0.1800000 0.4300000 0.3900000)
## 2) Petal.Length< 2.45 18 0 setosa (1.0000000 0.0000000 0.0000000) *
## 3) Petal.Length>=2.45 82 39 versicolor (0.0000000 0.5243902 0.4756098) *
##
## $trees[[32]]
## n= 100
##
## node), split, n, loss, yval, (yprob)
## * denotes terminal node
##
## 1) root 100 53 virginica (0.1600000 0.3700000 0.4700000)
## 2) Petal.Length< 2.6 16 0 setosa (1.0000000 0.0000000 0.0000000) *
## 3) Petal.Length>=2.6 84 37 virginica (0.0000000 0.4404762 0.5595238) *
##
## $trees[[33]]
## n= 100
##
## node), split, n, loss, yval, (yprob)
## * denotes terminal node
##
## 1) root 100 50 virginica (0.1400000 0.3600000 0.5000000)
## 2) Petal.Length< 2.6 14 0 setosa (1.0000000 0.0000000 0.0000000) *
## 3) Petal.Length>=2.6 86 36 virginica (0.0000000 0.4186047 0.5813953) *
##
## $trees[[34]]
## n= 100
##
## node), split, n, loss, yval, (yprob)
## * denotes terminal node
##
## 1) root 100 54 versicolor (0.1600000 0.4600000 0.3800000)
## 2) Petal.Width< 1.65 65 23 versicolor (0.2461538 0.6461538 0.1076923) *
## 3) Petal.Width>=1.65 35 4 virginica (0.0000000 0.1142857 0.8857143) *
##
## $trees[[35]]
## n= 100
##
## node), split, n, loss, yval, (yprob)
## * denotes terminal node
##
## 1) root 100 51 versicolor (0.1600000 0.4900000 0.3500000)
## 2) Petal.Length< 4.95 62 19 versicolor (0.2580645 0.6935484 0.0483871) *
## 3) Petal.Length>=4.95 38 6 virginica (0.0000000 0.1578947 0.8421053) *
##
## $trees[[36]]
## n= 100
##
## node), split, n, loss, yval, (yprob)
## * denotes terminal node
##
## 1) root 100 62 versicolor (0.2500000 0.3800000 0.3700000)
## 2) Petal.Length< 2.5 25 0 setosa (1.0000000 0.0000000 0.0000000) *
## 3) Petal.Length>=2.5 75 37 versicolor (0.0000000 0.5066667 0.4933333) *
##
## $trees[[37]]
## n= 100
##
## node), split, n, loss, yval, (yprob)
## * denotes terminal node
##
## 1) root 100 60 virginica (0.2700000 0.3300000 0.4000000)
## 2) Petal.Length< 2.9 27 0 setosa (1.0000000 0.0000000 0.0000000) *
## 3) Petal.Length>=2.9 73 33 virginica (0.0000000 0.4520548 0.5479452) *
##
## $trees[[38]]
## n= 100
##
## node), split, n, loss, yval, (yprob)
## * denotes terminal node
##
## 1) root 100 56 virginica (0.1900000 0.3700000 0.4400000)
## 2) Petal.Length< 2.6 19 0 setosa (1.0000000 0.0000000 0.0000000) *
## 3) Petal.Length>=2.6 81 37 virginica (0.0000000 0.4567901 0.5432099) *
##
## $trees[[39]]
## n= 100
##
## node), split, n, loss, yval, (yprob)
## * denotes terminal node
##
## 1) root 100 50 versicolor (0.2200000 0.5000000 0.2800000)
## 2) Petal.Length< 2.5 22 0 setosa (1.0000000 0.0000000 0.0000000) *
## 3) Petal.Length>=2.5 78 28 versicolor (0.0000000 0.6410256 0.3589744) *
##
## $trees[[40]]
## n= 100
##
## node), split, n, loss, yval, (yprob)
## * denotes terminal node
##
## 1) root 100 54 virginica (0.1600000 0.3800000 0.4600000)
## 2) Petal.Length< 2.6 16 0 setosa (1.0000000 0.0000000 0.0000000) *
## 3) Petal.Length>=2.6 84 38 virginica (0.0000000 0.4523810 0.5476190) *
##
## $trees[[41]]
## n= 100
##
## node), split, n, loss, yval, (yprob)
## * denotes terminal node
##
## 1) root 100 53 versicolor (0.1100000 0.4700000 0.4200000)
## 2) Petal.Length< 4.85 56 19 versicolor (0.1964286 0.6607143 0.1428571) *
## 3) Petal.Length>=4.85 44 10 virginica (0.0000000 0.2272727 0.7727273) *
##
## $trees[[42]]
## n= 100
##
## node), split, n, loss, yval, (yprob)
## * denotes terminal node
##
## 1) root 100 56 versicolor (0.1600000 0.4400000 0.4000000)
## 2) Petal.Length< 2.6 16 0 setosa (1.0000000 0.0000000 0.0000000) *
## 3) Petal.Length>=2.6 84 40 versicolor (0.0000000 0.5238095 0.4761905) *
##
## $trees[[43]]
## n= 100
##
## node), split, n, loss, yval, (yprob)
## * denotes terminal node
##
## 1) root 100 55 virginica (0.2000000 0.3500000 0.4500000)
## 2) Petal.Length< 2.6 20 0 setosa (1.0000000 0.0000000 0.0000000) *
## 3) Petal.Length>=2.6 80 35 virginica (0.0000000 0.4375000 0.5625000) *
##
## $trees[[44]]
## n= 100
##
## node), split, n, loss, yval, (yprob)
## * denotes terminal node
##
## 1) root 100 54 versicolor (0.1700000 0.4600000 0.3700000)
## 2) Petal.Length< 2.6 17 0 setosa (1.0000000 0.0000000 0.0000000) *
## 3) Petal.Length>=2.6 83 37 versicolor (0.0000000 0.5542169 0.4457831) *
##
## $trees[[45]]
## n= 100
##
## node), split, n, loss, yval, (yprob)
## * denotes terminal node
##
## 1) root 100 51 versicolor (0.1400000 0.4900000 0.3700000)
## 2) Petal.Width< 1.65 67 22 versicolor (0.2089552 0.6716418 0.1194030) *
## 3) Petal.Width>=1.65 33 4 virginica (0.0000000 0.1212121 0.8787879) *
##
## $trees[[46]]
## n= 100
##
## node), split, n, loss, yval, (yprob)
## * denotes terminal node
##
## 1) root 100 48 virginica (0.1800000 0.3000000 0.5200000)
## 2) Petal.Length< 2.45 18 0 setosa (1.0000000 0.0000000 0.0000000) *
## 3) Petal.Length>=2.45 82 30 virginica (0.0000000 0.3658537 0.6341463) *
##
## $trees[[47]]
## n= 100
##
## node), split, n, loss, yval, (yprob)
## * denotes terminal node
##
## 1) root 100 53 virginica (0.1000000 0.4300000 0.4700000)
## 2) Petal.Length< 4.85 59 21 versicolor (0.1694915 0.6440678 0.1864407) *
## 3) Petal.Length>=4.85 41 5 virginica (0.0000000 0.1219512 0.8780488) *
##
## $trees[[48]]
## n= 100
##
## node), split, n, loss, yval, (yprob)
## * denotes terminal node
##
## 1) root 100 59 versicolor (0.1900000 0.4100000 0.4000000)
## 2) Petal.Length< 2.6 19 0 setosa (1.0000000 0.0000000 0.0000000) *
## 3) Petal.Length>=2.6 81 40 versicolor (0.0000000 0.5061728 0.4938272) *
##
## $trees[[49]]
## n= 100
##
## node), split, n, loss, yval, (yprob)
## * denotes terminal node
##
## 1) root 100 47 virginica (0.1000000 0.3700000 0.5300000)
## 2) Petal.Length< 4.4 26 10 versicolor (0.3846154 0.6153846 0.0000000) *
## 3) Petal.Length>=4.4 74 21 virginica (0.0000000 0.2837838 0.7162162) *
##
## $trees[[50]]
## n= 100
##
## node), split, n, loss, yval, (yprob)
## * denotes terminal node
##
## 1) root 100 52 virginica (0.1500000 0.3700000 0.4800000)
## 2) Petal.Length< 2.6 15 0 setosa (1.0000000 0.0000000 0.0000000) *
## 3) Petal.Length>=2.6 85 37 virginica (0.0000000 0.4352941 0.5647059) *
##
## $trees[[51]]
## n= 100
##
## node), split, n, loss, yval, (yprob)
## * denotes terminal node
##
## 1) root 100 54 versicolor (0.2000000 0.4600000 0.3400000)
## 2) Petal.Length< 2.6 20 0 setosa (1.0000000 0.0000000 0.0000000) *
## 3) Petal.Length>=2.6 80 34 versicolor (0.0000000 0.5750000 0.4250000) *
##
## $trees[[52]]
## n= 100
##
## node), split, n, loss, yval, (yprob)
## * denotes terminal node
##
## 1) root 100 49 virginica (0.0900000 0.4000000 0.5100000)
## 2) Petal.Length< 4.75 35 13 versicolor (0.2571429 0.6285714 0.1142857) *
## 3) Petal.Length>=4.75 65 18 virginica (0.0000000 0.2769231 0.7230769) *
##
## $trees[[53]]
## n= 100
##
## node), split, n, loss, yval, (yprob)
## * denotes terminal node
##
## 1) root 100 51 virginica (0.1600000 0.3500000 0.4900000)
## 2) Petal.Length< 2.8 16 0 setosa (1.0000000 0.0000000 0.0000000) *
## 3) Petal.Length>=2.8 84 35 virginica (0.0000000 0.4166667 0.5833333) *
##
## $trees[[54]]
## n= 100
##
## node), split, n, loss, yval, (yprob)
## * denotes terminal node
##
## 1) root 100 51 virginica (0.1100000 0.4000000 0.4900000)
## 2) Petal.Length< 2.6 11 0 setosa (1.0000000 0.0000000 0.0000000) *
## 3) Petal.Length>=2.6 89 40 virginica (0.0000000 0.4494382 0.5505618) *
##
## $trees[[55]]
## n= 100
##
## node), split, n, loss, yval, (yprob)
## * denotes terminal node
##
## 1) root 100 55 versicolor (0.1300000 0.4500000 0.4200000)
## 2) Petal.Length< 2.5 13 0 setosa (1.0000000 0.0000000 0.0000000) *
## 3) Petal.Length>=2.5 87 42 versicolor (0.0000000 0.5172414 0.4827586) *
##
## $trees[[56]]
## n= 100
##
## node), split, n, loss, yval, (yprob)
## * denotes terminal node
##
## 1) root 100 55 versicolor (0.1500000 0.4500000 0.4000000)
## 2) Petal.Length< 2.6 15 0 setosa (1.0000000 0.0000000 0.0000000) *
## 3) Petal.Length>=2.6 85 40 versicolor (0.0000000 0.5294118 0.4705882) *
##
## $trees[[57]]
## n= 100
##
## node), split, n, loss, yval, (yprob)
## * denotes terminal node
##
## 1) root 100 55 versicolor (0.1100000 0.4500000 0.4400000)
## 2) Petal.Length< 2.65 11 0 setosa (1.0000000 0.0000000 0.0000000) *
## 3) Petal.Length>=2.65 89 44 versicolor (0.0000000 0.5056180 0.4943820) *
##
## $trees[[58]]
## n= 100
##
## node), split, n, loss, yval, (yprob)
## * denotes terminal node
##
## 1) root 100 51 virginica (0.1400000 0.3700000 0.4900000)
## 2) Petal.Length< 2.6 14 0 setosa (1.0000000 0.0000000 0.0000000) *
## 3) Petal.Length>=2.6 86 37 virginica (0.0000000 0.4302326 0.5697674) *
##
## $trees[[59]]
## n= 100
##
## node), split, n, loss, yval, (yprob)
## * denotes terminal node
##
## 1) root 100 50 versicolor (0.0800000 0.5000000 0.4200000)
## 2) Petal.Length< 5.25 79 29 versicolor (0.1012658 0.6329114 0.2658228) *
## 3) Petal.Length>=5.25 21 0 virginica (0.0000000 0.0000000 1.0000000) *
##
## $trees[[60]]
## n= 100
##
## node), split, n, loss, yval, (yprob)
## * denotes terminal node
##
## 1) root 100 55 virginica (0.1600000 0.3900000 0.4500000)
## 2) Petal.Length< 2.5 16 0 setosa (1.0000000 0.0000000 0.0000000) *
## 3) Petal.Length>=2.5 84 39 virginica (0.0000000 0.4642857 0.5357143) *
##
## $trees[[61]]
## n= 100
##
## node), split, n, loss, yval, (yprob)
## * denotes terminal node
##
## 1) root 100 56 versicolor (0.1600000 0.4400000 0.4000000)
## 2) Petal.Length< 2.45 16 0 setosa (1.0000000 0.0000000 0.0000000) *
## 3) Petal.Length>=2.45 84 40 versicolor (0.0000000 0.5238095 0.4761905) *
##
## $trees[[62]]
## n= 100
##
## node), split, n, loss, yval, (yprob)
## * denotes terminal node
##
## 1) root 100 48 virginica (0.0900000 0.3900000 0.5200000)
## 2) Petal.Length< 2.8 9 0 setosa (1.0000000 0.0000000 0.0000000) *
## 3) Petal.Length>=2.8 91 39 virginica (0.0000000 0.4285714 0.5714286) *
##
## $trees[[63]]
## n= 100
##
## node), split, n, loss, yval, (yprob)
## * denotes terminal node
##
## 1) root 100 51 versicolor (0.1200000 0.4900000 0.3900000)
## 2) Petal.Length< 2.5 12 0 setosa (1.0000000 0.0000000 0.0000000) *
## 3) Petal.Length>=2.5 88 39 versicolor (0.0000000 0.5568182 0.4431818) *
##
## $trees[[64]]
## n= 100
##
## node), split, n, loss, yval, (yprob)
## * denotes terminal node
##
## 1) root 100 51 versicolor (0.1300000 0.4900000 0.3800000)
## 2) Petal.Length< 2.4 13 0 setosa (1.0000000 0.0000000 0.0000000) *
## 3) Petal.Length>=2.4 87 38 versicolor (0.0000000 0.5632184 0.4367816) *
##
## $trees[[65]]
## n= 100
##
## node), split, n, loss, yval, (yprob)
## * denotes terminal node
##
## 1) root 100 54 versicolor (0.1100000 0.4600000 0.4300000)
## 2) Petal.Width< 1.65 61 22 versicolor (0.1803279 0.6393443 0.1803279) *
## 3) Petal.Width>=1.65 39 7 virginica (0.0000000 0.1794872 0.8205128) *
##
## $trees[[66]]
## n= 100
##
## node), split, n, loss, yval, (yprob)
## * denotes terminal node
##
## 1) root 100 51 versicolor (0.1600000 0.4900000 0.3500000)
## 2) Petal.Length< 2.5 16 0 setosa (1.0000000 0.0000000 0.0000000) *
## 3) Petal.Length>=2.5 84 35 versicolor (0.0000000 0.5833333 0.4166667) *
##
## $trees[[67]]
## n= 100
##
## node), split, n, loss, yval, (yprob)
## * denotes terminal node
##
## 1) root 100 47 virginica (0.1300000 0.3400000 0.5300000)
## 2) Petal.Length< 2.5 13 0 setosa (1.0000000 0.0000000 0.0000000) *
## 3) Petal.Length>=2.5 87 34 virginica (0.0000000 0.3908046 0.6091954) *
##
## $trees[[68]]
## n= 100
##
## node), split, n, loss, yval, (yprob)
## * denotes terminal node
##
## 1) root 100 55 versicolor (0.1000000 0.4500000 0.4500000)
## 2) Petal.Length< 2.45 10 0 setosa (1.0000000 0.0000000 0.0000000) *
## 3) Petal.Length>=2.45 90 45 versicolor (0.0000000 0.5000000 0.5000000) *
##
## $trees[[69]]
## n= 100
##
## node), split, n, loss, yval, (yprob)
## * denotes terminal node
##
## 1) root 100 52 versicolor (0.0600000 0.4800000 0.4600000)
## 2) Petal.Length< 4.95 59 21 versicolor (0.1016949 0.6440678 0.2542373) *
## 3) Petal.Length>=4.95 41 10 virginica (0.0000000 0.2439024 0.7560976) *
##
## $trees[[70]]
## n= 100
##
## node), split, n, loss, yval, (yprob)
## * denotes terminal node
##
## 1) root 100 51 virginica (0.1200000 0.3900000 0.4900000)
## 2) Petal.Length< 2.6 12 0 setosa (1.0000000 0.0000000 0.0000000) *
## 3) Petal.Length>=2.6 88 39 virginica (0.0000000 0.4431818 0.5568182) *
##
## $trees[[71]]
## n= 100
##
## node), split, n, loss, yval, (yprob)
## * denotes terminal node
##
## 1) root 100 53 virginica (0.1000000 0.4300000 0.4700000)
## 2) Petal.Length< 2.6 10 0 setosa (1.0000000 0.0000000 0.0000000) *
## 3) Petal.Length>=2.6 90 43 virginica (0.0000000 0.4777778 0.5222222) *
##
## $trees[[72]]
## n= 100
##
## node), split, n, loss, yval, (yprob)
## * denotes terminal node
##
## 1) root 100 54 virginica (0.1100000 0.4300000 0.4600000)
## 2) Petal.Length< 2.45 11 0 setosa (1.0000000 0.0000000 0.0000000) *
## 3) Petal.Length>=2.45 89 43 virginica (0.0000000 0.4831461 0.5168539) *
##
## $trees[[73]]
## n= 100
##
## node), split, n, loss, yval, (yprob)
## * denotes terminal node
##
## 1) root 100 56 versicolor (0.1300000 0.4400000 0.4300000)
## 2) Petal.Length< 2.5 13 0 setosa (1.0000000 0.0000000 0.0000000) *
## 3) Petal.Length>=2.5 87 43 versicolor (0.0000000 0.5057471 0.4942529) *
##
## $trees[[74]]
## n= 100
##
## node), split, n, loss, yval, (yprob)
## * denotes terminal node
##
## 1) root 100 47 virginica (0.1000000 0.3700000 0.5300000)
## 2) Petal.Length< 2.5 10 0 setosa (1.0000000 0.0000000 0.0000000) *
## 3) Petal.Length>=2.5 90 37 virginica (0.0000000 0.4111111 0.5888889) *
##
## $trees[[75]]
## n= 100
##
## node), split, n, loss, yval, (yprob)
## * denotes terminal node
##
## 1) root 100 52 virginica (0.1000000 0.4200000 0.4800000)
## 2) Petal.Length< 2.75 10 0 setosa (1.0000000 0.0000000 0.0000000) *
## 3) Petal.Length>=2.75 90 42 virginica (0.0000000 0.4666667 0.5333333) *
##
## $trees[[76]]
## n= 100
##
## node), split, n, loss, yval, (yprob)
## * denotes terminal node
##
## 1) root 100 51 versicolor (0.1000000 0.4900000 0.4100000)
## 2) Petal.Length< 2.5 10 0 setosa (1.0000000 0.0000000 0.0000000) *
## 3) Petal.Length>=2.5 90 41 versicolor (0.0000000 0.5444444 0.4555556) *
##
## $trees[[77]]
## n= 100
##
## node), split, n, loss, yval, (yprob)
## * denotes terminal node
##
## 1) root 100 52 virginica (0.0800000 0.4400000 0.4800000)
## 2) Sepal.Length< 6.05 68 27 versicolor (0.1176471 0.6029412 0.2794118) *
## 3) Sepal.Length>=6.05 32 3 virginica (0.0000000 0.0937500 0.9062500) *
##
## $trees[[78]]
## n= 100
##
## node), split, n, loss, yval, (yprob)
## * denotes terminal node
##
## 1) root 100 49 versicolor (0.1100000 0.5100000 0.3800000)
## 2) Petal.Length< 2.5 11 0 setosa (1.0000000 0.0000000 0.0000000) *
## 3) Petal.Length>=2.5 89 38 versicolor (0.0000000 0.5730337 0.4269663) *
##
## $trees[[79]]
## n= 100
##
## node), split, n, loss, yval, (yprob)
## * denotes terminal node
##
## 1) root 100 51 virginica (0.05000000 0.46000000 0.49000000)
## 2) Petal.Width< 1.65 60 21 versicolor (0.08333333 0.65000000 0.26666667) *
## 3) Petal.Width>=1.65 40 7 virginica (0.00000000 0.17500000 0.82500000) *
##
## $trees[[80]]
## n= 100
##
## node), split, n, loss, yval, (yprob)
## * denotes terminal node
##
## 1) root 100 51 virginica (0.0900000 0.4200000 0.4900000)
## 2) Petal.Length< 2.6 9 0 setosa (1.0000000 0.0000000 0.0000000) *
## 3) Petal.Length>=2.6 91 42 virginica (0.0000000 0.4615385 0.5384615) *
##
## $trees[[81]]
## n= 100
##
## node), split, n, loss, yval, (yprob)
## * denotes terminal node
##
## 1) root 100 55 versicolor (0.1000000 0.4500000 0.4500000)
## 2) Petal.Length< 2.6 10 0 setosa (1.0000000 0.0000000 0.0000000) *
## 3) Petal.Length>=2.6 90 45 versicolor (0.0000000 0.5000000 0.5000000) *
##
## $trees[[82]]
## n= 100
##
## node), split, n, loss, yval, (yprob)
## * denotes terminal node
##
## 1) root 100 52 versicolor (0.1200000 0.4800000 0.4000000)
## 2) Petal.Length< 2.65 12 0 setosa (1.0000000 0.0000000 0.0000000) *
## 3) Petal.Length>=2.65 88 40 versicolor (0.0000000 0.5454545 0.4545455) *
##
## $trees[[83]]
## n= 100
##
## node), split, n, loss, yval, (yprob)
## * denotes terminal node
##
## 1) root 100 48 virginica (0.1100000 0.3700000 0.5200000)
## 2) Petal.Length< 2.6 11 0 setosa (1.0000000 0.0000000 0.0000000) *
## 3) Petal.Length>=2.6 89 37 virginica (0.0000000 0.4157303 0.5842697) *
##
## $trees[[84]]
## n= 100
##
## node), split, n, loss, yval, (yprob)
## * denotes terminal node
##
## 1) root 100 55 versicolor (0.1800000 0.4500000 0.3700000)
## 2) Petal.Length< 2.45 18 0 setosa (1.0000000 0.0000000 0.0000000) *
## 3) Petal.Length>=2.45 82 37 versicolor (0.0000000 0.5487805 0.4512195) *
##
## $trees[[85]]
## n= 100
##
## node), split, n, loss, yval, (yprob)
## * denotes terminal node
##
## 1) root 100 54 virginica (0.1100000 0.4300000 0.4600000)
## 2) Petal.Length< 2.5 11 0 setosa (1.0000000 0.0000000 0.0000000) *
## 3) Petal.Length>=2.5 89 43 virginica (0.0000000 0.4831461 0.5168539) *
##
## $trees[[86]]
## n= 100
##
## node), split, n, loss, yval, (yprob)
## * denotes terminal node
##
## 1) root 100 54 virginica (0.0900000 0.4500000 0.4600000)
## 2) Petal.Length< 2.6 9 0 setosa (1.0000000 0.0000000 0.0000000) *
## 3) Petal.Length>=2.6 91 45 virginica (0.0000000 0.4945055 0.5054945) *
##
## $trees[[87]]
## n= 100
##
## node), split, n, loss, yval, (yprob)
## * denotes terminal node
##
## 1) root 100 51 versicolor (0.0900000 0.4900000 0.4200000)
## 2) Petal.Length< 2.55 9 0 setosa (1.0000000 0.0000000 0.0000000) *
## 3) Petal.Length>=2.55 91 42 versicolor (0.0000000 0.5384615 0.4615385) *
##
## $trees[[88]]
## n= 100
##
## node), split, n, loss, yval, (yprob)
## * denotes terminal node
##
## 1) root 100 53 versicolor (0.0800000 0.4700000 0.4500000)
## 2) Petal.Length< 2.55 8 0 setosa (1.0000000 0.0000000 0.0000000) *
## 3) Petal.Length>=2.55 92 45 versicolor (0.0000000 0.5108696 0.4891304) *
##
## $trees[[89]]
## n= 100
##
## node), split, n, loss, yval, (yprob)
## * denotes terminal node
##
## 1) root 100 46 virginica (0.0800000 0.3800000 0.5400000)
## 2) Sepal.Length< 6.05 63 29 versicolor (0.1269841 0.5396825 0.3333333) *
## 3) Sepal.Length>=6.05 37 4 virginica (0.0000000 0.1081081 0.8918919) *
##
## $trees[[90]]
## n= 100
##
## node), split, n, loss, yval, (yprob)
## * denotes terminal node
##
## 1) root 100 43 virginica (0.0700000 0.3600000 0.5700000)
## 2) Petal.Length< 2.6 7 0 setosa (1.0000000 0.0000000 0.0000000) *
## 3) Petal.Length>=2.6 93 36 virginica (0.0000000 0.3870968 0.6129032) *
##
## $trees[[91]]
## n= 100
##
## node), split, n, loss, yval, (yprob)
## * denotes terminal node
##
## 1) root 100 53 versicolor (0.0800000 0.4700000 0.4500000)
## 2) Petal.Length< 2.5 8 0 setosa (1.0000000 0.0000000 0.0000000) *
## 3) Petal.Length>=2.5 92 45 versicolor (0.0000000 0.5108696 0.4891304) *
##
## $trees[[92]]
## n= 100
##
## node), split, n, loss, yval, (yprob)
## * denotes terminal node
##
## 1) root 100 49 virginica (0.02000000 0.47000000 0.51000000)
## 2) Petal.Length< 5.35 82 35 versicolor (0.02439024 0.57317073 0.40243902) *
## 3) Petal.Length>=5.35 18 0 virginica (0.00000000 0.00000000 1.00000000) *
##
## $trees[[93]]
## n= 100
##
## node), split, n, loss, yval, (yprob)
## * denotes terminal node
##
## 1) root 100 52 versicolor (0.0800000 0.4800000 0.4400000)
## 2) Petal.Length< 2.75 8 0 setosa (1.0000000 0.0000000 0.0000000) *
## 3) Petal.Length>=2.75 92 44 versicolor (0.0000000 0.5217391 0.4782609) *
##
## $trees[[94]]
## n= 100
##
## node), split, n, loss, yval, (yprob)
## * denotes terminal node
##
## 1) root 100 57 versicolor (0.2600000 0.4300000 0.3100000)
## 2) Petal.Length< 4.95 69 26 versicolor (0.3768116 0.6231884 0.0000000) *
## 3) Petal.Length>=4.95 31 0 virginica (0.0000000 0.0000000 1.0000000) *
##
## $trees[[95]]
## n= 100
##
## node), split, n, loss, yval, (yprob)
## * denotes terminal node
##
## 1) root 100 63 setosa (0.3700000 0.3600000 0.2700000)
## 2) Petal.Length< 2.7 37 0 setosa (1.0000000 0.0000000 0.0000000) *
## 3) Petal.Length>=2.7 63 27 versicolor (0.0000000 0.5714286 0.4285714) *
##
## $trees[[96]]
## n= 100
##
## node), split, n, loss, yval, (yprob)
## * denotes terminal node
##
## 1) root 100 56 virginica (0.3400000 0.2200000 0.4400000)
## 2) Petal.Length< 2.6 34 0 setosa (1.0000000 0.0000000 0.0000000) *
## 3) Petal.Length>=2.6 66 22 virginica (0.0000000 0.3333333 0.6666667) *
##
## $trees[[97]]
## n= 100
##
## node), split, n, loss, yval, (yprob)
## * denotes terminal node
##
## 1) root 100 63 setosa (0.3700000 0.3700000 0.2600000)
## 2) Petal.Length< 2.7 37 0 setosa (1.0000000 0.0000000 0.0000000) *
## 3) Petal.Length>=2.7 63 26 versicolor (0.0000000 0.5873016 0.4126984) *
##
## $trees[[98]]
## n= 100
##
## node), split, n, loss, yval, (yprob)
## * denotes terminal node
##
## 1) root 100 51 virginica (0.23000000 0.28000000 0.49000000)
## 2) Petal.Length< 4.85 53 26 versicolor (0.43396226 0.50943396 0.05660377) *
## 3) Petal.Length>=4.85 47 1 virginica (0.00000000 0.02127660 0.97872340) *
##
## $trees[[99]]
## n= 100
##
## node), split, n, loss, yval, (yprob)
## * denotes terminal node
##
## 1) root 100 59 virginica (0.2900000 0.3000000 0.4100000)
## 2) Petal.Length< 2.5 29 0 setosa (1.0000000 0.0000000 0.0000000) *
## 3) Petal.Length>=2.5 71 30 virginica (0.0000000 0.4225352 0.5774648) *
##
## $trees[[100]]
## n= 100
##
## node), split, n, loss, yval, (yprob)
## * denotes terminal node
##
## 1) root 100 56 versicolor (0.2500000 0.4400000 0.3100000)
## 2) Petal.Length< 2.6 25 0 setosa (1.0000000 0.0000000 0.0000000) *
## 3) Petal.Length>=2.6 75 31 versicolor (0.0000000 0.5866667 0.4133333) *
##
##
## $weights
## [1] 0.309519604 0.363442384 0.488185142 0.283630292 0.391922324 0.479987220
## [7] 0.239993610 0.417422763 0.479292578 0.323946612 0.370953850 0.465524970
## [13] 0.375720530 0.342967529 0.262907234 0.473267518 0.236633759 0.415471027
## [19] 0.420960064 0.210480032 0.370435689 0.385958916 0.227963755 0.346388992
## [25] 0.429643186 0.214821593 0.365891080 0.264372108 0.172302762 0.363898040
## [31] 0.203004423 0.252937289 0.126468645 0.421691199 0.329604950 0.292707521
## [37] 0.290809069 0.145404535 0.293580981 0.175122575 0.346373640 0.237507923
## [43] 0.218363555 0.197823933 0.357950063 0.238228534 0.252825914 0.221766526
## [49] 0.131405260 0.202553735 0.234941629 0.107178560 0.181307039 0.090653520
## [55] 0.241990640 0.120995320 0.060497660 0.208063693 0.261685175 0.195890702
## [61] 0.134923457 0.151902170 0.128802857 0.064401428 0.347759194 0.041471921
## [67] 0.209712842 0.104059843 0.209827463 0.168216610 0.084108305 0.042054153
## [73] 0.176827325 0.093634709 0.046817354 0.147587932 0.272706456 0.048179049
## [79] 0.314507839 0.188105283 0.111693141 0.055846570 0.163153150 0.095417178
## [85] 0.121801598 0.060900799 0.125417202 0.062708601 0.238333542 0.156161141
## [91] 0.075040082 0.150732961 0.002000003 0.287682072 0.353285100 0.540701263
## [97] 0.311349721 0.436214329 0.453953149 0.365872996
##
## $votes
## [,1] [,2] [,3]
## [1,] 16.5037846 7.773326 0.000000
## [2,] 0.4881851 15.659541 8.129384
## [3,] 0.0000000 7.886216 16.390894
## [4,] 0.0000000 8.563006 15.714104
## [5,] 0.0000000 7.886216 16.390894
## [6,] 0.0000000 7.886216 16.390894
## [7,] 0.0000000 7.886216 16.390894
## [8,] 0.0000000 7.886216 16.390894
## [9,] 0.4881851 15.148501 8.640424
## [10,] 0.0000000 7.886216 16.390894
## [11,] 0.4881851 15.659541 8.129384
## [12,] 0.4881851 15.659541 8.129384
## [13,] 0.4881851 15.528136 8.260789
## [14,] 0.0000000 8.036949 16.240161
## [15,] 16.5037846 7.773326 0.000000
## [16,] 0.0000000 7.886216 16.390894
## [17,] 0.4881851 15.659541 8.129384
## [18,] 16.5037846 7.773326 0.000000
## [19,] 0.0000000 9.074046 15.203064
## [20,] 16.5037846 7.773326 0.000000
## [21,] 0.4881851 15.659541 8.129384
## [22,] 0.0000000 10.293083 13.984027
## [23,] 16.5037846 7.773326 0.000000
## [24,] 0.4881851 15.017096 8.771829
## [25,] 0.4881851 10.500508 13.288417
## [26,] 16.5037846 7.773326 0.000000
## [27,] 0.0000000 7.886216 16.390894
## [28,] 0.0000000 7.886216 16.390894
## [29,] 0.0000000 11.688338 12.588772
## [30,] 16.5037846 7.773326 0.000000
## [31,] 0.0000000 7.886216 16.390894
## [32,] 16.5037846 7.773326 0.000000
## [33,] 0.4881851 15.017096 8.771829
## [34,] 16.5037846 7.773326 0.000000
## [35,] 0.0000000 9.074046 15.203064
## [36,] 0.4881851 15.659541 8.129384
## [37,] 0.4881851 15.148501 8.640424
## [38,] 16.5037846 7.773326 0.000000
## [39,] 16.5037846 7.773326 0.000000
## [40,] 16.5037846 7.773326 0.000000
## [41,] 16.5037846 7.773326 0.000000
## [42,] 0.0000000 7.886216 16.390894
## [43,] 0.4881851 15.659541 8.129384
## [44,] 16.5037846 7.773326 0.000000
## [45,] 0.0000000 9.074046 15.203064
## [46,] 0.4881851 15.528136 8.260789
## [47,] 0.4881851 15.017096 8.771829
## [48,] 16.5037846 7.773326 0.000000
## [49,] 0.0000000 12.913844 11.363266
## [50,] 0.0000000 10.500508 13.776602
## [51,] 0.4881851 15.659541 8.129384
## [52,] 0.0000000 7.886216 16.390894
## [53,] 0.0000000 15.017096 9.260014
## [54,] 16.5037846 7.773326 0.000000
## [55,] 16.5037846 7.773326 0.000000
## [56,] 16.5037846 7.773326 0.000000
## [57,] 0.4881851 15.659541 8.129384
## [58,] 0.4881851 15.659541 8.129384
## [59,] 16.5037846 7.773326 0.000000
## [60,] 16.5037846 7.773326 0.000000
## [61,] 0.0000000 7.886216 16.390894
## [62,] 0.0000000 7.886216 16.390894
## [63,] 0.0000000 7.886216 16.390894
## [64,] 0.0000000 15.528136 8.748974
## [65,] 0.0000000 8.563006 15.714104
## [66,] 16.5037846 7.773326 0.000000
## [67,] 0.4881851 15.017096 8.771829
## [68,] 0.4881851 15.017096 8.771829
## [69,] 16.5037846 7.773326 0.000000
## [70,] 0.4881851 15.017096 8.771829
## [71,] 16.5037846 7.773326 0.000000
## [72,] 0.0000000 12.327373 11.949737
## [73,] 16.5037846 7.773326 0.000000
## [74,] 0.0000000 7.886216 16.390894
## [75,] 0.4881851 15.659541 8.129384
## [76,] 0.0000000 12.327373 11.949737
## [77,] 0.4881851 15.659541 8.129384
## [78,] 0.0000000 7.886216 16.390894
## [79,] 0.0000000 7.886216 16.390894
## [80,] 16.5037846 7.773326 0.000000
## [81,] 0.0000000 7.886216 16.390894
## [82,] 0.4881851 15.659541 8.129384
## [83,] 0.4881851 15.659541 8.129384
## [84,] 16.5037846 7.773326 0.000000
## [85,] 0.0000000 9.074046 15.203064
## [86,] 16.5037846 7.773326 0.000000
## [87,] 16.5037846 7.773326 0.000000
## [88,] 0.4881851 11.177298 12.611627
## [89,] 16.5037846 7.773326 0.000000
## [90,] 0.4881851 15.017096 8.771829
## [91,] 0.4881851 15.659541 8.129384
## [92,] 16.5037846 7.773326 0.000000
## [93,] 0.4881851 15.659541 8.129384
## [94,] 0.0000000 7.886216 16.390894
## [95,] 16.5037846 7.773326 0.000000
## [96,] 0.0000000 7.886216 16.390894
## [97,] 0.0000000 7.886216 16.390894
## [98,] 16.5037846 7.773326 0.000000
## [99,] 0.4881851 15.017096 8.771829
## [100,] 0.0000000 7.886216 16.390894
##
## $prob
## [,1] [,2] [,3]
## [1,] 0.67980845 0.3201916 0.0000000
## [2,] 0.02010887 0.6450332 0.3348580
## [3,] 0.00000000 0.3248416 0.6751584
## [4,] 0.00000000 0.3527193 0.6472807
## [5,] 0.00000000 0.3248416 0.6751584
## [6,] 0.00000000 0.3248416 0.6751584
## [7,] 0.00000000 0.3248416 0.6751584
## [8,] 0.00000000 0.3248416 0.6751584
## [9,] 0.02010887 0.6239829 0.3559082
## [10,] 0.00000000 0.3248416 0.6751584
## [11,] 0.02010887 0.6450332 0.3348580
## [12,] 0.02010887 0.6450332 0.3348580
## [13,] 0.02010887 0.6396205 0.3402707
## [14,] 0.00000000 0.3310505 0.6689495
## [15,] 0.67980845 0.3201916 0.0000000
## [16,] 0.00000000 0.3248416 0.6751584
## [17,] 0.02010887 0.6450332 0.3348580
## [18,] 0.67980845 0.3201916 0.0000000
## [19,] 0.00000000 0.3737696 0.6262304
## [20,] 0.67980845 0.3201916 0.0000000
## [21,] 0.02010887 0.6450332 0.3348580
## [22,] 0.00000000 0.4239830 0.5760170
## [23,] 0.67980845 0.3201916 0.0000000
## [24,] 0.02010887 0.6185702 0.3613210
## [25,] 0.02010887 0.4325271 0.5473640
## [26,] 0.67980845 0.3201916 0.0000000
## [27,] 0.00000000 0.3248416 0.6751584
## [28,] 0.00000000 0.3248416 0.6751584
## [29,] 0.00000000 0.4814551 0.5185449
## [30,] 0.67980845 0.3201916 0.0000000
## [31,] 0.00000000 0.3248416 0.6751584
## [32,] 0.67980845 0.3201916 0.0000000
## [33,] 0.02010887 0.6185702 0.3613210
## [34,] 0.67980845 0.3201916 0.0000000
## [35,] 0.00000000 0.3737696 0.6262304
## [36,] 0.02010887 0.6450332 0.3348580
## [37,] 0.02010887 0.6239829 0.3559082
## [38,] 0.67980845 0.3201916 0.0000000
## [39,] 0.67980845 0.3201916 0.0000000
## [40,] 0.67980845 0.3201916 0.0000000
## [41,] 0.67980845 0.3201916 0.0000000
## [42,] 0.00000000 0.3248416 0.6751584
## [43,] 0.02010887 0.6450332 0.3348580
## [44,] 0.67980845 0.3201916 0.0000000
## [45,] 0.00000000 0.3737696 0.6262304
## [46,] 0.02010887 0.6396205 0.3402707
## [47,] 0.02010887 0.6185702 0.3613210
## [48,] 0.67980845 0.3201916 0.0000000
## [49,] 0.00000000 0.5319350 0.4680650
## [50,] 0.00000000 0.4325271 0.5674729
## [51,] 0.02010887 0.6450332 0.3348580
## [52,] 0.00000000 0.3248416 0.6751584
## [53,] 0.00000000 0.6185702 0.3814298
## [54,] 0.67980845 0.3201916 0.0000000
## [55,] 0.67980845 0.3201916 0.0000000
## [56,] 0.67980845 0.3201916 0.0000000
## [57,] 0.02010887 0.6450332 0.3348580
## [58,] 0.02010887 0.6450332 0.3348580
## [59,] 0.67980845 0.3201916 0.0000000
## [60,] 0.67980845 0.3201916 0.0000000
## [61,] 0.00000000 0.3248416 0.6751584
## [62,] 0.00000000 0.3248416 0.6751584
## [63,] 0.00000000 0.3248416 0.6751584
## [64,] 0.00000000 0.6396205 0.3603795
## [65,] 0.00000000 0.3527193 0.6472807
## [66,] 0.67980845 0.3201916 0.0000000
## [67,] 0.02010887 0.6185702 0.3613210
## [68,] 0.02010887 0.6185702 0.3613210
## [69,] 0.67980845 0.3201916 0.0000000
## [70,] 0.02010887 0.6185702 0.3613210
## [71,] 0.67980845 0.3201916 0.0000000
## [72,] 0.00000000 0.5077776 0.4922224
## [73,] 0.67980845 0.3201916 0.0000000
## [74,] 0.00000000 0.3248416 0.6751584
## [75,] 0.02010887 0.6450332 0.3348580
## [76,] 0.00000000 0.5077776 0.4922224
## [77,] 0.02010887 0.6450332 0.3348580
## [78,] 0.00000000 0.3248416 0.6751584
## [79,] 0.00000000 0.3248416 0.6751584
## [80,] 0.67980845 0.3201916 0.0000000
## [81,] 0.00000000 0.3248416 0.6751584
## [82,] 0.02010887 0.6450332 0.3348580
## [83,] 0.02010887 0.6450332 0.3348580
## [84,] 0.67980845 0.3201916 0.0000000
## [85,] 0.00000000 0.3737696 0.6262304
## [86,] 0.67980845 0.3201916 0.0000000
## [87,] 0.67980845 0.3201916 0.0000000
## [88,] 0.02010887 0.4604048 0.5194863
## [89,] 0.67980845 0.3201916 0.0000000
## [90,] 0.02010887 0.6185702 0.3613210
## [91,] 0.02010887 0.6450332 0.3348580
## [92,] 0.67980845 0.3201916 0.0000000
## [93,] 0.02010887 0.6450332 0.3348580
## [94,] 0.00000000 0.3248416 0.6751584
## [95,] 0.67980845 0.3201916 0.0000000
## [96,] 0.00000000 0.3248416 0.6751584
## [97,] 0.00000000 0.3248416 0.6751584
## [98,] 0.67980845 0.3201916 0.0000000
## [99,] 0.02010887 0.6185702 0.3613210
## [100,] 0.00000000 0.3248416 0.6751584
##
## $class
## [1] "setosa" "versicolor" "virginica" "virginica" "virginica"
## [6] "virginica" "virginica" "virginica" "versicolor" "virginica"
## [11] "versicolor" "versicolor" "versicolor" "virginica" "setosa"
## [16] "virginica" "versicolor" "setosa" "virginica" "setosa"
## [21] "versicolor" "virginica" "setosa" "versicolor" "virginica"
## [26] "setosa" "virginica" "virginica" "virginica" "setosa"
## [31] "virginica" "setosa" "versicolor" "setosa" "virginica"
## [36] "versicolor" "versicolor" "setosa" "setosa" "setosa"
## [41] "setosa" "virginica" "versicolor" "setosa" "virginica"
## [46] "versicolor" "versicolor" "setosa" "versicolor" "virginica"
## [51] "versicolor" "virginica" "versicolor" "setosa" "setosa"
## [56] "setosa" "versicolor" "versicolor" "setosa" "setosa"
## [61] "virginica" "virginica" "virginica" "versicolor" "virginica"
## [66] "setosa" "versicolor" "versicolor" "setosa" "versicolor"
## [71] "setosa" "versicolor" "setosa" "virginica" "versicolor"
## [76] "versicolor" "versicolor" "virginica" "virginica" "setosa"
## [81] "virginica" "versicolor" "versicolor" "setosa" "virginica"
## [86] "setosa" "setosa" "virginica" "setosa" "versicolor"
## [91] "versicolor" "setosa" "versicolor" "virginica" "setosa"
## [96] "virginica" "virginica" "setosa" "versicolor" "virginica"
##
## $importance
## Petal.Length Petal.Width Sepal.Length Sepal.Width
## 86.38102 12.49928 1.11970 0.00000
##
## $terms
## Species ~ Sepal.Length + Sepal.Width + Petal.Length + Petal.Width
## attr(,"variables")
## list(Species, Sepal.Length, Sepal.Width, Petal.Length, Petal.Width)
## attr(,"factors")
## Sepal.Length Sepal.Width Petal.Length Petal.Width
## Species 0 0 0 0
## Sepal.Length 1 0 0 0
## Sepal.Width 0 1 0 0
## Petal.Length 0 0 1 0
## Petal.Width 0 0 0 1
## attr(,"term.labels")
## [1] "Sepal.Length" "Sepal.Width" "Petal.Length" "Petal.Width"
## attr(,"order")
## [1] 1 1 1 1
## attr(,"intercept")
## [1] 1
## attr(,"response")
## [1] 1
## attr(,".Environment")
## <environment: R_GlobalEnv>
## attr(,"predvars")
## list(Species, Sepal.Length, Sepal.Width, Petal.Length, Petal.Width)
## attr(,"dataClasses")
## Species Sepal.Length Sepal.Width Petal.Length Petal.Width
## "factor" "numeric" "numeric" "numeric" "numeric"
##
## $call
## boosting(formula = Species ~ ., data = df.train, mfinal = 100,
## control = rpart.control(maxdepth = 1))
##
## attr(,"vardep.summary")
## setosa versicolor virginica
## 32 32 36
## attr(,"class")
## [1] "boosting"
ad.predictions
## $formula
## Species ~ .
##
## $votes
## [,1] [,2] [,3]
## [1,] 9.2046012 4.404517 0.000000
## [2,] 9.2046012 4.404517 0.000000
## [3,] 9.2046012 4.404517 0.000000
## [4,] 9.2046012 4.404517 0.000000
## [5,] 9.2046012 4.404517 0.000000
## [6,] 9.2046012 4.404517 0.000000
## [7,] 9.2046012 4.404517 0.000000
## [8,] 9.2046012 4.404517 0.000000
## [9,] 9.2046012 4.404517 0.000000
## [10,] 9.2046012 4.404517 0.000000
## [11,] 9.2046012 4.404517 0.000000
## [12,] 9.2046012 4.404517 0.000000
## [13,] 9.2046012 4.404517 0.000000
## [14,] 9.2046012 4.404517 0.000000
## [15,] 9.2046012 4.404517 0.000000
## [16,] 9.2046012 4.404517 0.000000
## [17,] 9.2046012 4.404517 0.000000
## [18,] 9.2046012 4.404517 0.000000
## [19,] 0.4881851 6.983290 6.137643
## [20,] 0.4881851 8.807833 4.313100
## [21,] 0.4881851 8.807833 4.313100
## [22,] 0.4881851 8.807833 4.313100
## [23,] 0.4881851 8.807833 4.313100
## [24,] 0.4881851 8.807833 4.313100
## [25,] 0.4881851 6.983290 6.137643
## [26,] 0.4881851 8.807833 4.313100
## [27,] 0.4881851 8.807833 4.313100
## [28,] 0.4881851 8.807833 4.313100
## [29,] 0.4881851 8.328540 4.792393
## [30,] 0.0000000 4.667688 8.941430
## [31,] 0.4881851 8.807833 4.313100
## [32,] 0.4881851 8.807833 4.313100
## [33,] 0.4881851 8.807833 4.313100
## [34,] 0.4881851 8.807833 4.313100
## [35,] 0.4881851 8.807833 4.313100
## [36,] 0.4881851 8.807833 4.313100
## [37,] 0.0000000 4.403316 9.205802
## [38,] 0.0000000 4.667688 8.941430
## [39,] 0.0000000 4.403316 9.205802
## [40,] 0.4881851 6.261763 6.859170
## [41,] 0.0000000 5.389215 8.219903
## [42,] 0.0000000 4.403316 9.205802
## [43,] 0.0000000 6.734465 6.874653
## [44,] 0.0000000 5.389215 8.219903
## [45,] 0.0000000 4.403316 9.205802
## [46,] 0.0000000 4.403316 9.205802
## [47,] 0.0000000 4.403316 9.205802
## [48,] 0.0000000 4.403316 9.205802
## [49,] 0.0000000 4.667688 8.941430
## [50,] 0.0000000 4.403316 9.205802
##
## $prob
## [,1] [,2] [,3]
## [1,] 0.67635546 0.3236445 0.0000000
## [2,] 0.67635546 0.3236445 0.0000000
## [3,] 0.67635546 0.3236445 0.0000000
## [4,] 0.67635546 0.3236445 0.0000000
## [5,] 0.67635546 0.3236445 0.0000000
## [6,] 0.67635546 0.3236445 0.0000000
## [7,] 0.67635546 0.3236445 0.0000000
## [8,] 0.67635546 0.3236445 0.0000000
## [9,] 0.67635546 0.3236445 0.0000000
## [10,] 0.67635546 0.3236445 0.0000000
## [11,] 0.67635546 0.3236445 0.0000000
## [12,] 0.67635546 0.3236445 0.0000000
## [13,] 0.67635546 0.3236445 0.0000000
## [14,] 0.67635546 0.3236445 0.0000000
## [15,] 0.67635546 0.3236445 0.0000000
## [16,] 0.67635546 0.3236445 0.0000000
## [17,] 0.67635546 0.3236445 0.0000000
## [18,] 0.67635546 0.3236445 0.0000000
## [19,] 0.03587192 0.5131332 0.4509949
## [20,] 0.03587192 0.6472008 0.3169272
## [21,] 0.03587192 0.6472008 0.3169272
## [22,] 0.03587192 0.6472008 0.3169272
## [23,] 0.03587192 0.6472008 0.3169272
## [24,] 0.03587192 0.6472008 0.3169272
## [25,] 0.03587192 0.5131332 0.4509949
## [26,] 0.03587192 0.6472008 0.3169272
## [27,] 0.03587192 0.6472008 0.3169272
## [28,] 0.03587192 0.6472008 0.3169272
## [29,] 0.03587192 0.6119823 0.3521457
## [30,] 0.00000000 0.3429824 0.6570176
## [31,] 0.03587192 0.6472008 0.3169272
## [32,] 0.03587192 0.6472008 0.3169272
## [33,] 0.03587192 0.6472008 0.3169272
## [34,] 0.03587192 0.6472008 0.3169272
## [35,] 0.03587192 0.6472008 0.3169272
## [36,] 0.03587192 0.6472008 0.3169272
## [37,] 0.00000000 0.3235563 0.6764437
## [38,] 0.00000000 0.3429824 0.6570176
## [39,] 0.00000000 0.3235563 0.6764437
## [40,] 0.03587192 0.4601153 0.5040128
## [41,] 0.00000000 0.3960003 0.6039997
## [42,] 0.00000000 0.3235563 0.6764437
## [43,] 0.00000000 0.4948495 0.5051505
## [44,] 0.00000000 0.3960003 0.6039997
## [45,] 0.00000000 0.3235563 0.6764437
## [46,] 0.00000000 0.3235563 0.6764437
## [47,] 0.00000000 0.3235563 0.6764437
## [48,] 0.00000000 0.3235563 0.6764437
## [49,] 0.00000000 0.3429824 0.6570176
## [50,] 0.00000000 0.3235563 0.6764437
##
## $class
## [1] "setosa" "setosa" "setosa" "setosa" "setosa"
## [6] "setosa" "setosa" "setosa" "setosa" "setosa"
## [11] "setosa" "setosa" "setosa" "setosa" "setosa"
## [16] "setosa" "setosa" "setosa" "versicolor" "versicolor"
## [21] "versicolor" "versicolor" "versicolor" "versicolor" "versicolor"
## [26] "versicolor" "versicolor" "versicolor" "versicolor" "virginica"
## [31] "versicolor" "versicolor" "versicolor" "versicolor" "versicolor"
## [36] "versicolor" "virginica" "virginica" "virginica" "virginica"
## [41] "virginica" "virginica" "virginica" "virginica" "virginica"
## [46] "virginica" "virginica" "virginica" "virginica" "virginica"
##
## $confusion
## Observed Class
## Predicted Class setosa versicolor virginica
## setosa 18 0 0
## versicolor 0 17 0
## virginica 0 1 14
##
## $error
## [1] 0.02
ad.predictions$confusion
## Observed Class
## Predicted Class setosa versicolor virginica
## setosa 18 0 0
## versicolor 0 17 0
## virginica 0 1 14
names(ad.predictions)
## [1] "formula" "votes" "prob" "class" "confusion" "error"
ad.predictions$error
## [1] 0.02