source: trunk/MagicSoft/Mars/mranforest/MRFEnergyEst.h@ 7176

Last change on this file since 7176 was 7169, checked in by tbretz, 20 years ago
*** empty log message ***
File size: 1.7 KB
Line 
1#ifndef MARS_MRFEnergyEst
2#define MARS_MRFEnergyEst
3
4#ifndef MARS_MTask
5#include "MTask.h"
6#endif
7
8#ifndef ROOT_TObjArray
9#include <TObjArray.h>
10#endif
11#ifndef ROOT_TArrayD
12#include <TArrayD.h>
13#endif
14
15class MHMatrix;
16class MDataArray;
17class MParameterD;
18
19class MRFEnergyEst : public MTask
20{
21public:
22 enum EstimationMode_t
23 {
24 kMean,
25 kMaximum
26 };
27private:
28 Int_t fNumTrees; // Training parameters
29 Int_t fNumTry; // Training parameters
30 Int_t fNdSize; // Training parameters
31
32 Bool_t fDebug; // Debugging of eventloop while training on/off
33
34 TString fFileName;
35 TObjArray fEForests;
36
37 MDataArray *fData; //! Used to store the MDataChains to get the event values
38 MParameterD *fEnergyEst; //! Used to storeestimated energy
39
40 MHMatrix *fTestMatrix;
41
42 TArrayD fBinning;
43
44 EstimationMode_t fEstimationMode;
45
46 Int_t PreProcess(MParList *plist);
47 Int_t Process();
48
49 Int_t ReadForests(MParList &plist);
50
51 Int_t ReadEnv(const TEnv &env, TString prefix, Bool_t print);
52
53public:
54 MRFEnergyEst(const char *name=NULL, const char *title=NULL);
55
56 void SetFileName(TString str) { fFileName = str; }
57
58 void SetNumTrees(Int_t n=-1) { fNumTrees = n; }
59 void SetNdSize(Int_t n=-1) { fNdSize = n; }
60 void SetNumTry(Int_t n=-1) { fNumTry = n; }
61
62 void SetTestMatrix(MHMatrix *m=0) { fTestMatrix=m; }
63 void InitMapping(MHMatrix *m=0) { fTestMatrix=m; }
64
65 void SetDebug(Bool_t b=kTRUE) { fDebug = b; }
66
67 void SetEstimationMode(EstimationMode_t op) { fEstimationMode = op; }
68
69 Int_t Train(const MHMatrix &n, const TArrayD &grid);
70
71 ClassDef(MRFEnergyEst, 0) // Task
72};
73
74#endif
Note: See TracBrowser for help on using the repository browser.