Definition at line 40 of file WeakClassifier.h.
GRT::WeakClassifier::WeakClassifier |
( |
| ) |
|
GRT::WeakClassifier::~WeakClassifier |
( |
| ) |
|
|
virtual |
Copy Constructor. Defines how the data from the rhs instance are copied to this instance.
- Parameters
-
const | WeakClassifier &rhs: the rhs instance from which the data will be copied to this instance |
Definition at line 57 of file WeakClassifier.h.
bool GRT::WeakClassifier::copyBaseVariables |
( |
const WeakClassifier * |
weakClassifer | ) |
|
This function copies the WeakClassifier base variables from the weakClassifer pointer to this instance.
- Parameters
-
const | WeakClassifier *weakClassifer: the instance from which the data will be copied to this instance |
- Returns
- returns true if the base variables were copied, false otherwise
Definition at line 70 of file WeakClassifier.cpp.
WeakClassifier * GRT::WeakClassifier::createInstanceFromString |
( |
string const & |
weakClassifierType | ) |
|
|
static |
virtual bool GRT::WeakClassifier::deepCopyFrom |
( |
const WeakClassifier * |
weakClassifer | ) |
|
|
inlinevirtual |
This function performs a deep copy of the inherited classes variables from the weakClassifer pointer instance to this instance. This function should be overwritten in the inheriting class.
- Parameters
-
const | WeakClassifier *weakClassifer: the instance from which the data will be deep copied to this instance |
- Returns
- returns true if the deep copy was successful, false otherwise
Reimplemented in GRT::RadialBasisFunction, and GRT::DecisionStump.
Definition at line 84 of file WeakClassifier.h.
virtual double GRT::WeakClassifier::getNegativeClassLabel |
( |
| ) |
const |
|
inlinevirtual |
UINT GRT::WeakClassifier::getNumInputDimensions |
( |
| ) |
const |
|
inline |
virtual double GRT::WeakClassifier::getPositiveClassLabel |
( |
| ) |
const |
|
inlinevirtual |
bool GRT::WeakClassifier::getTrained |
( |
| ) |
const |
|
inline |
string GRT::WeakClassifier::getWeakClassifierType |
( |
| ) |
const |
|
inline |
virtual bool GRT::WeakClassifier::loadModelFromFile |
( |
fstream & |
file | ) |
|
|
inlinevirtual |
This function can be used to load the WeakClassifier model and settings. This function should be overwritten in the inheriting class.
- Parameters
-
fstream | &file: a reference to the file that the model will be saved to |
- Returns
- returns true if the data was loaded, false otherwise
Reimplemented in GRT::RadialBasisFunction, and GRT::DecisionStump.
Definition at line 127 of file WeakClassifier.h.
Equals Operator. Defines how the data from the rhs instance are copied to this instance.
- Parameters
-
const | WeakClassifier &rhs: the rhs instance from which the data will be copied to this instance |
- Returns
- returns a reference to this WeakClassifier instance
Definition at line 58 of file WeakClassifier.cpp.
virtual double GRT::WeakClassifier::predict |
( |
const VectorDouble & |
x | ) |
|
|
inlinevirtual |
This function is the main predict interface for all the WeakClassifiers. This function should be overwritten in the inheriting class.
- Parameters
-
const | VectorDouble &x: the input vector to be classified, should have the same dimensionality as the data used to train the model |
- Returns
- returns a double value representing the prediction, which is normally -1 or +1
Reimplemented in GRT::RadialBasisFunction, and GRT::DecisionStump.
Definition at line 107 of file WeakClassifier.h.
virtual void GRT::WeakClassifier::print |
( |
| ) |
const |
|
inlinevirtual |
virtual bool GRT::WeakClassifier::saveModelToFile |
( |
fstream & |
file | ) |
const |
|
inlinevirtual |
This function can be used to save the WeakClassifier model and settings. This function should be overwritten in the inheriting class.
- Parameters
-
fstream | &file: a reference to the file that the model will be saved to |
- Returns
- returns true if the data was saved, false otherwise
Reimplemented in GRT::RadialBasisFunction, and GRT::DecisionStump.
Definition at line 118 of file WeakClassifier.h.
virtual bool GRT::WeakClassifier::train |
( |
ClassificationData & |
trainingData, |
|
|
VectorDouble & |
weights |
|
) |
| |
|
inlinevirtual |
This function is the main training interface for all the WeakClassifiers. This function should be overwritten in the inheriting class.
- Parameters
-
ClassificationData | &trainingData: a reference to the training data that will be used to train the weak classifier model |
VectorDouble | &weights: the weight for each training sample, there should be as many weights as there are training samples |
- Returns
- returns true if the weak classifier model was trained successful, false otherwise
Reimplemented in GRT::RadialBasisFunction, and GRT::DecisionStump.
Definition at line 96 of file WeakClassifier.h.
The documentation for this class was generated from the following files:
- /Users/ngillian/Documents/dev/libs/grt/GRT/ClassificationModules/AdaBoost/WeakClassifiers/WeakClassifier.h
- /Users/ngillian/Documents/dev/libs/grt/GRT/ClassificationModules/AdaBoost/WeakClassifiers/WeakClassifier.cpp