31 #ifndef GRT_CLUSTERER_HEADER
32 #define GRT_CLUSTERER_HEADER
105 virtual bool clear();
248 string clustererType;
251 double maxLikelihood;
253 VectorDouble clusterLikelihoods;
254 VectorDouble clusterDistances;
255 vector< UINT > clusterLabels;
257 vector<MinMax> ranges;
259 static StringClustererMap *getMap() {
261 return stringClustererMap;
265 static StringClustererMap *stringClustererMap;
266 static UINT numClustererInstances;
271 template<
typename T > Clusterer* getNewClassificationModuleInstance() {
return new T; }
273 template<
typename T >
277 getMap()->insert( std::pair<
string,
Clusterer*(*)()>(newClassificationModuleName, &getNewClassificationModuleInstance< T > ) );
283 #endif //GRT_CLUSTERER_HEADER
double getBestDistance() const
bool loadClustererSettingsFromFile(fstream &file)
double getMaximumLikelihood() const
Clusterer * createNewInstance() const
UINT numClusters
Number of clusters in the model.
virtual bool train(ClassificationData trainingData)
bool saveClustererSettingsToFile(fstream &file) const
vector< UINT > getClusterLabels() const
bool setNumClusters(const UINT numClusters)
static Clusterer * createInstanceFromString(string const &ClustererType)
bool copyBaseVariables(const Clusterer *Clusterer)
bool getConverged() const
Clusterer * deepCopy() const
This is the main base class that all GRT machine learning algorithms should inherit from...
std::map< string, Clusterer *(*)() > StringClustererMap
VectorDouble getClusterLikelihoods() const
string getClustererType() const
virtual bool deepCopyFrom(const Clusterer *Clusterer)
virtual bool train_(MatrixDouble &trainingData)
static vector< string > getRegisteredClusterers()
const Clusterer & getBaseClusterer() const
VectorDouble getClusterDistances() const
UINT getPredictedClusterLabel() const
UINT getNumClusters() const
UINT predictedClusterLabel
Stores the predicted cluster label from the most recent predict( )