## Synopsis ¶

#include <grt/GRT/ClassificationModules/AdaBoost/AdaBoost.h>

GRT::AdaBoost::AdaBoost(const WeakClassifier &weakClassifier=DecisionStump(), bool useScaling=false, bool useNullRejection=false, double nullRejectionCoeff=10.0, UINT numBoostingIterations=20, UINT predictionMethod=MAX_VALUE)



## Description ¶

Default Constructor

Parameters

const

WeakClassifier &weakClassifier: sets the initial weak classifier that is added to the vector of weak classifiers used to train the AdaBoost model

bool

useScaling: sets if the training and prediction data should be scaled to a specific range.

### GRT::AdaBoost::AdaBoost(const WeakClassifier &weakClassifier=DecisionStump(), bool useScaling=false, bool useNullRejection=false, double nullRejectionCoeff=10.0, UINT numBoostingIterations=20, UINT predictionMethod=MAX_VALUE)¶

Default Constructor

Parameters

const

WeakClassifier &weakClassifier: sets the initial weak classifier that is added to the vector of weak classifiers used to train the AdaBoost model

bool

useScaling: sets if the training and prediction data should be scaled to a specific range. Default value is useScaling = false

bool

useNullRejection: sets if null rejection will be used for the realtime prediction. If useNullRejection is set to true then the predictedClassLabel will be set to 0 (which is the default null label) if the distance between the inputVector and the top K datum is greater than the null rejection threshold for the top predicted class. The null rejection threshold is computed for each class during the training phase. Default value is useNullRejection = false

double

nullRejectionCoeff: sets the null rejection coefficient, this is a multipler controlling the null rejection threshold for each class. This will only be used if the useNullRejection parameter is set to true. Default value is nullRejectionCoeff = 10.0

UINT

numBoostingIterations: sets the number of boosting iterations to use during training. Default value = 20

UINT

predictionMethod: sets the prediction method for AdaBoost, this should be one of the PredictionMethods. Default value = MAX_VALUE

Defines the copy constructor.

Parameters

const

AdaBoost &rhs: the instance from which all the data will be copied into this instance

## Examples¶

//
//


## Source ¶

AdaBoost::AdaBoost(const WeakClassifier &weakClassifier,bool useScaling,bool useNullRejection,double nullRejectionCoeff,UINT numBoostingIterations,UINT predictionMethod)
{
setWeakClassifier( weakClassifier );
this->useScaling = useScaling;
this->useNullRejection = useNullRejection;
this->nullRejectionCoeff = nullRejectionCoeff;
this->numBoostingIterations = numBoostingIterations;
this->predictionMethod = predictionMethod;
classifierType = classType;
classifierMode = STANDARD_CLASSIFIER_MODE;
}

AdaBoost::AdaBoost(const AdaBoost &rhs){
classifierMode = STANDARD_CLASSIFIER_MODE;