What is the difference between bagging decision trees and random forest




In the adabag package there is a function called bagging:

Vehicle.bagging <- bagging(Class ~.,data=Vehicle[sub, ],mfinal=20,
control=rpart.control(maxdepth=5, minsplit=15))

the maxdepth is the number of levels in the trees??The minsplit is the minimum number of splits i guess.So if a tree has 5 levels does minsplit specify the splits at each level or that the minimum number of splits till level 5 has to be 15??
Also,it seems like this is like a random forest which is an ensemble of trees,then why do we use bagging to combine decision trees and not random forest??



minsplit is “the minimum number of observations that must exist in a node in order for a split to be attempted”.

In both bagging and random forest, many individual decision trees are built on bootstrapped version of the original dataset and are ensembled together. The difference is that, In random forest, a random subset of variables are considered during node split while in bagging of decision trees, all the variables are considered in a node split.

Hope this helps!