AdaBoostModel Class Reference

The model to save to disk. More...

Public Types

enum  WeakLearnerTypes
{
  DECISION_STUMP
,
  PERCEPTRON

}
 

Public Member Functions

 AdaBoostModel ()
 Create an empty AdaBoost model. More...

 
 AdaBoostModel (const arma::Col< size_t > &mappings, const size_t weakLearnerType)
 Create the AdaBoost model with the given mappings and type. More...

 
 AdaBoostModel (const AdaBoostModel &other)
 Copy constructor. More...

 
 AdaBoostModel (AdaBoostModel &&other)
 Move constructor. More...

 
 ~AdaBoostModel ()
 Clean up memory. More...

 
void Classify (const arma::mat &testData, arma::Row< size_t > &predictions)
 Classify test points. More...

 
void Classify (const arma::mat &testData, arma::Row< size_t > &predictions, arma::mat &probabilities)
 Classify test points. More...

 
size_t Dimensionality () const
 Get the dimensionality of the model. More...

 
size_t & Dimensionality ()
 Modify the dimensionality of the model. More...

 
const arma::Col< size_t > & Mappings () const
 Get the mappings. More...

 
arma::Col< size_t > & Mappings ()
 Modify the mappings. More...

 
AdaBoostModeloperator= (const AdaBoostModel &other)
 Copy assignment operator. More...

 
AdaBoostModeloperator= (AdaBoostModel &&other)
 Move assignment operator. More...

 
template
<
typename
Archive
>
void serialize (Archive &ar, const uint32_t)
 Serialize the model. More...

 
void Train (const arma::mat &data, const arma::Row< size_t > &labels, const size_t numClasses, const size_t iterations, const double tolerance)
 Train the model, treat the data is all of the numeric type. More...

 
size_t WeakLearnerType () const
 Get the weak learner type. More...

 
size_t & WeakLearnerType ()
 Modify the weak learner type. More...

 

Detailed Description

The model to save to disk.

Definition at line 26 of file adaboost_model.hpp.

Member Enumeration Documentation

◆ WeakLearnerTypes

Enumerator
DECISION_STUMP 
PERCEPTRON 

Definition at line 29 of file adaboost_model.hpp.

Constructor & Destructor Documentation

◆ AdaBoostModel() [1/4]

Create an empty AdaBoost model.

◆ AdaBoostModel() [2/4]

AdaBoostModel ( const arma::Col< size_t > &  mappings,
const size_t  weakLearnerType 
)

Create the AdaBoost model with the given mappings and type.

◆ AdaBoostModel() [3/4]

AdaBoostModel ( const AdaBoostModel other)

Copy constructor.

◆ AdaBoostModel() [4/4]

Move constructor.

◆ ~AdaBoostModel()

Clean up memory.

Member Function Documentation

◆ Classify() [1/2]

void Classify ( const arma::mat &  testData,
arma::Row< size_t > &  predictions 
)

Classify test points.

Referenced by AdaBoostModel::Dimensionality().

◆ Classify() [2/2]

void Classify ( const arma::mat &  testData,
arma::Row< size_t > &  predictions,
arma::mat &  probabilities 
)

Classify test points.

◆ Dimensionality() [1/2]

size_t Dimensionality ( ) const
inline

Get the dimensionality of the model.

Definition at line 81 of file adaboost_model.hpp.

◆ Dimensionality() [2/2]

size_t& Dimensionality ( )
inline

Modify the dimensionality of the model.

Definition at line 83 of file adaboost_model.hpp.

References AdaBoostModel::Classify(), and AdaBoostModel::Train().

◆ Mappings() [1/2]

const arma::Col<size_t>& Mappings ( ) const
inline

Get the mappings.

Definition at line 71 of file adaboost_model.hpp.

◆ Mappings() [2/2]

arma::Col<size_t>& Mappings ( )
inline

Modify the mappings.

Definition at line 73 of file adaboost_model.hpp.

◆ operator=() [1/2]

AdaBoostModel& operator= ( const AdaBoostModel other)

Copy assignment operator.

◆ operator=() [2/2]

AdaBoostModel& operator= ( AdaBoostModel &&  other)

Move assignment operator.

◆ serialize()

void serialize ( Archive &  ar,
const uint32_t   
)
inline

Serialize the model.

Definition at line 103 of file adaboost_model.hpp.

References CEREAL_POINTER.

◆ Train()

void Train ( const arma::mat &  data,
const arma::Row< size_t > &  labels,
const size_t  numClasses,
const size_t  iterations,
const double  tolerance 
)

Train the model, treat the data is all of the numeric type.

Referenced by AdaBoostModel::Dimensionality().

◆ WeakLearnerType() [1/2]

size_t WeakLearnerType ( ) const
inline

Get the weak learner type.

Definition at line 76 of file adaboost_model.hpp.

◆ WeakLearnerType() [2/2]

size_t& WeakLearnerType ( )
inline

Modify the weak learner type.

Definition at line 78 of file adaboost_model.hpp.


The documentation for this class was generated from the following file:
  • /home/ryan/src/mlpack.org/_src/mlpack-git/src/mlpack/methods/adaboost/adaboost_model.hpp