31 #ifndef GRT_POST_PROCESSING_HEADER
32 #define GRT_POST_PROCESSING_HEADER
73 virtual bool process(
const VectorDouble &inputVector){
return false; }
81 virtual bool reset(){
return true; }
198 enum PostprocessingInputModes{INPUT_MODE_NOT_SET=0,INPUT_MODE_PREDICTED_CLASS_LABEL,INPUT_MODE_CLASS_LIKELIHOODS};
199 enum PostprocessingOutputModes{OUTPUT_MODE_NOT_SET=0,OUTPUT_MODE_PREDICTED_CLASS_LABEL,OUTPUT_MODE_CLASS_LIKELIHOODS};
224 string postProcessingType;
226 UINT postProcessingInputMode;
227 UINT postProcessingOutputMode;
228 VectorDouble processedData;
230 static StringPostProcessingMap *getMap() {
232 return stringPostProcessingMap;
236 static StringPostProcessingMap *stringPostProcessingMap;
237 static UINT numPostProcessingInstances;
242 template<
typename T > PostProcessing *newPostProcessingModuleInstance() {
return new T; }
244 template<
typename T >
248 getMap()->insert( std::pair<
string,
PostProcessing*(*)()>(newPostProcessingModuleName, &newPostProcessingModuleInstance< T > ) );
254 #endif //GRT_POST_PROCESSING_HEADER
bool getInitialized() const
UINT getPostProcessingOutputMode() const
virtual bool loadModelFromFile(string filename)
string getPostProcessingType() const
bool savePostProcessingSettingsToFile(fstream &file) const
virtual ~PostProcessing(void)
bool getIsPostProcessingOutputModePredictedClassLabel() const
VectorDouble getProcessedData() const
virtual bool process(const VectorDouble &inputVector)
bool getIsPostProcessingInputModePredictedClassLabel() const
bool getIsPostProcessingOutputModeClassLikelihoods() const
This is the main base class that all GRT machine learning algorithms should inherit from...
bool getIsPostProcessingInputModeClassLikelihoods() const
virtual bool saveModelToFile(fstream &file) const
bool loadPostProcessingSettingsFromFile(fstream &file)
virtual bool loadModelFromFile(fstream &file)
static PostProcessing * createInstanceFromString(string const &postProcessingType)
UINT getNumOutputDimensions() const
UINT getNumInputDimensions() const
PostProcessing * createNewInstance() const
virtual bool saveModelToFile(string filename) const
bool copyBaseVariables(const PostProcessing *postProcessingModule)
UINT getPostProcessingInputMode() const
std::map< string, PostProcessing *(*)() > StringPostProcessingMap
virtual bool deepCopyFrom(const PostProcessing *postProcessing)