class TMVA::RuleFit

Function Members (Methods)

voidBoost(TMVA::DecisionTree* dt)
voidBuildTree(TMVA::DecisionTree* dt)
Double_tCalcWeightSum(const vector<const TMVA::Event*>* events, UInt_t neve = 0)
static TClass*Class()
Double_tEvalEvent(const TMVA::Event& e)
voidFillCorr(TH2F* h2, const TMVA::Rule* rule, Int_t v1, Int_t v2)
voidFillCut(TH2F* h2, const TMVA::Rule* rule, Int_t vind)
voidFillLin(TH2F* h2, Int_t vind)
voidFillVisHistCorr(const TMVA::Rule* rule, vector<TH2F*>& hlist)
voidFillVisHistCut(const TMVA::Rule* rule, vector<TH2F*>& hlist)
Bool_tGetCorrVars(TString& title, TString& var1, TString& var2)
const vector<const TMVA::DecisionTree*>&GetForest() const
const TMVA::MethodBase*GetMethodBase() const
const TMVA::MethodRuleFit*GetMethodRuleFit() const
Double_tGetNEveEff() const
UInt_tGetNTreeSample() const
voidGetRndmSampleEvents(vector<const TMVA::Event*>& evevec, UInt_t nevents)
const TMVA::RuleEnsemble&GetRuleEnsemble() const
const TMVA::RuleFitParams&GetRuleFitParams() const
const TMVA::Event*GetTrainingEvent(UInt_t i) const
const vector<const TMVA::Event*>&GetTrainingEvents() const
Double_tGetTrainingEventWeight(UInt_t i) const
voidInitialize(const TMVA::MethodBase* rfbase)
voidInitPtrs(const TMVA::MethodBase* rfbase)
virtual TClass*IsA() const
voidNormVisHists(vector<TH2F*>& hlist)
TMVA::RuleFit&operator=(const TMVA::RuleFit&)
TMVA::RuleFitRuleFit(const TMVA::MethodBase* rfbase)
voidSetGDNPathSteps(Int_t n = 100)
voidSetGDPathStep(Double_t s = 0.01)
voidSetGDTau(Double_t t = 0.)
voidSetImportanceCut(Double_t minimp = 0)
voidSetMethodBase(const TMVA::MethodBase* rfbase)
voidSetMsgType(TMVA::EMsgType t)
voidSetRuleMinDist(Double_t d)
voidSetTrainingEvents(const vector<const TMVA::Event*>& el)
voidSetVisHistsUseImp(Bool_t f)
virtual voidShowMembers(TMemberInspector& insp) const
virtual voidStreamer(TBuffer&)
voidStreamerNVirtual(TBuffer& ClassDef_StreamerNVirtual_b)
voidCopy(const TMVA::RuleFit& other)
TMVA::MsgLogger&Log() const
TMVA::RuleFitRuleFit(const TMVA::RuleFit& other)

Data Members

vector<Double_t>fEventWeightsoriginal weights of the events - follows fTrainingEvents
vector<const TMVA::DecisionTree*>fForestthe input forest of decision trees
TMVA::MsgLogger*fLoggermessage logger
const TMVA::MethodBase*fMethodBasepointer the method base which initialized this RuleFit instance
const TMVA::MethodRuleFit*fMethodRuleFitpointer the method which initialized this RuleFit instance
Double_tfNEveEffTrainreweighted number of events = sum(wi)
UInt_tfNTreeSamplenumber of events in sub sample = frac*neve
TMVA::RuleEnsemblefRuleEnsemblethe ensemble of rules
TMVA::RuleFitParamsfRuleFitParamsfit rule parameters
vector<const TMVA::Event*>fTrainingEventsall training events
vector<const TMVA::Event*>fTrainingEventsRndmidem, but randomly shuffled
Bool_tfVisHistsUseImpif true, use importance as weight; else coef in vis hists
static const Int_trandSEEDset to 1 for debugging purposes or to zero for random seeds

Class Charts

Inheritance Inherited Members Includes Libraries
Class Charts

Function documentation

RuleFit( const MethodBase *rfbase )
 default constructor
void InitNEveEff()
 init effective number of events (using event weights)
void InitPtrs(const TMVA::MethodBase* rfbase)
 initialize pointers
void Initialize(const TMVA::MethodBase* rfbase)
 initialize the parameters of the RuleFit method and make rules
void SetMethodBase(const TMVA::MethodBase* rfbase)
 set MethodBase
void Copy(const TMVA::RuleFit& other)
 copy method
Double_t CalcWeightSum(const vector<const TMVA::Event*>* events, UInt_t neve = 0)
 calculate the sum of weights
void SetMsgType(TMVA::EMsgType t)
 set the current message type to that of mlog for this class and all other subtools
void BuildTree(TMVA::DecisionTree* dt)
 build the decision tree using fNTreeSample events from fTrainingEventsRndm
void MakeForest()
 make a forest of decisiontrees
void SaveEventWeights()
 save event weights - must be done before making the forest
void RestoreEventWeights()
 save event weights - must be done before making the forest
void Boost(TMVA::DecisionTree* dt)
 Boost the events. The algorithm below is the called AdaBoost.
 See MethodBDT for details.
 Actually, this is a more or less copy of MethodBDT::AdaBoost().
void ForestStatistics()
 summary of statistics of all trees
 * end-nodes: average and spread
void FitCoefficients()
 Fit the coefficients for the rule ensemble

void CalcImportance()
 calculates the importance of each rule
Double_t EvalEvent(const TMVA::Event& e)
 evaluate single event
void SetTrainingEvents(const vector<const TMVA::Event*>& el)
 set the training events randomly
void GetRndmSampleEvents(vector<const TMVA::Event*>& evevec, UInt_t nevents)
 draw a random subsample of the training events without replacement
void NormVisHists(vector<TH2F*>& hlist)
 normalize rule importance hists

 if all weights are positive, the scale will be 1/maxweight
 if minimum weight < 0, then the scale will be 1/max(maxweight,abs(minweight))

void FillCut(TH2F* h2, const TMVA::Rule* rule, Int_t vind)
 Fill cut
void FillLin(TH2F* h2, Int_t vind)
 fill lin
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 FillVisHistCut(const TMVA::Rule* rule, vector<TH2F*>& hlist)
 help routine to MakeVisHists() - fills for all variables
void FillVisHistCorr(const TMVA::Rule* rule, vector<TH2F*>& hlist)
 help routine to MakeVisHists() - fills for all correlation plots
Bool_t GetCorrVars(TString& title, TString& var1, TString& var2)
 get first and second variables from title
void MakeVisHists()
 this will create histograms visualizing the rule ensemble
void MakeDebugHists()
 this will create a histograms intended rather for debugging or for the curious user
RuleFit(const TMVA::MethodBase* rfbase)
 main constructor
void ReshuffleEvents()
{ std::random_shuffle(fTrainingEventsRndm.begin(),fTrainingEventsRndm.end()); }
void SetModelLinear()
 set usage of linear term
void SetModelRules()
 set usage of rules
void SetModelFull()
 set usage of linear term
void SetImportanceCut(Double_t minimp = 0)
 set minimum importance allowed
void SetRuleMinDist(Double_t d)
 set minimum rule distance - see RuleEnsemble
void SetGDTau(Double_t t = 0.)
 set path related parameters
void SetGDPathStep(Double_t s = 0.01)
void SetGDNPathSteps(Int_t n = 100)
 make visualization histograms
void SetVisHistsUseImp(Bool_t f)
void UseImportanceVisHists()
void UseCoefficientsVisHists()
UInt_t GetNTreeSample() const
{ return fNTreeSample; }
Double_t GetNEveEff() const
{ return fNEveEffTrain; }
const Event* GetTrainingEvent(UInt_t i) const
{ return static_cast< const Event *>(fTrainingEvents[i]); }
Double_t GetTrainingEventWeight(UInt_t i) const
{ return fTrainingEvents[i]->GetWeight(); }
const std::vector< const TMVA::Event * > & GetTrainingEvents() const
      const Event*  GetTrainingEvent(UInt_t i, UInt_t isub)  const { return &(fTrainingEvents[fSubsampleEvents[isub]])[i]; }
{ return fTrainingEvents; }
const std::vector< const TMVA::DecisionTree *> & GetForest() const
{ return fForest; }
const RuleEnsemble & GetRuleEnsemble() const
{ return fRuleEnsemble; }
RuleEnsemble * GetRuleEnsemblePtr()
{ return &fRuleEnsemble; }
const RuleFitParams & GetRuleFitParams() const
{ return fRuleFitParams; }
RuleFitParams * GetRuleFitParamsPtr()
{ return &fRuleFitParams; }
const MethodRuleFit * GetMethodRuleFit() const
{ return fMethodRuleFit; }
const MethodBase * GetMethodBase() const
{ return fMethodBase; }