te::cl::MaxLikelihood Class Reference

A maximum likelihood estimation strategy for classification (a.k.a. MaxVer in portuguese). More...

#include <MaxLikelihood.h>

Classes

class  Parameters
 Classifier Parameters. More...
 

Public Member Functions

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. More...
 
bool getCovMatrixes (std::vector< boost::numeric::ublas::matrix< double > > &covMatrixes) const
 Get the current classes covariance matrixes. More...
 
bool getInverseCovMatrixes (std::vector< boost::numeric::ublas::matrix< double > > &invCovMatrixes) const
 Get the current classes inverse covariance matrixes. More...
 
bool getLables (std::vector< unsigned int > &classLabels) const
 Get the current classes labels. More...
 
bool getMeans (std::vector< std::vector< double > > &classesMeans) const
 Get the current classes means. More...
 
bool initialize (const Parameters &params)
 Initialize this classifier instance with new parameters. More...
 
 MaxLikelihood ()
 
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. More...
 
 ~MaxLikelihood ()
 

Protected Member Functions

void reset ()
 Reset this instance to its initial state. More...
 

Protected Attributes

std::vector< boost::numeric::ublas::matrix< double > > m_classesCovarianceInvMatrixes
 Classes covariance inverse matrixes. More...
 
std::vector< boost::numeric::ublas::matrix< double > > m_classesCovarianceMatrixes
 Classes covariance matrixes. More...
 
std::vector< std::vector< double > > m_classesMeans
 Classes means;. More...
 
std::vector< double > m_classesOptizedMaxLikelihoodDiscriminantTerm
 An optimized portion of the MaxLikelihood discriminant function. More...
 
std::vector< unsigned int > m_classLabels
 class labels More...
 
bool m_isInitialized
 True if this instance is initialized. More...
 
Parameters m_parameters
 Internal execution parameters. More...
 

Detailed Description

A maximum likelihood estimation strategy for classification (a.k.a. MaxVer in portuguese).

Note
Reference: Erthal, G.J.; Frery, A.C. Segmentação de imagens multiespectrais pelo algoritmo ICM:integração ao ambiente SPRING. In: Simpósio Brasileiro de Computação Gráfica eProcessamento de Imagens-SIBGRAP, 6., Recife, 1993. Comunicações. Recife:SBC/UFPe, 1993. p. 33-36.

Definition at line 55 of file MaxLikelihood.h.

Constructor & Destructor Documentation

◆ MaxLikelihood()

te::cl::MaxLikelihood::MaxLikelihood ( )

◆ ~MaxLikelihood()

te::cl::MaxLikelihood::~MaxLikelihood ( )

Member Function Documentation

◆ classify()

bool te::cl::MaxLikelihood::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.

Parameters
inputInput data to be classified.
attributesIndicesThe attributes indexes to processe from the iterated train data.
inputNoDataValuesA vector of no-data values for each attribute dimension or an empty vector if no-data values are not used.
outputOutput classified data.
outputIndexThe output attribute index.
outputNoDataValueA output label value to use when dealing with input no-data.
enableProgressInterfaceEnable/disable the use of a proress interfece.

◆ getCovMatrixes()

bool te::cl::MaxLikelihood::getCovMatrixes ( std::vector< boost::numeric::ublas::matrix< double > > &  covMatrixes) const

Get the current classes covariance matrixes.

Parameters
covMatrixesA vector to return the current classes covariance matrixes.
Returns
true if ok, false on errors.

◆ getInverseCovMatrixes()

bool te::cl::MaxLikelihood::getInverseCovMatrixes ( std::vector< boost::numeric::ublas::matrix< double > > &  invCovMatrixes) const

Get the current classes inverse covariance matrixes.

Parameters
invCovMatrixesA vector to return the current classes inverse covariance matrixes.
Returns
true if ok, false on errors.

◆ getLables()

bool te::cl::MaxLikelihood::getLables ( std::vector< unsigned int > &  classLabels) const

Get the current classes labels.

Parameters
classesMeansA vector to return the current classes labels.
Returns
true if ok, false on errors.

◆ getMeans()

bool te::cl::MaxLikelihood::getMeans ( std::vector< std::vector< double > > &  classesMeans) const

Get the current classes means.

Parameters
classesMeansA vector to return the current classes means.
Returns
true if ok, false on errors.

◆ initialize()

bool te::cl::MaxLikelihood::initialize ( const Parameters params)

Initialize this classifier instance with new parameters.

Parameters
paramsNew initialization parameters.

◆ reset()

void te::cl::MaxLikelihood::reset ( )
protected

Reset this instance to its initial state.

◆ train()

bool te::cl::MaxLikelihood::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.

Parameters
samplesTrain data samples.
attributesIndicesThe attributes indexes to processe from the iterated train data.
sampleLabelsThe sample lables for each iterated train data element.
enableProgressInterfaceEnable/disable the use of a proress interfece.

Member Data Documentation

◆ m_classesCovarianceInvMatrixes

std::vector< boost::numeric::ublas::matrix< double > > te::cl::MaxLikelihood::m_classesCovarianceInvMatrixes
protected

Classes covariance inverse matrixes.

Definition at line 157 of file MaxLikelihood.h.

◆ m_classesCovarianceMatrixes

std::vector< boost::numeric::ublas::matrix< double > > te::cl::MaxLikelihood::m_classesCovarianceMatrixes
protected

Classes covariance matrixes.

Definition at line 156 of file MaxLikelihood.h.

◆ m_classesMeans

std::vector< std::vector< double > > te::cl::MaxLikelihood::m_classesMeans
protected

Classes means;.

Definition at line 155 of file MaxLikelihood.h.

◆ m_classesOptizedMaxLikelihoodDiscriminantTerm

std::vector< double > te::cl::MaxLikelihood::m_classesOptizedMaxLikelihoodDiscriminantTerm
protected

An optimized portion of the MaxLikelihood discriminant function.

Definition at line 159 of file MaxLikelihood.h.

◆ m_classLabels

std::vector<unsigned int> te::cl::MaxLikelihood::m_classLabels
protected

class labels

Definition at line 158 of file MaxLikelihood.h.

◆ m_isInitialized

bool te::cl::MaxLikelihood::m_isInitialized
protected

True if this instance is initialized.

Definition at line 153 of file MaxLikelihood.h.

◆ m_parameters

Parameters te::cl::MaxLikelihood::m_parameters
protected

Internal execution parameters.

Definition at line 154 of file MaxLikelihood.h.


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