te::cl::MAP Class Reference

MAP strategy for classification. More...

#include <MAP.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 double outputNoDataValue, const bool enableProgressInterface) throw (te::cl::Exception)
 Classify an input iterated data and save the result on the output iterated data. More...
 
bool initialize (const Parameters &params) throw (te::cl::Exception)
 Initialize this classifier instance with new parameters. More...
 
 MAP ()
 
bool train (const InputAdaptor< double > &samples, const std::vector< unsigned int > &attributesIndices, const std::vector< unsigned int > &sampleLabels, const bool enableProgressInterface) throw (te::cl::Exception)
 Train this classifier instance using the initialization parameters and the suppied train data. More...
 
 ~MAP ()
 

Protected Member Functions

bool getPrioriProbabilities (const InputAdaptor< double > &input, const std::vector< unsigned int > &attributesIndices, std::vector< double > &prioriProbs) const
 Calculate priori probabilities by pre-classifying the input data. More...
 
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_classesOptizedMAPDiscriminantTerm
 An optimized portion of the MAP 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

MAP strategy for classification.

Definition at line 54 of file MAP.h.

Constructor & Destructor Documentation

te::cl::MAP::MAP ( )
te::cl::MAP::~MAP ( )

Member Function Documentation

bool te::cl::MAP::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 double  outputNoDataValue,
const bool  enableProgressInterface 
)
throw (te::cl::Exception
)

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.
bool te::cl::MAP::getPrioriProbabilities ( const InputAdaptor< double > &  input,
const std::vector< unsigned int > &  attributesIndices,
std::vector< double > &  prioriProbs 
) const
protected

Calculate priori probabilities by pre-classifying the input data.

Parameters
inputInput data to be classified.
attributesIndicesThe attributes indexes to processe from the iterated train data.
prioriProbsCalculated priori-probabilities.
bool te::cl::MAP::initialize ( const Parameters params)
throw (te::cl::Exception
)

Initialize this classifier instance with new parameters.

Parameters
paramsNew initialization parameters.
void te::cl::MAP::reset ( )
protected

Reset this instance to its initial state.

bool te::cl::MAP::train ( const InputAdaptor< double > &  samples,
const std::vector< unsigned int > &  attributesIndices,
const std::vector< unsigned int > &  sampleLabels,
const bool  enableProgressInterface 
)
throw (te::cl::Exception
)

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

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

Classes covariance inverse matrixes.

Definition at line 131 of file MAP.h.

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

Classes covariance matrixes.

Definition at line 130 of file MAP.h.

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

Classes means;.

Definition at line 129 of file MAP.h.

std::vector< double > te::cl::MAP::m_classesOptizedMAPDiscriminantTerm
protected

An optimized portion of the MAP discriminant function.

Definition at line 133 of file MAP.h.

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

class labels

Definition at line 132 of file MAP.h.

bool te::cl::MAP::m_isInitialized
protected

True if this instance is initialized.

Definition at line 127 of file MAP.h.

Parameters te::cl::MAP::m_parameters
protected

Internal execution parameters.

Definition at line 128 of file MAP.h.


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