|
mlpack
master
|
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... | |
| 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... | |
| AdaBoostModel & | operator= (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 iterations, const double tolerance) |
| Train the model. More... | |
| size_t | WeakLearnerType () const |
| Get the weak learner type. More... | |
| size_t & | WeakLearnerType () |
| Modify the weak learner type. More... | |
Private Attributes | |
| size_t | dimensionality |
| Number of dimensions in training data. More... | |
| AdaBoost< decision_stump::DecisionStump<> > * | dsBoost |
| Non-NULL if using decision stumps. More... | |
| arma::Col< size_t > | mappings |
| The mappings for the labels. More... | |
| AdaBoost< perceptron::Perceptron<> > * | pBoost |
| Non-NULL if using perceptrons. More... | |
| size_t | weakLearnerType |
| The type of weak learner. More... | |
The model to save to disk.
Definition at line 19 of file adaboost_model.hpp.
| Enumerator | |
|---|---|
| DECISION_STUMP | |
| PERCEPTRON | |
Definition at line 22 of file adaboost_model.hpp.
| mlpack::adaboost::AdaBoostModel::AdaBoostModel | ( | ) |
Create an empty AdaBoost model.
| mlpack::adaboost::AdaBoostModel::AdaBoostModel | ( | const arma::Col< size_t > & | mappings, |
| const size_t | weakLearnerType | ||
| ) |
Create the AdaBoost model with the given mappings and type.
| mlpack::adaboost::AdaBoostModel::AdaBoostModel | ( | const AdaBoostModel & | other | ) |
Copy constructor.
| mlpack::adaboost::AdaBoostModel::AdaBoostModel | ( | AdaBoostModel && | other | ) |
Move constructor.
| mlpack::adaboost::AdaBoostModel::~AdaBoostModel | ( | ) |
Clean up memory.
| void mlpack::adaboost::AdaBoostModel::Classify | ( | const arma::mat & | testData, |
| arma::Row< size_t > & | predictions | ||
| ) |
Classify test points.
Referenced by Dimensionality().
|
inline |
Get the dimensionality of the model.
Definition at line 71 of file adaboost_model.hpp.
References dimensionality.
|
inline |
Modify the dimensionality of the model.
Definition at line 73 of file adaboost_model.hpp.
References Classify(), dimensionality, and Train().
|
inline |
|
inline |
| AdaBoostModel& mlpack::adaboost::AdaBoostModel::operator= | ( | const AdaBoostModel & | other | ) |
Copy assignment operator.
|
inline |
Serialize the model.
Definition at line 86 of file adaboost_model.hpp.
References mlpack::data::CreateNVP(), dsBoost, and pBoost.
| void mlpack::adaboost::AdaBoostModel::Train | ( | const arma::mat & | data, |
| const arma::Row< size_t > & | labels, | ||
| const size_t | iterations, | ||
| const double | tolerance | ||
| ) |
Train the model.
Referenced by Dimensionality().
|
inline |
Get the weak learner type.
Definition at line 66 of file adaboost_model.hpp.
References weakLearnerType.
|
inline |
Modify the weak learner type.
Definition at line 68 of file adaboost_model.hpp.
References weakLearnerType.
|
private |
Number of dimensions in training data.
Definition at line 38 of file adaboost_model.hpp.
Referenced by Dimensionality().
|
private |
Non-NULL if using decision stumps.
Definition at line 34 of file adaboost_model.hpp.
Referenced by Serialize().
|
private |
The mappings for the labels.
Definition at line 30 of file adaboost_model.hpp.
Referenced by Mappings().
|
private |
Non-NULL if using perceptrons.
Definition at line 36 of file adaboost_model.hpp.
Referenced by Serialize().
|
private |
The type of weak learner.
Definition at line 32 of file adaboost_model.hpp.
Referenced by WeakLearnerType().
1.8.11