27 #ifndef ROOT_TMVA_RuleFit 28 #define ROOT_TMVA_RuleFit 161 std::vector< const TMVA::DecisionTree *>
fForest;
std::vector< const TMVA::Event * > fTrainingEventsRndm
void ForestStatistics()
summary of statistics of all trees
A class doing the actual fitting of a linear model using rules as base functions. ...
void MakeForest()
make a forest of decisiontrees
J Friedman's RuleFit method.
const RuleEnsemble & GetRuleEnsemble() const
void SetVisHistsUseImp(Bool_t f)
void SetGDTau(Double_t t=0.0)
void CalcImportance()
calculates the importance of each rule
const std::vector< const TMVA::Event *> & GetTrainingEvents() const
A class implementing various fits of rule ensembles.
void NormVisHists(std::vector< TH2F *> &hlist)
normalize rule importance hists
void SetGDTau(Double_t t)
void SetMsgType(EMsgType t)
set the current message type to that of mlog for this class and all other subtools ...
const MethodBase * fMethodBase
Virtual base Class for all MVA method.
Bool_t GetCorrVars(TString &title, TString &var1, TString &var2)
get first and second variables from title
void InitNEveEff()
init effective number of events (using event weights)
void FitCoefficients()
Fit the coefficients for the rule ensemble.
std::vector< Double_t > fEventWeights
const Event * GetTrainingEvent(UInt_t i) const
void SetTrainingEvents(const std::vector< const TMVA::Event *> &el)
set the training events randomly
Implementation of a rule.
const std::vector< const TMVA::DecisionTree * > & GetForest() const
RuleFit(void)
default constructor
#define ClassDef(name, id)
void BuildTree(TMVA::DecisionTree *dt)
build the decision tree using fNTreeSample events from fTrainingEventsRndm
void UseImportanceVisHists()
void GetRndmSampleEvents(std::vector< const TMVA::Event * > &evevec, UInt_t nevents)
draw a random subsample of the training events without replacement
const RuleFitParams & GetRuleFitParams() const
virtual ~RuleFit(void)
destructor
RuleEnsemble * GetRuleEnsemblePtr()
void SetGDNPathSteps(Int_t n=100)
void SetMethodBase(const MethodBase *rfbase)
set MethodBase
void SetGDNPathSteps(Int_t np)
void RestoreEventWeights()
save event weights - must be done before making the forest
const MethodBase * GetMethodBase() const
RuleFitParams * GetRuleFitParamsPtr()
void Copy(const RuleFit &other)
copy method
void FillVisHistCut(const Rule *rule, std::vector< TH2F *> &hlist)
help routine to MakeVisHists() - fills for all variables
void FillCorr(TH2F *h2, const TMVA::Rule *rule, Int_t v1, Int_t v2)
fill rule correlation between vx and vy, weighted with either the importance or the coefficient ...
void MakeDebugHists()
this will create a histograms intended rather for debugging or for the curious user ...
static const Int_t randSEED
tomato 2-D histogram with a float per channel (see TH1 documentation)}
Implementation of a Decision Tree.
void SetImportanceCut(Double_t minimp=0)
void FillLin(TH2F *h2, Int_t vind)
fill lin
RuleEnsemble fRuleEnsemble
void Boost(TMVA::DecisionTree *dt)
Boost the events.
void SetGDPathStep(Double_t s=0.01)
void SaveEventWeights()
save event weights - must be done before making the forest
Double_t GetNEveEff() const
Double_t GetTrainingEventWeight(UInt_t i) const
const MethodRuleFit * fMethodRuleFit
void MakeVisHists()
this will create histograms visualizing the rule ensemble
you should not use this method at all Int_t Int_t Double_t Double_t Double_t e
void FillVisHistCorr(const Rule *rule, std::vector< TH2F *> &hlist)
help routine to MakeVisHists() - fills for all correlation plots
void InitPtrs(const TMVA::MethodBase *rfbase)
initialize pointers
ostringstream derivative to redirect and format output
void SetRuleMinDist(Double_t d)
Abstract ClassifierFactory template that handles arbitrary types.
void FillCut(TH2F *h2, const TMVA::Rule *rule, Int_t vind)
Fill cut.
RuleFitParams fRuleFitParams
Double_t EvalEvent(const Event &e)
evaluate single event
std::vector< const TMVA::DecisionTree * > fForest
void UseCoefficientsVisHists()
void Initialize(const TMVA::MethodBase *rfbase)
initialize the parameters of the RuleFit method and make rules
Double_t CalcWeightSum(const std::vector< const TMVA::Event *> *events, UInt_t neve=0)
calculate the sum of weights
const MethodRuleFit * GetMethodRuleFit() const
std::vector< const TMVA::Event * > fTrainingEvents
UInt_t GetNTreeSample() const
void SetGDPathStep(Double_t s)
void SetRuleMinDist(Double_t d)
void SetImportanceCut(Double_t minimp=0)