Direct Graphical Models  v.1.7.0
TrainTriplet.h
1 // Base abstract class for random model triplets training
2 // Written by Sergey G. Kosov in 2015 for Project X
3 #pragma once
4 
5 #include "ITrain.h"
6 #include "PriorTriplet.h"
7 #include "macroses.h" // For DGM_WARNING
8 
9 namespace DirectGraphicalModels
10 {
11  // ============================= Triplet Train Class =============================
16  class CTrainTriplet : public ITrain, private CPriorTriplet
17  {
18  public:
19  DllExport CTrainTriplet(byte nStates, byte nFeatures) : CBaseRandomModel(nStates), ITrain(nStates, nFeatures), CPriorTriplet(nStates) {}
20  DllExport ~CTrainTriplet(void) {}
21 
22  DllExport void reset(void) {CPriorTriplet::reset(); }
23 
24 
25  DllExport void train(bool doClean = false) {}
26 
27  DllExport Mat getTripletPotentials(const Mat &featureVector1, const Mat &featureVector2, const Mat &featureVector3) const;
28 
29 
30  protected:
35  DllExport void saveFile(FILE *pFile) const
36  { DGM_WARNING("Save function is not implemented yet!"); }
41  DllExport void loadFile(FILE *pFile)
42  { DGM_WARNING("Load function is not implemented yet!"); }
43 
44  DllExport void calculateTripletPotentials(const Mat &featureVector1, const Mat &featureVector2, const Mat &featureVector3) const;
45  };
46 }
void train(bool doClean=false)
Random model training.
Definition: TrainTriplet.h:25
Triplet prior probability estimation class.
Definition: PriorTriplet.h:14
void saveFile(FILE *pFile) const
Definition: TrainTriplet.h:35
Mat getTripletPotentials(const Mat &featureVector1, const Mat &featureVector2, const Mat &featureVector3) const
Definition: TrainTriplet.cpp:6
Base abstract class for triplet potential training.
Definition: TrainTriplet.h:16
Base abstract class for random model training.
void reset(void)
Resets class variables.
Definition: Prior.cpp:19
void calculateTripletPotentials(const Mat &featureVector1, const Mat &featureVector2, const Mat &featureVector3) const
void reset(void)
Resets class variables.
Definition: TrainTriplet.h:22
Interface class for random model training.
Definition: ITrain.h:15
CTrainTriplet(byte nStates, byte nFeatures)
Definition: TrainTriplet.h:19