26 #ifndef __TERRALIB_CLASSIFICATION_INTERNAL_MAXLIKELIHOOD_H
27 #define __TERRALIB_CLASSIFICATION_INTERNAL_MAXLIKELIHOOD_H
30 #include "../common/AbstractParameters.h"
31 #include "../common/MatrixUtils.h"
32 #include "../common/progress/TaskProgress.h"
42 #include <boost/numeric/ublas/matrix.hpp>
78 AbstractParameters*
clone()
const;
101 const std::vector<unsigned int>& attributesIndices,
102 const std::vector<unsigned int>& sampleLabels,
103 const bool enableProgressInterface);
116 const std::vector<unsigned int>& attributesIndices,
117 const std::vector< double >& inputNoDataValues,
119 const unsigned int outputIndex,
120 const unsigned int outputNoDataValue,
121 const bool enableProgressInterface);
128 bool getCovMatrixes( std::vector< boost::numeric::ublas::matrix< double > >& covMatrixes )
const;
142 bool getMeans( std::vector< std::vector< double > >& classesMeans )
const;
149 bool getLables( std::vector<unsigned int>& classLabels )
const;
const Parameters & operator=(const Parameters ¶ms)
AbstractParameters * clone() const
Create a clone copy of this instance.
void reset()
Clear all internal allocated resources and reset the parameters instance to its initial state.
A maximum likelihood estimation strategy for classification (a.k.a. MaxVer in portuguese).
bool getLables(std::vector< unsigned int > &classLabels) const
Get the current classes labels.
Parameters m_parameters
Internal execution parameters.
std::vector< boost::numeric::ublas::matrix< double > > m_classesCovarianceInvMatrixes
Classes covariance inverse matrixes.
bool getCovMatrixes(std::vector< boost::numeric::ublas::matrix< double > > &covMatrixes) const
Get the current classes covariance matrixes.
bool m_isInitialized
True if this instance is initialized.
bool train(const InputAdaptor< double > &samples, const std::vector< unsigned int > &attributesIndices, const std::vector< unsigned int > &sampleLabels, const bool enableProgressInterface)
Train this classifier instance using the initialization parameters and the suppied train data.
bool initialize(const Parameters ¶ms)
Initialize this classifier instance with new parameters.
std::vector< unsigned int > m_classLabels
class labels
void reset()
Reset this instance to its initial state.
bool getMeans(std::vector< std::vector< double > > &classesMeans) const
Get the current classes means.
bool getInverseCovMatrixes(std::vector< boost::numeric::ublas::matrix< double > > &invCovMatrixes) const
Get the current classes inverse covariance matrixes.
std::vector< double > m_classesOptizedMaxLikelihoodDiscriminantTerm
An optimized portion of the MaxLikelihood discriminant function.
std::vector< std::vector< double > > m_classesMeans
Classes means;.
bool classify(const InputAdaptor< double > &input, const std::vector< unsigned int > &attributesIndices, const std::vector< double > &inputNoDataValues, OutputAdaptor< unsigned int > &output, const unsigned int outputIndex, const unsigned int outputNoDataValue, const bool enableProgressInterface)
Classify an input iterated data and save the result on the output iterated data.
std::vector< boost::numeric::ublas::matrix< double > > m_classesCovarianceMatrixes
Classes covariance matrixes.
Classifiers output data adaptor.
Abstract parameters base interface.
#define TECLEXPORT
You can use this macro in order to export/import classes and functions from this module.
Proxy configuration file for TerraView (see terraview_config.h).
An exception class for the XML module.