Last change
on this file since 13408 was 9847, checked in by tbretz, 14 years ago |
Added MJTrainEnergy::SetExpSize().
|
File size:
935 bytes
|
Line | |
---|
1 | #ifndef MARS_MJTrainEnergy
|
---|
2 | #define MARS_MJTrainEnergy
|
---|
3 |
|
---|
4 | #ifndef MARS_MJTrainRanForest
|
---|
5 | #include "MJTrainRanForest.h"
|
---|
6 | #endif
|
---|
7 |
|
---|
8 | class MDataSet;
|
---|
9 |
|
---|
10 | class MJTrainEnergy : public MJTrainRanForest
|
---|
11 | {
|
---|
12 | private:
|
---|
13 | TString fTrainParameter;
|
---|
14 | TString fResultFunction;
|
---|
15 |
|
---|
16 | // To be moved to a base class
|
---|
17 | TString fNameOutput;
|
---|
18 |
|
---|
19 | public:
|
---|
20 | MJTrainEnergy() : fNameOutput("MEnergyEst") { SetTrainLin(); }
|
---|
21 |
|
---|
22 | void SetTrainLog() { SetTrainFunc("log(MMcEvt.fEnergy)", "exp(x)"); }
|
---|
23 | void SetTrainLin() { SetTrainFunc("MMcEvt.fEnergy", "x"); }
|
---|
24 | void SetTrainExpSize() { SetTrainFunc("log(MMcEvt.fEnergy)/log(MHillas.fSize)", "MHillas.fSize^x"); }
|
---|
25 |
|
---|
26 | void SetTrainFunc(const char *par, const char *res)
|
---|
27 | {
|
---|
28 | fTrainParameter = par;
|
---|
29 | fResultFunction = res;
|
---|
30 | }
|
---|
31 |
|
---|
32 | Bool_t Train(const char *out, const MDataSet &set, Int_t num);
|
---|
33 |
|
---|
34 | ClassDef(MJTrainEnergy, 0)//Class to train Random Forest energy estimator
|
---|
35 | };
|
---|
36 |
|
---|
37 |
|
---|
38 | #endif
|
---|
Note:
See
TracBrowser
for help on using the repository browser.