mlpack  3.4.2
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Types | Public Member Functions | List of all members
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...
 
template<typename Archive >
void serialize (Archive &ar, const unsigned int)
 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

Enumerator
DECISION_STUMP 
PERCEPTRON 

Definition at line 29 of file adaboost_model.hpp.

Constructor & Destructor Documentation

Create an empty AdaBoost model.

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

Create the AdaBoost model with the given mappings and type.

AdaBoostModel ( const AdaBoostModel other)

Copy constructor.

Move constructor.

Clean up memory.

Member Function Documentation

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

Classify test points.

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

Classify test points.

size_t Dimensionality ( ) const
inline

Get the dimensionality of the model.

Definition at line 78 of file adaboost_model.hpp.

size_t& Dimensionality ( )
inline

Modify the dimensionality of the model.

Definition at line 80 of file adaboost_model.hpp.

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

Get the mappings.

Definition at line 68 of file adaboost_model.hpp.

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

Modify the mappings.

Definition at line 70 of file adaboost_model.hpp.

AdaBoostModel& operator= ( const AdaBoostModel other)

Copy assignment operator.

void serialize ( Archive &  ar,
const unsigned  int 
)
inline

Serialize the model.

Definition at line 100 of file adaboost_model.hpp.

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.

size_t WeakLearnerType ( ) const
inline

Get the weak learner type.

Definition at line 73 of file adaboost_model.hpp.

size_t& WeakLearnerType ( )
inline

Modify the weak learner type.

Definition at line 75 of file adaboost_model.hpp.


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