Book Image

Building a Recommendation System with R

Book Image

Building a Recommendation System with R

Overview of this book

Table of Contents (13 chapters)
Building a Recommendation System with R
About the Authors
About the Reviewer

Ensemble methods

In data mining, we use ensemble methods, which means using multiple learning algorithms to obtain better predictive results than applying any single learning algorithm on any statistical problem. This section will provide an overview of popular ensemble methods such as bagging, boosting, and random forests


Bagging is also known as Bootstrap aggregating. It is designed to improve the stability and accuracy of machine-learning algorithms. It helps avoid over fitting and reduces variance. This is mostly used with decision trees.

Bagging involves randomly generating Bootstrap samples from the dataset and trains the models individually. Predictions are then made by aggregating or averaging all the response variables:

  • For example, consider a dataset (Xi, Yi), where i=1 …n, contains n data points.

  • Now, randomly select B samples with replacements from the original dataset using Bootstrap technique.

  • Next, train the B samples with regression/classification models independently....