grt

Function AdaBoost

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)

GRT::AdaBoost::AdaBoost(const AdaBoost &rhs)

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

GRT::AdaBoost::AdaBoost(const AdaBoost &rhs)

Defines the copy constructor.

Parameters

const

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

Examples

//
//

Source

From lines 30-45 in GRT/ClassificationModules/AdaBoost/AdaBoost.cpp

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;
    classType = "AdaBoost";
    classifierType = classType;
    classifierMode = STANDARD_CLASSIFIER_MODE;
    debugLog.setProceedingText("[DEBUG AdaBoost]");
    errorLog.setProceedingText("[ERROR AdaBoost]");
    trainingLog.setProceedingText("[TRAINING AdaBoost]");
    warningLog.setProceedingText("[WARNING AdaBoost]");
}

From lines 47-55 in GRT/ClassificationModules/AdaBoost/AdaBoost.cpp

AdaBoost::AdaBoost(const AdaBoost &rhs){
    classifierType = "AdaBoost";
    classifierMode = STANDARD_CLASSIFIER_MODE;
    debugLog.setProceedingText("[DEBUG AdaBoost]");
    errorLog.setProceedingText("[ERROR AdaBoost]");
    trainingLog.setProceedingText("[TRAINING AdaBoost]");
    warningLog.setProceedingText("[WARNING AdaBoost]");
    *this = rhs;
}


Discussions

There are 0 discussions relevant for this page, and 1 discussions in the whole project.




Add Discussion

Log in to comment