O'Reilly logo

R Statistical Application Development by Example Beginner's Guide by Prabhanjan Narayanachar Tattar

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Random forests

In the previous section, we built multiple models for the same classification problem. The bootstrapped trees were generated by using resamples of the observations. Breiman (2001) suggested an important variation—actually, there is more to it than just a variation—where a CART is built with the covariates (features) being resampled for each of the bootstrap samples of the dataset. Since the final tree of each bootstrap sample has different covariates, the ensemble of the collective trees is called a Random Forest. A formal algorithm is given next.

  1. As with the bagging algorithm, draw a sample of size n1, n1 < n with replacement from the data , and denote the first resampled data with . The remaining n to n1 data form the out-of-bag ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required