MATLAB: What are the implications of the observation weights on the “Bag”, and “AdaBoostM1” methods in the “fitcensemble” function

adaboostm1bagobservationStatistics and Machine Learning Toolboxweights

What are the implications of the observation weights on the "Bag", and "AdaBoostM1" methods in the "fitcensemble" function?
Are the observations with higher weights more likely to be randomly picked by the “bootstrap-sample-algorithm” used to create a tree?

Best Answer

The ‘Bag’ method implements random forest. For every tree, observations are sampled with replacement using the weights that you specify. The tree is then grown using these sampled observations without weights. That is, the weights are only used to sample observations, but they are not passed to the tree.
In the "AdaBoostM1" method, the observation weights are used in the training of the model for minimization of the exponential loss. Please refer to the following link for more information on the usage of observation weights in "AdaBoostM1" algorithm:
Unless you specify the ‘Resample’ option as ’on’, all the observations are used to train every tree in the ensemble.
At every iteration, the observation weights are updated as described in the above link and passed to the tree. The tree then uses these weights to find the optimal splits. That is, splitting criteria such as Gini index are computed by summing the observation weights per class.