View License

Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.

» Watch video

Highlights from
Boosting Demo

4.2 | 4 ratings Rate this file 20 Downloads (last 30 days) File Size: 13.6 KB File ID: #29245 Version: 1.0
image thumbnail

Boosting Demo



A demo to illustrate the behaviour of Adaboost with various base learners on a few toy datasets.

| Watch this File

File Information

This demo gives a clear visual presentation of what happens during the Adaboost algorithms. It shows how the decision boundary, example weights, training error and base learner weights change during training.

A selection of base learning algorithms are included: Linear Regression, Naive Bayes, Decision Stump, CART (requires stats toolbox), Neural Network (requires netlab) and SVM (requires libsvm). There are also 3 dataset generators (2-gaussians, circle and rotated checkerboard). There is documentation to assist with adding custom base learner algorithms or dataset generators.
The demo allows the choice of base learner and dataset. It is then possible to add one base learner at a time, according to the Adaboost algorithm.

After any number of base learners, the decision boundary and margins are shown on the plot. It is also possible to view two graphs: Error rates (showing how Adaboost affects training and generalisation errors as more base learners are added), and margin distributions (showing the cumulative distribution of margins for the current ensemble).

Base learners appear in a list at the left of the window. These include a checkbox which disables/enables each learner, and a scroll bar that adjusts its weight. This makes it possible to see the consequences of changing the weights assigned by Adaboost.

The Reset button enables all the base learners and sets their weights according to Adaboost. The checkboxes can be right-clicked to disable all other learners and view the impact of only the selected base learner.

MATLAB release MATLAB 7.10 (R2010a)
Other requirements Optional requirements: netlab, libsvm, statistics toolbox
Tags for This File   Please login to tag files.
Please login to add a comment or rating.
Comments and Ratings (6)
25 May 2015 xu rui

xu rui (view profile)

04 Dec 2014 Antonio Fortes

04 Dec 2014 Antonio Fortes

With 2014b and the much better graphics package, one must change the listeners. For example:

listener = handle.listener(a.learner_scroll,'ActionEvent',@(varargin)a.scroll_learners());
Will result in an error and must be replaced with:
listener = addlistener(a.learner_scroll,'Action',@(varargin)a.scroll_learners());

Comment only
06 Jan 2013 li kunming

How can I run it.Who can tell me.Thank you.

04 Feb 2012 sahar

sahar (view profile)

I find this code very inetrsting,I want to add an other data with inputs is a matrix(n,m) with n>2 and the output is a vector(1,m). But I find error of size of matrix

Comment only
02 Nov 2010 Alexander Patrushev

Contact us