Last change
on this file since 18656 was 9846, checked in by tbretz, 14 years ago |
Added new class MJTrainImpact to estimate the impact parameter by use of a random forest.
|
File size:
818 bytes
|
Line | |
---|
1 | #ifndef MARS_MJTrainImpact
|
---|
2 | #define MARS_MJTrainImpact
|
---|
3 |
|
---|
4 | #ifndef MARS_MJTrainRanForest
|
---|
5 | #include "MJTrainRanForest.h"
|
---|
6 | #endif
|
---|
7 |
|
---|
8 | class MDataSet;
|
---|
9 |
|
---|
10 | class MJTrainImpact : 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 | MJTrainImpact() : fNameOutput("MImpactEst") { SetTrainSq(); }
|
---|
21 |
|
---|
22 | void SetTrainSq() { SetTrainFunc("MMcEvt.fImpact^2", "sqrt(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(MJTrainImpact, 0)//Class to train Random Forest impact estimator
|
---|
34 | };
|
---|
35 |
|
---|
36 |
|
---|
37 | #endif
|
---|
Note:
See
TracBrowser
for help on using the repository browser.