Weak hypotheses in boosting method - machine-learning

What is the weak hypotheses generated during boosting?

I'm guessing that you mean the weak classifiers that are combined in boosting? Often these are decision trees only a few layers deep. They are trained, one after another, on the dataset weighted such that data points the last classifier got wrong are given more weight.
Check these notes from a UPenn machine learning class for more information:
http://alliance.seas.upenn.edu/~cis520/wiki/index.php?n=Lectures.Boosting

Related

Weak vs Strong descriptors - machine vision

I have heard of Haar-like features being described as weak descriptors and that the Adaboost method is advantageous over SVM in this case because of this. My question is what is a weak descriptor and strong descriptor and why does a boosting method perform better than an SVM (for example)?
A weak descriptor would be something which is not too refined or tuned (eg: haar features, edge maps etc). A strong descriptor(SIFT/SURF/MSER) would be something which is accurate, has high repeatability under blur, viewpoint/illumination change, JPEG compression. A boosting method would perform better for weak descriptors and SVM would be suitable for a strong descriptor. This is because the idea of boosting is to combine a lot of weak classifiers to learn a classifier. In the case of haar like features, adaboost combines many such weak features to learn a strong classifier. SVM tries to fit a hyperplane between the most confusing features between the two classes, so for SVM to perform better, the confusion between the classes should be less and features should be robust and accurate.

What is a weak learner?

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)?
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:
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)
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.
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.
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.

Effects of boosting with strong classifier

What is the effect of boosting with strong (instead of weak, error rate close to random) classifier? Could it be possible that a strong classifier perform better by itself than when this strong classifier is used in adaboost along with a bunch of weak classifiers?
Yes, it is possible. All depends of your learning dataset. Look at the no free lunch theorem, there is always dataset that don't fit a particular algorithm / heuristic (even combination of thoses).
Things got more interesting with boosting when you use algorithms within the same error rate, on differents dataset. The fact that classifier should be strong or weak doesn't change the benefit of boosting. But the theorem in the foundation of the boosting specified that it inferior limit is bunch of weak classifier. If you use less than weak classifier, it won't work.
In my experiences, I never found a problem where I found a so good/strong classifier that any other classifiers(better than random) doesn't improve performance with boosting on some dataset.

OpenCV: How to get weak lerners from adaboost in

Is there a way to extract the features corresponding to the weak learners from the adaboost algorithm implemented in Opencv ?
I know that adaboost combines a set of weak learners based on a set of input features.
The same features are measured for each sample in the training set.
Usually adaboost uses a decision stump and sets a threshold for each feature and chooses the decision stump having the minimum error. I want to find out what are the features that generated the weak learners.
Thanks.
You simply have to save the model and extract the trees/stump from the text file.
The save() api is quite simple to use. In the file you will find items like this:
"splits:
- { var:448, quality:5.0241161137819290e-002,
le:1.7250000000000000e+002 }"
The number next to "var" is the feature index and the "le" is the "less than" value for this feature.

Selecting Best Features in a feature vector using Adaboost

I've read some documentation on how Adaboost works but have some questions regarding it.
I've also read that Adaboost also picks best features from data apart from weighting weak classifiers to and use them in testing phase to perform classification efficiently.
How does Adaboost pick best features from the data?
Correct me if my understanding of Adaboost is wrong!
In some cases the weak classifiers in Adaboost are (almost) equal to features. In other words, using a single feature to classify can result in slightly better than random performance, so it can be used as a weak classifier. Adaboost will find the set of best weak classifiers given the training data, so if the weak classifiers are equal to features then you will have an indication of the most useful features.
An example of weak classifiers resembling features are decision stumps.
OK, adaboost selects features based on its basic learner, tree. For a single tree, there are several means to estimate how much contribution a single feature does to the tree, called relative importance somewhere. For adaboosting, an ensamble method, containing several such trees, the relative significance of each feature to the final model can be calculated by measuring significance of each feature to each tree then average it.
Hope this can help you.

Resources