Direct Graphical Models
v.1.7.0
|
Base abstract class for triplet potential training. More...
#include <TrainTriplet.h>
Public Member Functions | |
CTrainTriplet (byte nStates, byte nFeatures) | |
~CTrainTriplet (void) | |
void | reset (void) |
Resets class variables. More... | |
void | train (bool doClean=false) |
Random model training. More... | |
Mat | getTripletPotentials (const Mat &featureVector1, const Mat &featureVector2, const Mat &featureVector3) const |
Public Member Functions inherited from DirectGraphicalModels::ITrain | |
ITrain (byte nStates, word nFeatures) | |
Constructor. More... | |
virtual | ~ITrain (void)=default |
word | getNumFeatures (void) const |
Returns number of features. More... | |
Public Member Functions inherited from DirectGraphicalModels::CBaseRandomModel | |
CBaseRandomModel (byte nStates) | |
Constructor. More... | |
virtual | ~CBaseRandomModel (void) |
virtual void | save (const std::string &path, const std::string &name=std::string(), short idx=-1) const |
Saves the training data. More... | |
virtual void | load (const std::string &path, const std::string &name=std::string(), short idx=-1) |
Loads the training data. More... | |
byte | getNumStates (void) const |
Returns number of states (classes) More... | |
Protected Member Functions | |
void | saveFile (FILE *pFile) const |
void | loadFile (FILE *pFile) |
void | calculateTripletPotentials (const Mat &featureVector1, const Mat &featureVector2, const Mat &featureVector3) const |
Protected Member Functions inherited from DirectGraphicalModels::CBaseRandomModel | |
std::string | generateFileName (const std::string &path, const std::string &name, short idx) const |
Generates name of the data file for storing random model parameters. More... | |
Additional Inherited Members | |
Protected Attributes inherited from DirectGraphicalModels::CBaseRandomModel | |
byte | m_nStates |
The number of states (classes) More... | |
Private Member Functions inherited from DirectGraphicalModels::CPriorTriplet | |
CPriorTriplet (byte nStates) | |
Constructor. More... | |
~CPriorTriplet (void) | |
void | addTripletGroundTruth (byte gt1, byte gt2, byte gt3) |
Adds the groud-truth value to the co-occurance histogram matrix. More... | |
Mat | calculatePrior (void) const |
Calculates the prior probabilies. More... | |
Private Member Functions inherited from DirectGraphicalModels::CPrior | |
CPrior (byte nStates, RandomModelType type) | |
Constructor. More... | |
~CPrior (void) | |
Mat | getPrior (float weight=1.0f) const |
Returns the prior probabilies. More... | |
Private Member Functions inherited from DirectGraphicalModels::CBaseRandomModel | |
CBaseRandomModel (byte nStates) | |
Constructor. More... | |
virtual | ~CBaseRandomModel (void) |
virtual void | save (const std::string &path, const std::string &name=std::string(), short idx=-1) const |
Saves the training data. More... | |
virtual void | load (const std::string &path, const std::string &name=std::string(), short idx=-1) |
Loads the training data. More... | |
byte | getNumStates (void) const |
Returns number of states (classes) More... | |
std::string | generateFileName (const std::string &path, const std::string &name, short idx) const |
Generates name of the data file for storing random model parameters. More... | |
Private Attributes inherited from DirectGraphicalModels::CPrior | |
Mat | m_histogramPrior |
The class cooccurance histogram. More... | |
Private Attributes inherited from DirectGraphicalModels::CBaseRandomModel | |
byte | m_nStates |
The number of states (classes) More... | |
Base abstract class for triplet potential training.
Definition at line 16 of file TrainTriplet.h.
|
inline |
Definition at line 19 of file TrainTriplet.h.
|
inline |
Definition at line 20 of file TrainTriplet.h.
|
protected |
Mat DirectGraphicalModels::CTrainTriplet::getTripletPotentials | ( | const Mat & | featureVector1, |
const Mat & | featureVector2, | ||
const Mat & | featureVector3 | ||
) | const |
|
inlineprotectedvirtual |
Implements DirectGraphicalModels::CBaseRandomModel.
Definition at line 41 of file TrainTriplet.h.
|
inlinevirtual |
Resets class variables.
Allows to re-use the class.
Implements DirectGraphicalModels::CBaseRandomModel.
Definition at line 22 of file TrainTriplet.h.
|
inlineprotectedvirtual |
Implements DirectGraphicalModels::CBaseRandomModel.
Definition at line 35 of file TrainTriplet.h.
|
inlinevirtual |
Random model training.
Auxilary function for training - some derived classes may use this function inbetween training and classification phases
doClean | Flag indicating if the memory, keeping the trining data should be released after training |
Implements DirectGraphicalModels::ITrain.
Definition at line 25 of file TrainTriplet.h.