31 #ifndef GRT_CLUSTER_TREE_HEADER
32 #define GRT_CLUSTER_TREE_HEADER
34 #include "../../CoreModules/Clusterer.h"
35 #include "../../CoreAlgorithms/Tree/Tree.h"
54 ClusterTree(
const UINT numSplittingSteps=100,
const UINT minNumSamplesPerNode=5,
const UINT maxDepth=10,
const bool removeFeaturesAtEachSpilt =
false,
const UINT trainingMode = BEST_ITERATIVE_SPILT,
const bool useScaling=
false,
const Float minRMSErrorPerNode = 0.01);
109 virtual bool clear();
116 virtual bool print()
const;
182 Float minRMSErrorPerNode;
185 bool computeBestSpilt(
const MatrixFloat &trainingData,
const Vector< UINT > &features, UINT &featureIndex, Float &threshold, Float &minError );
186 bool computeBestSpiltBestIterativeSpilt(
const MatrixFloat &trainingData,
const Vector< UINT > &features, UINT &featureIndex, Float &threshold, Float &minError );
187 bool computeBestSpiltBestRandomSpilt(
const MatrixFloat &trainingData,
const Vector< UINT > &features, UINT &featureIndex, Float &threshold, Float &minError );
195 #endif //GRT_CLUSTER_TREE_HEADER
const ClusterTreeNode * getTree() const
virtual bool predict(VectorFloat inputVector)
virtual bool train_(MatrixFloat &trainingData)
bool setMinRMSErrorPerNode(const Float minRMSErrorPerNode)
virtual ~ClusterTree(void)
virtual bool saveModelToFile(std::fstream &file) const
virtual bool train(ClassificationData trainingData)
ClusterTreeNode * deepCopyTree() const
This file implements a ClusterTreeNode, which is a specific type of node used for a ClusterTree...
virtual bool saveModelToFile(std::string filename) const
ClusterTree & operator=(const ClusterTree &rhs)
virtual bool loadModelFromFile(std::string filename)
virtual bool deepCopyFrom(const Clusterer *cluster)
virtual bool predict_(VectorFloat &inputVector)
virtual bool print() const
virtual bool loadModelFromFile(std::fstream &file)
ClusterTree(const UINT numSplittingSteps=100, const UINT minNumSamplesPerNode=5, const UINT maxDepth=10, const bool removeFeaturesAtEachSpilt=false, const UINT trainingMode=BEST_ITERATIVE_SPILT, const bool useScaling=false, const Float minRMSErrorPerNode=0.01)
UINT getPredictedClusterLabel() const
Float getMinRMSErrorPerNode() const