31 #ifndef GRT_CLUSTERER_HEADER
32 #define GRT_CLUSTERER_HEADER
105 virtual bool clear();
248 std::string clustererType;
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< std::string,
Clusterer*(*)() >(newClassificationModuleName, &getNewClassificationModuleInstance< T > ) );
283 #endif //GRT_CLUSTERER_HEADER
VectorFloat getClusterLikelihoods() const
std::string getClustererType() const
virtual bool train(ClassificationData trainingData)
virtual bool deepCopyFrom(const Clusterer *clusterer)
bool copyBaseVariables(const Clusterer *clusterer)
bool loadClustererSettingsFromFile(std::fstream &file)
std::map< std::string, Clusterer *(*)() > StringClustererMap
This is the main base class that all GRT machine learning algorithms should inherit from...
UINT predictedClusterLabel
Stores the predicted cluster label from the most recent predict( )
Vector< UINT > getClusterLabels() const
const Clusterer & getBaseClusterer() const
Clusterer * deepCopy() const
bool saveClustererSettingsToFile(std::fstream &file) const
UINT numClusters
Number of clusters in the model.
UINT getPredictedClusterLabel() const
Float getBestDistance() const
bool getConverged() const
UINT getNumClusters() const
virtual bool train_(MatrixFloat &trainingData)
static Vector< std::string > getRegisteredClusterers()
static Clusterer * createInstanceFromString(std::string const &ClustererType)
VectorFloat getClusterDistances() const
Float getMaximumLikelihood() const
bool setNumClusters(const UINT numClusters)
Clusterer * createNewInstance() const