Gentle AdaBoost Classifier with two different weak-learners : Decision Stump and Perceptron.
Multi-class problem is performed with the one-vs-all strategy.
Usage
------
model = gentleboost_model(X , y , [options]);
Inputs
-------
X Features matrix (d x N) in double precision
y Labels vector(1 x N) where y_i={1,...,M} and i=1,...,N.. If y represent binary labels vector then y_i={-1,1}.
options
weaklearner Choice of the weak learner used in the training phase
weaklearner = 0 <=> minimizing the weighted error : sum(w * |z - h(x;(th,a,b))|^2) / sum(w), where h(x;(th,a,b)) = (a*(x>th) + b) in R
weaklearner = 1 <=> minimizing the weighted error : sum(w * |z - h(x;(a,b))|^2), where h(x;(a,b)) = sigmoid(x ; a,b) in R
T Number of weaklearners (default T = 100)
epsi Epsilon constant in the sigmoid function used in the perceptron (default epsi = 1.0)
lambda Regularization parameter for the perceptron's weights update (default lambda = 1e-3)
max_ite Maximum number of iterations of the perceptron algorithm (default max_ite = 100)
seed Seed number for internal random generator (default random seed according to time)
If compiled with the "OMP" compilation flag
num_threads Number of threads. If num_threads = -1, num_threads = number of core (default num_threads = -1)
Outputs
-------
model Structure of model ouput
featureIdx Features index in single/double precision of the T best weaklearners (T x m) where m is the number of class.
For binary classification m is force to 1.
th Optimal Threshold parameters (1 x T) in single/double precision.
a Affine parameter(1 x T) in single/double precision.
b Bias parameter (1 x T) in single/double precision.
weaklearner Choice of the weak learner used in the training phase in single/double precision.
epsi Epsilon constant in the sigmoid function used in the perceptron in single/double precision.
Please run mexme_gentleboost to compile mex-files on your platform.
Please run test_gentleboost_model to run the demo.
N.B. Last build of libsvm is also included and slightly modified to suppress verbose. |