CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
MLP.h
Go to the documentation of this file.
1 #ifndef __private_MLP_h
2 #define __private_MLP_h
3 
4 namespace PhysicsTools {
5 
6 class MLP {
7  public:
8  MLP(unsigned int nIn, unsigned int nOut, const std::string layout);
9  ~MLP();
10 
11  void clear();
12  void init(unsigned int rows);
13  void set(unsigned int row, double *data, double *target, double weight = 1.0);
14  double train();
15  const double *eval(double *data) const;
16  void save(const std::string file) const;
17  void load(const std::string file);
18 
19  inline unsigned int getEpoch() const { return epoch; }
20  inline int getLayers() const { return layers; }
21  inline const int *getLayout() const { return layout; }
22 
23  private:
24  void setLearn(void);
25  void setNPattern(unsigned int size);
26 
28  int layers;
29  int *layout;
30 
31  unsigned int epoch;
32  static bool inUse;
33 };
34 
35 } // namespace PhysicsTools
36 
37 #endif // _private_MLP_h
const double * eval(double *data) const
Definition: MLP.cc:147
void setNPattern(unsigned int size)
Definition: MLP.cc:114
int getLayers() const
Definition: MLP.h:20
unsigned int getEpoch() const
Definition: MLP.h:19
static bool inUse
Definition: MLP.h:32
void load(const std::string file)
Definition: MLP.cc:161
unsigned int epoch
Definition: MLP.h:31
MLP(unsigned int nIn, unsigned int nOut, const std::string layout)
Definition: MLP.cc:43
int layers
Definition: MLP.h:28
bool initialized
Definition: MLP.h:27
void set(unsigned int row, double *data, double *target, double weight=1.0)
Definition: MLP.cc:129
void setLearn(void)
Definition: MLP.cc:102
int * layout
Definition: MLP.h:29
void clear()
Definition: MLP.cc:90
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:82
double train()
Definition: MLP.cc:139
void save(const std::string file) const
Definition: MLP.cc:154
const int * getLayout() const
Definition: MLP.h:21
int weight
Definition: histoStyle.py:50
void init(unsigned int rows)
Definition: MLP.cc:122
tuple size
Write out results.