Machine Learning in Action
By Peter Harrington
This article, based on chapter 7 of Machine Learning in Action, shows how to use the Adaboost algorithm to create a decision stump that makes a decision on one feature only.
A decision stump is a very simple decision tree. We are going to create a decision stump that makes a decision on one feature only. It’s a tree with only one split, so it’s a stump.
While we are building the Adaboost code, we are going to work with a really simple data set to make sure we have everything straight. You can create a new file called adaboost.py and add the following code:
