SG++-Doxygen-Documentation
sgpp::datadriven::AlgorithmAdaBoostIdentity Class Reference

#include <AlgorithmAdaBoostIdentity.hpp>

Inheritance diagram for sgpp::datadriven::AlgorithmAdaBoostIdentity:
sgpp::datadriven::AlgorithmAdaBoostBase

Public Member Functions

 AlgorithmAdaBoostIdentity (base::Grid &SparseGrid, size_t gridType, base::level_t gridLevel, base::DataMatrix &trainData, base::DataVector &trainDataClass, size_t NUM, double lambda, size_t IMAX, double eps, size_t IMAX_final, double eps_final, double firstLabel, double secondLabel, double threshold, double maxLambda, double minLambda, size_t searchNum, bool refine, size_t refineMode, size_t refineNum, size_t numberOfAda, double percentOfAda, size_t mode)
 Std-Constructor. More...
 
virtual ~AlgorithmAdaBoostIdentity ()
 Std-Deconstructor. More...
 
- Public Member Functions inherited from sgpp::datadriven::AlgorithmAdaBoostBase
 AlgorithmAdaBoostBase (base::Grid &SparseGrid, size_t gridType, base::level_t gridLevel, base::DataMatrix &trainData, base::DataVector &trainDataClass, size_t NUM, double lambda, size_t IMAX, double eps, size_t IMAX_final, double eps_final, double firstLabel, double secondLabel, double threshold, double maxLambda, double minLambda, size_t searchNum, bool refine, size_t refineMode, size_t refineNum, size_t numberOfAda, double percentOfAda, size_t mode)
 Std-Constructor. More...
 
void classif (base::DataMatrix &testData, base::DataVector &algorithmClassTrain, base::DataVector &algorithmClassTest, base::DataMatrix &algorithmValueTrain, base::DataMatrix &algorithmValueTest)
 Performs a classify for the testing dataset according to the baselearners get from the algorithm. More...
 
void doAdaBoostR2 (base::DataMatrix &weights, base::DataMatrix &testData, base::DataMatrix &algorithmValueTrain, base::DataMatrix &algorithmValueTest, std::string lossFucType)
 Performs the Adaboost.R2(a regression algorithm) More...
 
void doAdaBoostRT (base::DataMatrix &weights, base::DataMatrix &testData, base::DataMatrix &algorithmValueTrain, base::DataMatrix &algorithmValueTest, double Tvalue, std::string powerType)
 Performs the Adaboost.RT(a regression algorithm) More...
 
void doDiscreteAdaBoost (base::DataVector &hypoWeight, base::DataVector &weightError, base::DataMatrix &weights, base::DataMatrix &decision, base::DataMatrix &testData, base::DataMatrix &algorithmValueTrain, base::DataMatrix &algorithmValueTest)
 Performs the Discrete Adaboost. More...
 
void doRealAdaBoost (base::DataMatrix &weights, base::DataMatrix &testData, base::DataMatrix &algorithmValueTrain, base::DataMatrix &algorithmValueTest)
 Performs the Real Adaboost. More...
 
void doRefinement (base::DataVector &alpha_ada, base::DataVector &weight_ada, size_t curBaseLearner)
 Performs refinement of grid to get an adaptive grid. More...
 
void eval (base::DataMatrix &testData, base::DataMatrix &algorithmValueTrain, base::DataMatrix &algorithmValueTest)
 Performs a real value calculate for the testing dataset. More...
 
void getAccuracy (base::DataMatrix &testData, base::DataVector &testDataClass, double *accuracy_train, double *accuracy_test)
 Performs an accuracy evaluation for the testing dataset. More...
 
void getAccuracyBL (base::DataMatrix &testData, base::DataVector &testDataClass, base::DataMatrix &algorithmValueTrain, base::DataMatrix &algorithmValueTest, double *accuracy_train, double *accuracy_test, size_t yourBaseLearner)
 Performs an accuracy evaluation for the testing dataset with a specified number of base learner. More...
 
size_t getActualBL ()
 Get the actual base learners after doing adaboosting. More...
 
size_t getMaxGridPoint (size_t baseLearner)
 Get the max GridPoint ever used in adaboosting. More...
 
size_t getMeanGridPoint (size_t baseLearner)
 Get the mean GridPoint ever used in adaboosting. More...
 
void getROC (base::DataMatrix &validationData, base::DataVector &validationDataClass, double *acc, double *sensitivity, double *specificity, double *precision, double *recall, double *fOneScore)
 Performs an evaluation to get ROC related parameter. More...
 
size_t getSumGridPoint (size_t baseLearner)
 Get the sum GridPoint ever used in adaboosting. More...
 
double hValue (double realValue)
 Performs a hypothesis classifier. More...
 
virtual ~AlgorithmAdaBoostBase ()
 Std-Deconstructor. More...
 

Protected Member Functions

virtual void alphaSolver (double &lambda, base::DataVector &weight, base::DataVector &alpha, bool final)
 Performs a solver to get alpha use DMWeightMatrix as the System Matrix. More...
 

Additional Inherited Members

- Protected Attributes inherited from sgpp::datadriven::AlgorithmAdaBoostBase
size_t actualBaseLearners
 Actual base learners number for Adaboosting. More...
 
size_t boostMode
 Set the boost mode (1: Discrete Adaboost, 2: Real Adaboost) More...
 
base::DataVectorclasses
 Pointer to the class(real value in regression) of the data vector. More...
 
base::DataMatrixdata
 Pointer to the data matrix. More...
 
size_t dim
 DataSet Dimension. More...
 
double epsilon
 Parameter for CG solver(during the refinement) More...
 
double epsilon_final
 Parameter for CG solver(for the last refinement) More...
 
base::Gridgrid
 the grid More...
 
size_t gridPoint
 Number of grid points. More...
 
size_t imax
 Parameter for CG solver(during the refinement) More...
 
size_t imax_final
 Parameter for CG solver(for the last refinement) More...
 
double labelOne
 One label of the DataSet. More...
 
double labelTwo
 Another label of the DataSet. More...
 
double lamb
 the lambda, the regularisation parameter More...
 
double lambLogMax
 Log of the Max lambda in searching for optimal lambda. More...
 
size_t lambSteps
 Number of iteration in searching for optimal lambda. More...
 
double lambStepsize
 Interval size with logrange used in searching optimal lambda. More...
 
base::level_t level
 grid level More...
 
base::DataVectormaxGridPoint
 Number of the maximum grid points used in the algorithm. More...
 
size_t numBaseLearners
 Number of base learner for Adaboosting. More...
 
size_t numData
 the size of the grid More...
 
size_t numOfAda
 Number of Grid points to refine. More...
 
double perOfAda
 Percentage of Grid points to refine(between 0 and 1) More...
 
bool refinement
 Judgement of grid refine. More...
 
size_t refineMode
 Select the refine mode(1:use grid number, 2: use grid number percentage) More...
 
size_t refineTimes
 Number of refinement with a certain percentage of Grid points. More...
 
base::DataVectorsumGridPoint
 Number of the sum grid points used in the algorithm. More...
 
double threshold
 Threshold to predict class. More...
 
size_t type
 type of grid possible value are 1, 2 or 3(1 = Linear Grid, 2 = LinearL0Boundary Grid, 3 = ModLinear Grid); More...
 

Constructor & Destructor Documentation

◆ AlgorithmAdaBoostIdentity()

sgpp::datadriven::AlgorithmAdaBoostIdentity::AlgorithmAdaBoostIdentity ( base::Grid SparseGrid,
size_t  gridType,
base::level_t  gridLevel,
base::DataMatrix trainData,
base::DataVector trainDataClass,
size_t  NUM,
double  lambda,
size_t  IMAX,
double  eps,
size_t  IMAX_final,
double  eps_final,
double  firstLabel,
double  secondLabel,
double  threshold,
double  maxLambda,
double  minLambda,
size_t  searchNum,
bool  refine,
size_t  refineMode,
size_t  refineNum,
size_t  numberOfAda,
double  percentOfAda,
size_t  mode 
)

Std-Constructor.

Parameters
SparseGridreference to the sparse grid
gridTypereference to the of grid type(1 = Linear Grid, 2 = LinearL0Boundary Grid, 3 = ModLinear Grid)
gridLevelreference to the level of grid
trainDatareference to the training dataset
trainDataClassreference to the class of training dataset
NUMthe number of baselearner for Adaboosting
lambdathe regularisation parameter
IMAXthe parameter for ConjugateGradients
epsthe parameter for ConjugateGradients
IMAX_finalthe parameter for ConjugateGradients used for last refinement step
eps_finalthe parameter for ConjugateGradients used for last refinement step
firstLabelone label from training dataset
secondLabelanother label from training dataset
thresholdthe parameter for predicting a class
maxLambdathe max lambda used in searching optimal lambda
minLambdathe min lambda used in searching optimal lambda
searchNumthe searching times used in searching for optimal lambda
refinethe judgement of refine
refineModeSelect the refine mode
refineNumthe Number of refinement with a certain percentage of Grid points
numberOfAdathe number of Grid points to refine
percentOfAdathe percentage of Grid points to refine
modethe adaboost type to choose

◆ ~AlgorithmAdaBoostIdentity()

sgpp::datadriven::AlgorithmAdaBoostIdentity::~AlgorithmAdaBoostIdentity ( )
virtual

Std-Deconstructor.

Member Function Documentation

◆ alphaSolver()

void sgpp::datadriven::AlgorithmAdaBoostIdentity::alphaSolver ( double &  lambda,
base::DataVector weight,
base::DataVector alpha,
bool  final 
)
protectedvirtual

The documentation for this class was generated from the following files: