31 #ifndef GRT_CLASSIFIER_HEADER
32 #define GRT_CLASSIFIER_HEADER
38 #define DEFAULT_NULL_LIKELIHOOD_VALUE 0
39 #define DEFAULT_NULL_DISTANCE_VALUE 0
310 std::string classifierType;
311 bool supportsNullRejection;
312 bool useNullRejection;
314 UINT predictedClassLabel;
316 Float nullRejectionCoeff;
326 static StringClassifierMap *getMap() {
328 return stringClassifierMap;
331 enum ClassifierModes{STANDARD_CLASSIFIER_MODE=0,TIMESERIES_CLASSIFIER_MODE};
334 static StringClassifierMap *stringClassifierMap;
335 static UINT numClassifierInstances;
340 template<
typename T >
Classifier* getNewClassificationModuleInstance() {
return new T; }
342 template<
typename T >
346 getMap()->insert( std::pair< std::string,
Classifier*(*)() >(newClassificationModuleName, &getNewClassificationModuleInstance< T > ) );
352 #endif //GRT_CLASSIFIER_HEADER
bool saveBaseSettingsToFile(std::fstream &file) const
virtual bool recomputeNullRejectionThresholds()
Classifier * deepCopy() const
Vector< UINT > getClassLabels() const
Vector< MinMax > getRanges() const
VectorFloat getNullRejectionThresholds() const
std::string getClassifierType() const
virtual UINT getNumClasses() const
bool getTimeseriesCompatible() const
const Classifier * getClassifierPointer() const
UINT getClassLabelIndexValue(UINT classLabel) const
Float getNullRejectionCoeff() const
virtual bool deepCopyFrom(const Classifier *classifier)
bool getSupportsNullRejection() const
This is the main base class that all GRT machine learning algorithms should inherit from...
virtual bool setNullRejectionThresholds(VectorFloat newRejectionThresholds)
bool getNullRejectionEnabled() const
UINT getPredictedClassLabel() const
Float getBestDistance() const
static Classifier * createInstanceFromString(std::string const &classifierType)
bool copyBaseVariables(const Classifier *classifier)
virtual ~Classifier(void)
bool loadBaseSettingsFromFile(std::fstream &file)
Float getMaximumLikelihood() const
virtual bool setNullRejectionCoeff(Float nullRejectionCoeff)
VectorFloat getClassDistances() const
static Vector< std::string > getRegisteredClassifiers()
VectorFloat getClassLikelihoods() const
std::map< std::string, Classifier *(*)() > StringClassifierMap
bool enableNullRejection(bool useNullRejection)
Classifier * createNewInstance() const
const Classifier & getBaseClassifier() const