Direct Graphical Models  v.1.7.0
ITrain.h
1 // Interface class for random model training
2 // Written by Sergey G. Kosov in 2012 for Project X
3 #pragma once
4 
5 #include "BaseRandomModel.h"
6 
7 namespace DirectGraphicalModels
8 {
9  // ================================ Train Class ================================
15  class ITrain : public virtual CBaseRandomModel
16  {
17  public:
23  DllExport ITrain(byte nStates, word nFeatures) : CBaseRandomModel(nStates), m_nFeatures(nFeatures) {}
24  DllExport virtual ~ITrain(void) = default;
25 
32  DllExport virtual void train(bool doClean = false) = 0;
37  DllExport word getNumFeatures(void) const { return m_nFeatures; }
38 
39 
40  private:
41  word m_nFeatures;
42  };
43 
44 
45 
46 }
47 
word getNumFeatures(void) const
Returns number of features.
Definition: ITrain.h:37
word m_nFeatures
The number of features (length of the feature vector)
Definition: ITrain.h:41
virtual ~ITrain(void)=default
Base abstract class for random model training.
ITrain(byte nStates, word nFeatures)
Constructor.
Definition: ITrain.h:23
virtual void train(bool doClean=false)=0
Random model training.
Interface class for random model training.
Definition: ITrain.h:15