| 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("log10(MMcEvt.fEnergy)", "pow(10, x)"); } | 
|---|
| 23 | void SetTrainLin() { SetTrainFunc("MMcEvt.fEnergy", "x"); } | 
|---|
| 24 |  | 
|---|
| 25 | void SetTrainFunc(const char *par, const char *res) | 
|---|
| 26 | { | 
|---|
| 27 | fTrainParameter = par; | 
|---|
| 28 | fResultFunction = res; | 
|---|
| 29 | } | 
|---|
| 30 |  | 
|---|
| 31 | Bool_t Train(const char *out, const MDataSet &set, Int_t num); | 
|---|
| 32 |  | 
|---|
| 33 | ClassDef(MJTrainEnergy, 0)//Class to train Random Forest energy estimator | 
|---|
| 34 | }; | 
|---|
| 35 |  | 
|---|
| 36 |  | 
|---|
| 37 | #endif | 
|---|
       
      
  Note:
 See   
TracBrowser
 for help on using the repository browser.