KMeans strategy for classification. Step-by-step: More...
#include <KMeans.h>
Classes | |
class | Parameters |
Classifier Parameters. More... | |
Public Member Functions | |
bool | classify (TCLASSIFY &itBegin, TCLASSIFY &itEnd, const std::vector< unsigned int > &attributesIndices, std::vector< unsigned int > &classification, const bool enableProgressInterface) throw (te::cl::Exception) |
bool | initialize (const Parameters ¶ms) throw (te::cl::Exception) |
KMeans () | |
bool | train (TTRAIN &itBegin, TTRAIN &itEnd, const std::vector< unsigned int > &attributesIndices, const std::vector< unsigned int > &labels, const bool enableProgressInterface) throw (te::cl::Exception) |
~KMeans () | |
Protected Member Functions | |
unsigned int | getClassification (std::vector< double > values) |
Protected Attributes | |
bool | m_isInitialized |
True if this instance is initialized. More... | |
std::vector< std::vector< double > > | m_KMeans |
The vector of K means. More... | |
Parameters | m_parameters |
Internal execution parameters. More... | |
KMeans strategy for classification. Step-by-step:
te::cl::KMeans< TTRAIN, TCLASSIFY >::KMeans | ( | ) |
Definition at line 163 of file KMeans.h.
References te::cl::KMeans< TTRAIN, TCLASSIFY >::m_isInitialized, and te::cl::KMeans< TTRAIN, TCLASSIFY >::m_KMeans.
te::cl::KMeans< TTRAIN, TCLASSIFY >::~KMeans | ( | ) |
bool te::cl::KMeans< TTRAIN, TCLASSIFY >::classify | ( | TCLASSIFY & | itBegin, |
TCLASSIFY & | itEnd, | ||
const std::vector< unsigned int > & | attributesIndices, | ||
std::vector< unsigned int > & | classification, | ||
const bool | enableProgressInterface | ||
) | |||
throw | ( | te::cl::Exception | |
) |
Definition at line 304 of file KMeans.h.
References te::cl::KMeans< TTRAIN, TCLASSIFY >::getClassification(), te::common::TaskProgress::pulse(), TE_TR, and te::common::TaskProgress::UNDEFINED.
|
protected |
Definition at line 340 of file KMeans.h.
References te::cl::GetEuclideanDistance(), te::cl::KMeans< TTRAIN, TCLASSIFY >::Parameters::m_K, te::cl::KMeans< TTRAIN, TCLASSIFY >::m_KMeans, and te::cl::KMeans< TTRAIN, TCLASSIFY >::m_parameters.
Referenced by te::cl::KMeans< TTRAIN, TCLASSIFY >::classify(), and te::cl::KMeans< TTRAIN, TCLASSIFY >::train().
bool te::cl::KMeans< TTRAIN, TCLASSIFY >::initialize | ( | const Parameters & | params | ) | |
throw | ( | te::cl::Exception | |||
) |
Definition at line 175 of file KMeans.h.
References te::cl::KMeans< TTRAIN, TCLASSIFY >::Parameters::m_epsilon, te::cl::KMeans< TTRAIN, TCLASSIFY >::m_isInitialized, te::cl::KMeans< TTRAIN, TCLASSIFY >::Parameters::m_K, te::cl::KMeans< TTRAIN, TCLASSIFY >::m_KMeans, te::cl::KMeans< TTRAIN, TCLASSIFY >::Parameters::m_maxIterations, te::cl::KMeans< TTRAIN, TCLASSIFY >::m_parameters, and TE_TR.
bool te::cl::KMeans< TTRAIN, TCLASSIFY >::train | ( | TTRAIN & | itBegin, |
TTRAIN & | itEnd, | ||
const std::vector< unsigned int > & | attributesIndices, | ||
const std::vector< unsigned int > & | labels, | ||
const bool | enableProgressInterface | ||
) | |||
throw | ( | te::cl::Exception | |
) |
Definition at line 198 of file KMeans.h.
References te::cl::KMeans< TTRAIN, TCLASSIFY >::getClassification(), te::cl::KMeans< TTRAIN, TCLASSIFY >::Parameters::m_epsilon, te::cl::KMeans< TTRAIN, TCLASSIFY >::Parameters::m_K, te::cl::KMeans< TTRAIN, TCLASSIFY >::m_KMeans, te::cl::KMeans< TTRAIN, TCLASSIFY >::Parameters::m_maxIterations, te::cl::KMeans< TTRAIN, TCLASSIFY >::m_parameters, te::common::TaskProgress::pulse(), TE_TR, and te::common::TaskProgress::UNDEFINED.
|
protected |
True if this instance is initialized.
Definition at line 115 of file KMeans.h.
Referenced by te::cl::KMeans< TTRAIN, TCLASSIFY >::initialize(), and te::cl::KMeans< TTRAIN, TCLASSIFY >::KMeans().
|
protected |
The vector of K means.
Definition at line 116 of file KMeans.h.
Referenced by te::cl::KMeans< TTRAIN, TCLASSIFY >::getClassification(), te::cl::KMeans< TTRAIN, TCLASSIFY >::initialize(), te::cl::KMeans< TTRAIN, TCLASSIFY >::KMeans(), and te::cl::KMeans< TTRAIN, TCLASSIFY >::train().
|
protected |
Internal execution parameters.
Definition at line 117 of file KMeans.h.
Referenced by te::cl::KMeans< TTRAIN, TCLASSIFY >::getClassification(), te::cl::KMeans< TTRAIN, TCLASSIFY >::initialize(), and te::cl::KMeans< TTRAIN, TCLASSIFY >::train().