Machine Learning Basics

Which of the following correctly describes the difference between bagging (random forests and the like) and boosting in ensemble learning?

  1. ABagging trains models independently on several training sets made by sampling with replacement and combines their results by averaging or majority vote, while boosting adds models one after another so that each makes up for the errors of the previous ones
  2. BBagging adds models one at a time while emphasizing the data the previous model got wrong, while boosting trains mutually independent models in parallel on data sampled with replacement and takes a majority vote
  3. CBoth bagging and boosting are methods that build one large decision tree and then cut off unneeded branches to prevent overfitting
Show answer and explanation

Answer: A. Bagging trains models independently on several training sets made by sampling with replacement and combines their results by averaging or majority vote, while boosting adds models one after another so that each makes up for the errors of the previous ones

Bagging creates slightly different training sets by drawing randomly from the original data with duplicates allowed (bootstrapping), and combines the predictions of the many models trained on them by averaging or majority vote. The models are independent, so they can be trained in parallel, and the main effect is to reduce variance. A random forest is a bagging method that also chooses the features used for splitting at random, increasing the diversity of the decision trees. Boosting adds weak models one after another so that each makes up for the errors of the models so far, and it mainly reduces bias.

  • A. Correct. Bagging averages or votes over independent models, and boosting adds models in sequence to make up for errors.
  • B. The descriptions of bagging and boosting are reversed.
  • C. This describes pruning a decision tree, not ensemble learning, which combines several models.
Practice this topic Back to topic

Related calculators

Books on Machine Learning Basics Ad

As an Amazon Associate I earn from qualifying purchases.

More Machine Learning Basics questions

  1. The class of the 2D point (0, 0) is predicted with k-nearest neighbors. The training data consists of red points (1, 0), (3, 0) and (0, −3) and blue points (0, 2) and (−2, 1). Using Euclidean distance, which pair of predictions for k = 3 and k = 5 is correct?
  2. Which of the following describes a support vector machine (SVM)?
  3. 20% of all emails are spam. A certain word appears in 50% of spam emails and in 5% of non-spam emails. Which is closest to the probability that an email containing this word is spam?
  4. Which logic function cannot be represented by a simple perceptron consisting only of input and output layers (a single neuron that outputs 0 or 1 with a threshold)?
  5. In a three-class classification, the values input to the softmax function (logits) are 3, 1 and 0. About how many times the second class's output (probability) is the first class's output? Which is closest?