25

I want to compare different error rates of different classifiers with the error rate from a weak learner (better than random guessing). So, my question is, what are a few choices for a simple, easy to process weak learner? Or, do I understand the concept incorrectly, and is a weak learner simply any benchmark that I choose (for example, a linear regression)?

Amro
  • 123,847
  • 25
  • 243
  • 454
Stu
  • 1,543
  • 3
  • 17
  • 31

2 Answers2

38

better than random guessing

That is basically the only requirement for a weak learner. So long as you can consistently beat random guessing, any true boosting algorithm will be able to increase the accuracy of the final ensemble. What weak learner you should choose is then a trade off between 3 factors:

  1. The bias of the model. A lower bias is almost always better, but you don't want to pick something that will overfit (yes, boosting can and does overfit)
  2. The training time for the weak learner. Generally we want to be able to learn a weak learner quickly, as we are going to be building a few hundred (or thousand) of them.
  3. The prediction time for our weak learner. If we use a model that has a slow prediction rate, our ensemble of them is going to be a few hundred times slower!

The classic weak learner is a decision tree. By changing the maximum depth of the tree, you can control all 3 factors. This makes them incredibly popular for boosting. What you should be using depends on your individual problem, but decision trees is a good starting point.

NOTE: So long as the algorithm supports weighted data instances, any algorithm can be used for boosting. A guest speaker at my University was boosting 5 layer deep neural networks for his work in computational biology.

Raff.Edward
  • 6,404
  • 24
  • 34
10

Weak learners are basically thresholds for each feature. One simple example is a 1-level decision tree called decision stump applied in bagging or boosting. It just chooses a threshold for one feature and splits the data on that threshold (for example, to determine whether the iris flower is Iris versicolor or Iris virginica based on the petal width). Then it is trained on this specific feature by bagging or AdaBoost.

Ronald Wildenberg
  • 31,634
  • 14
  • 90
  • 133
lennon310
  • 12,503
  • 11
  • 43
  • 61
  • 1
    In fact, a problem may not have a stump learner that is a weak learner: Let x_1 = (-1,-1), x_2 = (1,1), x_3 = (-1,1), x_4 = (1,-1) be our data points, and classification be : y_1 = -1, y_2 = 1, y_3 = 1, y_4 = -1. Then no single-feature threshold learner can have error less than 1/2 (draw the 4 quadrants). It is sometimes difficult to prove the existence of a weak learner, but that point is almost always ignored by practitioners (I am often guilty). – Charles Pehlivanian Dec 09 '13 at 20:29
  • Thank you Charles. I guess you mean y_1=y_2=-1, and y_3=y_4=1 in your example? – lennon310 Dec 09 '13 at 20:33