Logo ROOT  
Reference Guide
TMVA::RuleEnsemble Class Reference

Definition at line 53 of file RuleEnsemble.h.

Public Types

enum  ELearningModel { kFull =0 , kRules =1 , kLinear =2 }
 

Public Member Functions

 RuleEnsemble ()
 constructor More...
 
 RuleEnsemble (const RuleEnsemble &other)
 copy constructor More...
 
 RuleEnsemble (RuleFit *rf)
 constructor More...
 
virtual ~RuleEnsemble ()
 destructor More...
 
void AddOffset (Double_t v)
 
void * AddXMLTo (void *parent) const
 write rules to XML More...
 
void CalcImportance ()
 calculate the importance of each rule More...
 
Double_t CalcLinImportance ()
 calculate the linear importance for each rule More...
 
Double_t CalcLinNorm (Double_t stdev)
 
Int_t CalcNRules (const TMVA::DecisionTree *dtree)
 calculate the number of rules More...
 
Double_t CalcRuleImportance ()
 calculate importance of each rule More...
 
void CalcRuleSupport ()
 calculate the support for all rules More...
 
void CalcVarImportance ()
 Calculates variable importance using eq (35) in RuleFit paper by Friedman et.al. More...
 
void CleanupLinear ()
 cleanup linear model More...
 
void CleanupRules ()
 cleanup rules More...
 
void ClearCoefficients (Double_t val=0)
 
void ClearLinCoefficients (Double_t val=0)
 
void ClearLinNorm (Double_t val=1.0)
 
void ClearRuleMap ()
 
Double_t CoefficientRadius ()
 Calculates sqrt(Sum(a_i^2)), i=1..N (NOTE do not include a0) More...
 
Bool_t DoFull () const
 
Bool_t DoLinear () const
 
Bool_t DoOnlyLinear () const
 
Bool_t DoOnlyRules () const
 
Bool_t DoRules () const
 
Double_t EvalEvent () const
 
Double_t EvalEvent (const Event &e)
 
Double_t EvalEvent (const Event &e, Double_t ofs, const std::vector< Double_t > &coefs, const std::vector< Double_t > &lincoefs)
 
Double_t EvalEvent (Double_t ofs, const std::vector< Double_t > &coefs, const std::vector< Double_t > &lincoefs) const
 
Double_t EvalEvent (UInt_t evtidx) const
 
Double_t EvalEvent (UInt_t evtidx, Double_t ofs, const std::vector< Double_t > &coefs, const std::vector< Double_t > &lincoefs) const
 
Double_t EvalLinEvent () const
 
Double_t EvalLinEvent (const Event &e)
 
Double_t EvalLinEvent (const Event &e, const std::vector< Double_t > &coefs)
 
Double_t EvalLinEvent (const Event &e, UInt_t vind)
 
Double_t EvalLinEvent (const std::vector< Double_t > &coefs) const
 
Double_t EvalLinEvent (UInt_t evtidx) const
 
Double_t EvalLinEvent (UInt_t evtidx, const std::vector< Double_t > &coefs) const
 
Double_t EvalLinEvent (UInt_t evtidx, UInt_t vind) const
 
Double_t EvalLinEvent (UInt_t evtidx, UInt_t vind, Double_t coefs) const
 
Double_t EvalLinEventRaw (UInt_t vind, const Event &e, Bool_t norm) const
 
Double_t EvalLinEventRaw (UInt_t vind, UInt_t evtidx, Bool_t norm) const
 
void FindNEndNodes (const TMVA::Node *node, Int_t &nendnodes)
 find the number of leaf nodes More...
 
Double_t FStar () const
 We want to estimate F* = argmin Eyx( L(y,F(x) ), min wrt F(x) F(x) = FL(x) + FR(x) , linear and rule part. More...
 
Double_t FStar (const TMVA::Event &e)
 We want to estimate F* = argmin Eyx( L(y,F(x) ), min wrt F(x) F(x) = FL(x) + FR(x) , linear and rule part. More...
 
Double_t GetAverageRuleSigma () const
 
Double_t GetAverageSupport () const
 
void GetCoefficients (std::vector< Double_t > &v)
 Retrieve all rule coefficients. More...
 
const EventGetEvent () const
 
Double_t GetEventLinearVal (UInt_t i) const
 
Double_t GetEventLinearValNorm (UInt_t i) const
 
const std::vector< UInt_t > & GetEventRuleMap (UInt_t evtidx) const
 
Double_t GetEventRuleVal (UInt_t i) const
 
Double_t GetImportanceCut () const
 
Double_t GetImportanceRef () const
 
ELearningModel GetLearningModel () const
 
const std::vector< Double_t > & GetLinCoefficients () const
 
Double_t GetLinCoefficients (int i) const
 
Double_t GetLinDM (int i) const
 
Double_t GetLinDP (int i) const
 
const std::vector< Double_t > & GetLinImportance () const
 
Double_t GetLinImportance (int i) const
 
const std::vector< Double_t > & GetLinNorm () const
 
Double_t GetLinNorm (int i) const
 
Double_t GetLinQuantile () const
 
const MethodBaseGetMethodBase () const
 Get a pointer to the original MethodRuleFit. More...
 
const MethodRuleFitGetMethodRuleFit () const
 Get a pointer to the original MethodRuleFit. More...
 
UInt_t GetNLinear () const
 
UInt_t GetNRules () const
 
Double_t GetOffset () const
 
const RuleFitGetRuleFit () const
 
const TMVA::EventGetRuleMapEvent (UInt_t evtidx) const
 
Double_t GetRuleMinDist () const
 
Double_t GetRulePBB (int i) const
 
Double_t GetRulePBS (int i) const
 
Double_t GetRulePSB (int i) const
 
Double_t GetRulePSS (int i) const
 
Double_t GetRulePTag (int i) const
 
std::vector< TMVA::Rule * > & GetRules ()
 
RuleGetRules (int i)
 
const std::vector< TMVA::Rule * > & GetRulesConst () const
 
const RuleGetRulesConst (int i) const
 
UInt_t GetRulesNCuts (int i) const
 
const EventGetTrainingEvent (UInt_t i) const
 get the training event from the rule fitter More...
 
const std::vector< const TMVA::Event * > * GetTrainingEvents () const
 get list of training events from the rule fitter More...
 
const std::vector< Double_t > & GetVarImportance () const
 
Double_t GetVarImportance (int i) const
 
void Initialize (const RuleFit *rf)
 Initializes all member variables with default values. More...
 
Bool_t IsLinTermOK (int i) const
 
Bool_t IsRuleMapOK () const
 
void MakeLinearTerms ()
 Make the linear terms as in eq 25, ref 2 For this the b and (1-b) quantiles are needed. More...
 
void MakeModel ()
 create model More...
 
void MakeRuleMap (const std::vector< const TMVA::Event * > *events=0, UInt_t ifirst=0, UInt_t ilast=0)
 Makes rule map for all events. More...
 
void MakeRules (const std::vector< const TMVA::DecisionTree * > &forest)
 Makes rules from the given decision tree. More...
 
void operator= (const RuleEnsemble &other)
 
Double_t PdfLinear (Double_t &nsig, Double_t &ntot) const
 This function returns Pr( y = 1 | x ) for the linear terms. More...
 
Double_t PdfRule (Double_t &nsig, Double_t &ntot) const
 This function returns Pr( y = 1 | x ) for rules. More...
 
void Print () const
 print function More...
 
void PrintRaw (std::ostream &os) const
 write rules to stream More...
 
void PrintRuleGen () const
 print rule generation info More...
 
void ReadFromXML (void *wghtnode)
 read rules from XML More...
 
void ReadRaw (std::istream &istr)
 read rule ensemble from stream More...
 
void RemoveSimilarRules ()
 remove rules that behave similar More...
 
void RuleResponseStats ()
 calculate various statistics for this rule More...
 
void RuleStatistics ()
 calculate various statistics for this rule More...
 
void SetAverageRuleSigma (Double_t v)
 
void SetCoefficient (UInt_t i, Double_t v)
 
void SetCoefficients (const std::vector< Double_t > &v)
 set all rule coefficients More...
 
void SetEvent (const Event &e)
 
void SetImportanceCut (Double_t minimp=0)
 
void SetImportanceRef (Double_t impref)
 set reference importance More...
 
void SetLinCoefficient (UInt_t i, Double_t v)
 
void SetLinCoefficients (const std::vector< Double_t > &v)
 
void SetLinDM (const std::vector< Double_t > &xmin)
 
void SetLinDP (const std::vector< Double_t > &xmax)
 
void SetLinNorm (const std::vector< Double_t > &norm)
 
void SetLinQuantile (Double_t q)
 
void SetModelFull ()
 
void SetModelLinear ()
 
void SetModelRules ()
 
void SetMsgType (EMsgType t)
 
void SetOffset (Double_t v=0.0)
 
void SetRuleFit (const RuleFit *rf)
 
void SetRuleMinDist (Double_t d)
 
void SetRules (const std::vector< TMVA::Rule * > &rules)
 set rules More...
 
void UpdateEventVal ()
 

Private Member Functions

void AddRule (const Node *node)
 add a new rule to the tree More...
 
void Copy (RuleEnsemble const &other)
 copy function More...
 
void DeleteRules ()
 
MsgLoggerLog () const
 
void MakeRulesFromTree (const DecisionTree *dtree)
 create rules from the decision tree structure More...
 
RuleMakeTheRule (const Node *node)
 Make a Rule from a given Node. More...
 
void ResetCoefficients ()
 reset all rule coefficients More...
 

Private Attributes

Double_t fAverageRuleSigma
 average rule sigma More...
 
Double_t fAverageSupport
 average support (over all rules) More...
 
const EventfEvent
 current event. More...
 
Bool_t fEventCacheOK
 true if rule/linear respons are updated More...
 
std::vector< Double_tfEventLinearVal
 linear respons More...
 
std::vector< Char_tfEventRuleVal
 the rule respons of current event <--— stores boolean More...
 
Double_t fImportanceCut
 minimum importance accepted More...
 
Double_t fImportanceRef
 reference importance (max) More...
 
ELearningModel fLearningModel
 can be full (rules+linear), rules, linear More...
 
std::vector< Double_tfLinCoefficients
 linear coefficients, one per variable More...
 
std::vector< Double_tfLinDM
 delta- More...
 
std::vector< Double_tfLinDP
 delta+ in eq 24, ref 2 More...
 
std::vector< Double_tfLinImportance
 linear term importance More...
 
std::vector< Double_tfLinNorm
 norm of ditto, see after eq 26 in ref 2 More...
 
std::vector< TH1F * > fLinPDFB
 pdfs for each variable, background More...
 
std::vector< TH1F * > fLinPDFS
 pdfs for each variable, signal More...
 
Double_t fLinQuantile
 quantile cut to remove outliers More...
 
std::vector< Char_tfLinTermOK
 flags linear terms with sufficient strong importance <– stores boolean More...
 
MsgLoggerfLogger
 ! message logger More...
 
UInt_t fNRulesGenerated
 number of rules generated, before cleanup More...
 
Double_t fOffset
 offset in discriminator function More...
 
const RuleFitfRuleFit
 pointer to rule fit object More...
 
Double_t fRuleFSig
 N(sig)/N(sig)+N(bkg) More...
 
std::vector< std::vector< UInt_t > > fRuleMap
 map of rule responses More...
 
const std::vector< const TMVA::Event * > * fRuleMapEvents
 pointer to vector of events used More...
 
UInt_t fRuleMapInd0
 start index More...
 
UInt_t fRuleMapInd1
 last index More...
 
Bool_t fRuleMapOK
 true if MakeRuleMap() has been called More...
 
Double_t fRuleMinDist
 minimum rule distance More...
 
Double_t fRuleNCave
 N(cuts) average. More...
 
Double_t fRuleNCsig
 idem sigma More...
 
std::vector< Double_tfRulePBB
 p(tag as B|B) More...
 
std::vector< Double_tfRulePBS
 p(tag as B|S) More...
 
std::vector< Double_tfRulePSB
 p(tag as S|B) More...
 
std::vector< Double_tfRulePSS
 p(tag as S|S) - tagged as S if rule is SIG and the event is accepted More...
 
std::vector< Double_tfRulePTag
 p(tag) More...
 
std::vector< TMVA::Rule * > fRules
 vector of rules More...
 
std::vector< Double_tfRuleVarFrac
 fraction of rules using a given variable - size of vector = n(variables) More...
 
std::vector< Double_tfVarImportance
 one importance per input variable More...
 

Friends

std::ostream & operator<< (std::ostream &os, const RuleEnsemble &rules)
 

#include <TMVA/RuleEnsemble.h>

Member Enumeration Documentation

◆ ELearningModel

Enumerator
kFull 
kRules 
kLinear 

Definition at line 60 of file RuleEnsemble.h.

Constructor & Destructor Documentation

◆ RuleEnsemble() [1/3]

TMVA::RuleEnsemble::RuleEnsemble ( RuleFit rf)

constructor

Definition at line 56 of file RuleEnsemble.cxx.

◆ RuleEnsemble() [2/3]

TMVA::RuleEnsemble::RuleEnsemble ( const RuleEnsemble other)

copy constructor

Definition at line 82 of file RuleEnsemble.cxx.

◆ RuleEnsemble() [3/3]

TMVA::RuleEnsemble::RuleEnsemble ( )

constructor

Definition at line 95 of file RuleEnsemble.cxx.

◆ ~RuleEnsemble()

TMVA::RuleEnsemble::~RuleEnsemble ( )
virtual

destructor

Definition at line 122 of file RuleEnsemble.cxx.

Member Function Documentation

◆ AddOffset()

void TMVA::RuleEnsemble::AddOffset ( Double_t  v)
inline

Definition at line 109 of file RuleEnsemble.h.

◆ AddRule()

void TMVA::RuleEnsemble::AddRule ( const Node node)
private

add a new rule to the tree

Definition at line 1294 of file RuleEnsemble.cxx.

◆ AddXMLTo()

void * TMVA::RuleEnsemble::AddXMLTo ( void *  parent) const

write rules to XML

Definition at line 1086 of file RuleEnsemble.cxx.

◆ CalcImportance()

void TMVA::RuleEnsemble::CalcImportance ( )

calculate the importance of each rule

Definition at line 418 of file RuleEnsemble.cxx.

◆ CalcLinImportance()

Double_t TMVA::RuleEnsemble::CalcLinImportance ( )

calculate the linear importance for each rule

Definition at line 459 of file RuleEnsemble.cxx.

◆ CalcLinNorm()

Double_t TMVA::RuleEnsemble::CalcLinNorm ( Double_t  stdev)
inline

Definition at line 116 of file RuleEnsemble.h.

◆ CalcNRules()

Int_t TMVA::RuleEnsemble::CalcNRules ( const TMVA::DecisionTree dtree)

calculate the number of rules

Definition at line 1257 of file RuleEnsemble.cxx.

◆ CalcRuleImportance()

Double_t TMVA::RuleEnsemble::CalcRuleImportance ( )

calculate importance of each rule

Definition at line 439 of file RuleEnsemble.cxx.

◆ CalcRuleSupport()

void TMVA::RuleEnsemble::CalcRuleSupport ( )

calculate the support for all rules

Definition at line 369 of file RuleEnsemble.cxx.

◆ CalcVarImportance()

void TMVA::RuleEnsemble::CalcVarImportance ( )

Calculates variable importance using eq (35) in RuleFit paper by Friedman et.al.

Definition at line 485 of file RuleEnsemble.cxx.

◆ CleanupLinear()

void TMVA::RuleEnsemble::CleanupLinear ( )

cleanup linear model

Definition at line 354 of file RuleEnsemble.cxx.

◆ CleanupRules()

void TMVA::RuleEnsemble::CleanupRules ( )

cleanup rules

Definition at line 327 of file RuleEnsemble.cxx.

◆ ClearCoefficients()

void TMVA::RuleEnsemble::ClearCoefficients ( Double_t  val = 0)
inline

Definition at line 119 of file RuleEnsemble.h.

◆ ClearLinCoefficients()

void TMVA::RuleEnsemble::ClearLinCoefficients ( Double_t  val = 0)
inline

Definition at line 120 of file RuleEnsemble.h.

◆ ClearLinNorm()

void TMVA::RuleEnsemble::ClearLinNorm ( Double_t  val = 1.0)
inline

Definition at line 121 of file RuleEnsemble.h.

◆ ClearRuleMap()

void TMVA::RuleEnsemble::ClearRuleMap ( )
inline

Definition at line 150 of file RuleEnsemble.h.

◆ CoefficientRadius()

Double_t TMVA::RuleEnsemble::CoefficientRadius ( )

Calculates sqrt(Sum(a_i^2)), i=1..N (NOTE do not include a0)

Definition at line 198 of file RuleEnsemble.cxx.

◆ Copy()

void TMVA::RuleEnsemble::Copy ( RuleEnsemble const &  other)
private

copy function

Definition at line 1230 of file RuleEnsemble.cxx.

◆ DeleteRules()

void TMVA::RuleEnsemble::DeleteRules ( )
inlineprivate

Definition at line 319 of file RuleEnsemble.h.

◆ DoFull()

Bool_t TMVA::RuleEnsemble::DoFull ( ) const
inline

Definition at line 257 of file RuleEnsemble.h.

◆ DoLinear()

Bool_t TMVA::RuleEnsemble::DoLinear ( ) const
inline

Definition at line 253 of file RuleEnsemble.h.

◆ DoOnlyLinear()

Bool_t TMVA::RuleEnsemble::DoOnlyLinear ( ) const
inline

Definition at line 256 of file RuleEnsemble.h.

◆ DoOnlyRules()

Bool_t TMVA::RuleEnsemble::DoOnlyRules ( ) const
inline

Definition at line 255 of file RuleEnsemble.h.

◆ DoRules()

Bool_t TMVA::RuleEnsemble::DoRules ( ) const
inline

Definition at line 254 of file RuleEnsemble.h.

◆ EvalEvent() [1/6]

Double_t TMVA::RuleEnsemble::EvalEvent ( ) const
inline

Definition at line 412 of file RuleEnsemble.h.

◆ EvalEvent() [2/6]

Double_t TMVA::RuleEnsemble::EvalEvent ( const Event e)
inline

Definition at line 467 of file RuleEnsemble.h.

◆ EvalEvent() [3/6]

Double_t TMVA::RuleEnsemble::EvalEvent ( const Event e,
Double_t  ofs,
const std::vector< Double_t > &  coefs,
const std::vector< Double_t > &  lincoefs 
)
inline

Definition at line 476 of file RuleEnsemble.h.

◆ EvalEvent() [4/6]

Double_t TMVA::RuleEnsemble::EvalEvent ( Double_t  ofs,
const std::vector< Double_t > &  coefs,
const std::vector< Double_t > &  lincoefs 
) const
inline

Definition at line 439 of file RuleEnsemble.h.

◆ EvalEvent() [5/6]

Double_t TMVA::RuleEnsemble::EvalEvent ( UInt_t  evtidx) const
inline

Definition at line 488 of file RuleEnsemble.h.

◆ EvalEvent() [6/6]

Double_t TMVA::RuleEnsemble::EvalEvent ( UInt_t  evtidx,
Double_t  ofs,
const std::vector< Double_t > &  coefs,
const std::vector< Double_t > &  lincoefs 
) const
inline

Definition at line 514 of file RuleEnsemble.h.

◆ EvalLinEvent() [1/9]

Double_t TMVA::RuleEnsemble::EvalLinEvent ( ) const
inline

Definition at line 560 of file RuleEnsemble.h.

◆ EvalLinEvent() [2/9]

Double_t TMVA::RuleEnsemble::EvalLinEvent ( const Event e)
inline

Definition at line 586 of file RuleEnsemble.h.

◆ EvalLinEvent() [3/9]

Double_t TMVA::RuleEnsemble::EvalLinEvent ( const Event e,
const std::vector< Double_t > &  coefs 
)
inline

Definition at line 606 of file RuleEnsemble.h.

◆ EvalLinEvent() [4/9]

Double_t TMVA::RuleEnsemble::EvalLinEvent ( const Event e,
UInt_t  vind 
)
inline

Definition at line 596 of file RuleEnsemble.h.

◆ EvalLinEvent() [5/9]

Double_t TMVA::RuleEnsemble::EvalLinEvent ( const std::vector< Double_t > &  coefs) const
inline

Definition at line 573 of file RuleEnsemble.h.

◆ EvalLinEvent() [6/9]

Double_t TMVA::RuleEnsemble::EvalLinEvent ( UInt_t  evtidx) const
inline

Definition at line 631 of file RuleEnsemble.h.

◆ EvalLinEvent() [7/9]

Double_t TMVA::RuleEnsemble::EvalLinEvent ( UInt_t  evtidx,
const std::vector< Double_t > &  coefs 
) const
inline

Definition at line 616 of file RuleEnsemble.h.

◆ EvalLinEvent() [8/9]

Double_t TMVA::RuleEnsemble::EvalLinEvent ( UInt_t  evtidx,
UInt_t  vind 
) const
inline

Definition at line 646 of file RuleEnsemble.h.

◆ EvalLinEvent() [9/9]

Double_t TMVA::RuleEnsemble::EvalLinEvent ( UInt_t  evtidx,
UInt_t  vind,
Double_t  coefs 
) const
inline

Definition at line 656 of file RuleEnsemble.h.

◆ EvalLinEventRaw() [1/2]

Double_t TMVA::RuleEnsemble::EvalLinEventRaw ( UInt_t  vind,
const Event e,
Bool_t  norm 
) const
inline

Definition at line 538 of file RuleEnsemble.h.

◆ EvalLinEventRaw() [2/2]

Double_t TMVA::RuleEnsemble::EvalLinEventRaw ( UInt_t  vind,
UInt_t  evtidx,
Bool_t  norm 
) const
inline

Definition at line 549 of file RuleEnsemble.h.

◆ FindNEndNodes()

void TMVA::RuleEnsemble::FindNEndNodes ( const TMVA::Node node,
Int_t nendnodes 
)

find the number of leaf nodes

Definition at line 1269 of file RuleEnsemble.cxx.

◆ FStar() [1/2]

Double_t TMVA::RuleEnsemble::FStar ( ) const

We want to estimate F* = argmin Eyx( L(y,F(x) ), min wrt F(x) F(x) = FL(x) + FR(x) , linear and rule part.

Definition at line 784 of file RuleEnsemble.cxx.

◆ FStar() [2/2]

Double_t TMVA::RuleEnsemble::FStar ( const TMVA::Event e)

We want to estimate F* = argmin Eyx( L(y,F(x) ), min wrt F(x) F(x) = FL(x) + FR(x) , linear and rule part.

Definition at line 773 of file RuleEnsemble.cxx.

◆ GetAverageRuleSigma()

Double_t TMVA::RuleEnsemble::GetAverageRuleSigma ( ) const
inline

Definition at line 292 of file RuleEnsemble.h.

◆ GetAverageSupport()

Double_t TMVA::RuleEnsemble::GetAverageSupport ( ) const
inline

Definition at line 291 of file RuleEnsemble.h.

◆ GetCoefficients()

void TMVA::RuleEnsemble::GetCoefficients ( std::vector< Double_t > &  v)

Retrieve all rule coefficients.

Definition at line 242 of file RuleEnsemble.cxx.

◆ GetEvent()

const Event * TMVA::RuleEnsemble::GetEvent ( ) const
inline

Definition at line 251 of file RuleEnsemble.h.

◆ GetEventLinearVal()

Double_t TMVA::RuleEnsemble::GetEventLinearVal ( UInt_t  i) const
inline

Definition at line 294 of file RuleEnsemble.h.

◆ GetEventLinearValNorm()

Double_t TMVA::RuleEnsemble::GetEventLinearValNorm ( UInt_t  i) const
inline

Definition at line 295 of file RuleEnsemble.h.

◆ GetEventRuleMap()

const std::vector< UInt_t > & TMVA::RuleEnsemble::GetEventRuleMap ( UInt_t  evtidx) const
inline

Definition at line 297 of file RuleEnsemble.h.

◆ GetEventRuleVal()

Double_t TMVA::RuleEnsemble::GetEventRuleVal ( UInt_t  i) const
inline

Definition at line 293 of file RuleEnsemble.h.

◆ GetImportanceCut()

Double_t TMVA::RuleEnsemble::GetImportanceCut ( ) const
inline

Definition at line 259 of file RuleEnsemble.h.

◆ GetImportanceRef()

Double_t TMVA::RuleEnsemble::GetImportanceRef ( ) const
inline

Definition at line 260 of file RuleEnsemble.h.

◆ GetLearningModel()

ELearningModel TMVA::RuleEnsemble::GetLearningModel ( ) const
inline

Definition at line 258 of file RuleEnsemble.h.

◆ GetLinCoefficients() [1/2]

const std::vector< Double_t > & TMVA::RuleEnsemble::GetLinCoefficients ( ) const
inline

Definition at line 265 of file RuleEnsemble.h.

◆ GetLinCoefficients() [2/2]

Double_t TMVA::RuleEnsemble::GetLinCoefficients ( int  i) const
inline

Definition at line 277 of file RuleEnsemble.h.

◆ GetLinDM()

Double_t TMVA::RuleEnsemble::GetLinDM ( int  i) const
inline

Definition at line 279 of file RuleEnsemble.h.

◆ GetLinDP()

Double_t TMVA::RuleEnsemble::GetLinDP ( int  i) const
inline

Definition at line 280 of file RuleEnsemble.h.

◆ GetLinImportance() [1/2]

const std::vector< Double_t > & TMVA::RuleEnsemble::GetLinImportance ( ) const
inline

Definition at line 267 of file RuleEnsemble.h.

◆ GetLinImportance() [2/2]

Double_t TMVA::RuleEnsemble::GetLinImportance ( int  i) const
inline

Definition at line 281 of file RuleEnsemble.h.

◆ GetLinNorm() [1/2]

const std::vector< Double_t > & TMVA::RuleEnsemble::GetLinNorm ( ) const
inline

Definition at line 266 of file RuleEnsemble.h.

◆ GetLinNorm() [2/2]

Double_t TMVA::RuleEnsemble::GetLinNorm ( int  i) const
inline

Definition at line 278 of file RuleEnsemble.h.

◆ GetLinQuantile()

Double_t TMVA::RuleEnsemble::GetLinQuantile ( ) const
inline

Definition at line 270 of file RuleEnsemble.h.

◆ GetMethodBase()

const TMVA::MethodBase * TMVA::RuleEnsemble::GetMethodBase ( ) const

Get a pointer to the original MethodRuleFit.

Definition at line 171 of file RuleEnsemble.cxx.

◆ GetMethodRuleFit()

const TMVA::MethodRuleFit * TMVA::RuleEnsemble::GetMethodRuleFit ( ) const

Get a pointer to the original MethodRuleFit.

Definition at line 162 of file RuleEnsemble.cxx.

◆ GetNLinear()

UInt_t TMVA::RuleEnsemble::GetNLinear ( ) const
inline

Definition at line 269 of file RuleEnsemble.h.

◆ GetNRules()

UInt_t TMVA::RuleEnsemble::GetNRules ( ) const
inline

Definition at line 262 of file RuleEnsemble.h.

◆ GetOffset()

Double_t TMVA::RuleEnsemble::GetOffset ( ) const
inline

Definition at line 261 of file RuleEnsemble.h.

◆ GetRuleFit()

const RuleFit * TMVA::RuleEnsemble::GetRuleFit ( ) const
inline

Definition at line 247 of file RuleEnsemble.h.

◆ GetRuleMapEvent()

const TMVA::Event * TMVA::RuleEnsemble::GetRuleMapEvent ( UInt_t  evtidx) const
inline

Definition at line 298 of file RuleEnsemble.h.

◆ GetRuleMinDist()

Double_t TMVA::RuleEnsemble::GetRuleMinDist ( ) const
inline

Definition at line 276 of file RuleEnsemble.h.

◆ GetRulePBB()

Double_t TMVA::RuleEnsemble::GetRulePBB ( int  i) const
inline

Definition at line 287 of file RuleEnsemble.h.

◆ GetRulePBS()

Double_t TMVA::RuleEnsemble::GetRulePBS ( int  i) const
inline

Definition at line 286 of file RuleEnsemble.h.

◆ GetRulePSB()

Double_t TMVA::RuleEnsemble::GetRulePSB ( int  i) const
inline

Definition at line 285 of file RuleEnsemble.h.

◆ GetRulePSS()

Double_t TMVA::RuleEnsemble::GetRulePSS ( int  i) const
inline

Definition at line 284 of file RuleEnsemble.h.

◆ GetRulePTag()

Double_t TMVA::RuleEnsemble::GetRulePTag ( int  i) const
inline

Definition at line 283 of file RuleEnsemble.h.

◆ GetRules() [1/2]

std::vector< TMVA::Rule * > & TMVA::RuleEnsemble::GetRules ( )
inline

Definition at line 264 of file RuleEnsemble.h.

◆ GetRules() [2/2]

Rule * TMVA::RuleEnsemble::GetRules ( int  i)
inline

Definition at line 273 of file RuleEnsemble.h.

◆ GetRulesConst() [1/2]

const std::vector< TMVA::Rule * > & TMVA::RuleEnsemble::GetRulesConst ( ) const
inline

Definition at line 263 of file RuleEnsemble.h.

◆ GetRulesConst() [2/2]

const Rule * TMVA::RuleEnsemble::GetRulesConst ( int  i) const
inline

Definition at line 272 of file RuleEnsemble.h.

◆ GetRulesNCuts()

UInt_t TMVA::RuleEnsemble::GetRulesNCuts ( int  i) const
inline

Definition at line 275 of file RuleEnsemble.h.

◆ GetTrainingEvent()

const TMVA::Event * TMVA::RuleEnsemble::GetTrainingEvent ( UInt_t  i) const

get the training event from the rule fitter

Definition at line 264 of file RuleEnsemble.cxx.

◆ GetTrainingEvents()

const std::vector< const TMVA::Event * > * TMVA::RuleEnsemble::GetTrainingEvents ( ) const

get list of training events from the rule fitter

Definition at line 256 of file RuleEnsemble.cxx.

◆ GetVarImportance() [1/2]

const std::vector< Double_t > & TMVA::RuleEnsemble::GetVarImportance ( ) const
inline

Definition at line 268 of file RuleEnsemble.h.

◆ GetVarImportance() [2/2]

Double_t TMVA::RuleEnsemble::GetVarImportance ( int  i) const
inline

Definition at line 282 of file RuleEnsemble.h.

◆ Initialize()

void TMVA::RuleEnsemble::Initialize ( const RuleFit rf)

Initializes all member variables with default values.

Definition at line 134 of file RuleEnsemble.cxx.

◆ IsLinTermOK()

Bool_t TMVA::RuleEnsemble::IsLinTermOK ( int  i) const
inline

Definition at line 289 of file RuleEnsemble.h.

◆ IsRuleMapOK()

Bool_t TMVA::RuleEnsemble::IsRuleMapOK ( ) const
inline

Definition at line 299 of file RuleEnsemble.h.

◆ Log()

MsgLogger & TMVA::RuleEnsemble::Log ( ) const
inlineprivate

Definition at line 382 of file RuleEnsemble.h.

◆ MakeLinearTerms()

void TMVA::RuleEnsemble::MakeLinearTerms ( )

Make the linear terms as in eq 25, ref 2 For this the b and (1-b) quantiles are needed.

Definition at line 603 of file RuleEnsemble.cxx.

◆ MakeModel()

void TMVA::RuleEnsemble::MakeModel ( )

create model

Definition at line 179 of file RuleEnsemble.cxx.

◆ MakeRuleMap()

void TMVA::RuleEnsemble::MakeRuleMap ( const std::vector< const TMVA::Event * > *  events = 0,
UInt_t  ifirst = 0,
UInt_t  ilast = 0 
)

Makes rule map for all events.

Definition at line 1358 of file RuleEnsemble.cxx.

◆ MakeRules()

void TMVA::RuleEnsemble::MakeRules ( const std::vector< const TMVA::DecisionTree * > &  forest)

Makes rules from the given decision tree.

First node in all rules is ALWAYS the root node.

Definition at line 550 of file RuleEnsemble.cxx.

◆ MakeRulesFromTree()

void TMVA::RuleEnsemble::MakeRulesFromTree ( const DecisionTree dtree)
private

create rules from the decision tree structure

Definition at line 1285 of file RuleEnsemble.cxx.

◆ MakeTheRule()

TMVA::Rule * TMVA::RuleEnsemble::MakeTheRule ( const Node node)
private

Make a Rule from a given Node.

The root node (ie no parent) does not generate a Rule. The first node in a rule is always the root node => fNodes.size()>=2 Each node corresponds to a cut and the cut value is given by the parent node.

Definition at line 1320 of file RuleEnsemble.cxx.

◆ operator=()

void TMVA::RuleEnsemble::operator= ( const RuleEnsemble other)
inline

Definition at line 236 of file RuleEnsemble.h.

◆ PdfLinear()

Double_t TMVA::RuleEnsemble::PdfLinear ( Double_t nsig,
Double_t ntot 
) const

This function returns Pr( y = 1 | x ) for the linear terms.

Definition at line 721 of file RuleEnsemble.cxx.

◆ PdfRule()

Double_t TMVA::RuleEnsemble::PdfRule ( Double_t nsig,
Double_t ntot 
) const

This function returns Pr( y = 1 | x ) for rules.

The probability returned is normalized against the number of rules which are actually passed

Definition at line 745 of file RuleEnsemble.cxx.

◆ Print()

void TMVA::RuleEnsemble::Print ( ) const

print function

Definition at line 934 of file RuleEnsemble.cxx.

◆ PrintRaw()

void TMVA::RuleEnsemble::PrintRaw ( std::ostream &  os) const

write rules to stream

Definition at line 1052 of file RuleEnsemble.cxx.

◆ PrintRuleGen()

void TMVA::RuleEnsemble::PrintRuleGen ( ) const

print rule generation info

Definition at line 915 of file RuleEnsemble.cxx.

◆ ReadFromXML()

void TMVA::RuleEnsemble::ReadFromXML ( void *  wghtnode)

read rules from XML

Definition at line 1117 of file RuleEnsemble.cxx.

◆ ReadRaw()

void TMVA::RuleEnsemble::ReadRaw ( std::istream &  istr)

read rule ensemble from stream

Definition at line 1172 of file RuleEnsemble.cxx.

◆ RemoveSimilarRules()

void TMVA::RuleEnsemble::RemoveSimilarRules ( )

remove rules that behave similar

Definition at line 272 of file RuleEnsemble.cxx.

◆ ResetCoefficients()

void TMVA::RuleEnsemble::ResetCoefficients ( )
private

reset all rule coefficients

Definition at line 215 of file RuleEnsemble.cxx.

◆ RuleResponseStats()

void TMVA::RuleEnsemble::RuleResponseStats ( )

calculate various statistics for this rule

Definition at line 806 of file RuleEnsemble.cxx.

◆ RuleStatistics()

void TMVA::RuleEnsemble::RuleStatistics ( )

calculate various statistics for this rule

Definition at line 893 of file RuleEnsemble.cxx.

◆ SetAverageRuleSigma()

void TMVA::RuleEnsemble::SetAverageRuleSigma ( Double_t  v)
inline

Definition at line 133 of file RuleEnsemble.h.

◆ SetCoefficient()

void TMVA::RuleEnsemble::SetCoefficient ( UInt_t  i,
Double_t  v 
)
inline

Definition at line 106 of file RuleEnsemble.h.

◆ SetCoefficients()

void TMVA::RuleEnsemble::SetCoefficients ( const std::vector< Double_t > &  v)

set all rule coefficients

Definition at line 227 of file RuleEnsemble.cxx.

◆ SetEvent()

void TMVA::RuleEnsemble::SetEvent ( const Event e)
inline

Definition at line 141 of file RuleEnsemble.h.

◆ SetImportanceCut()

void TMVA::RuleEnsemble::SetImportanceCut ( Double_t  minimp = 0)
inline

Definition at line 127 of file RuleEnsemble.h.

◆ SetImportanceRef()

void TMVA::RuleEnsemble::SetImportanceRef ( Double_t  impref)

set reference importance

Definition at line 429 of file RuleEnsemble.cxx.

◆ SetLinCoefficient()

void TMVA::RuleEnsemble::SetLinCoefficient ( UInt_t  i,
Double_t  v 
)
inline

Definition at line 111 of file RuleEnsemble.h.

◆ SetLinCoefficients()

void TMVA::RuleEnsemble::SetLinCoefficients ( const std::vector< Double_t > &  v)
inline

Definition at line 110 of file RuleEnsemble.h.

◆ SetLinDM()

void TMVA::RuleEnsemble::SetLinDM ( const std::vector< Double_t > &  xmin)
inline

Definition at line 112 of file RuleEnsemble.h.

◆ SetLinDP()

void TMVA::RuleEnsemble::SetLinDP ( const std::vector< Double_t > &  xmax)
inline

Definition at line 113 of file RuleEnsemble.h.

◆ SetLinNorm()

void TMVA::RuleEnsemble::SetLinNorm ( const std::vector< Double_t > &  norm)
inline

Definition at line 114 of file RuleEnsemble.h.

◆ SetLinQuantile()

void TMVA::RuleEnsemble::SetLinQuantile ( Double_t  q)
inline

Definition at line 130 of file RuleEnsemble.h.

◆ SetModelFull()

void TMVA::RuleEnsemble::SetModelFull ( )
inline

Definition at line 96 of file RuleEnsemble.h.

◆ SetModelLinear()

void TMVA::RuleEnsemble::SetModelLinear ( )
inline

Definition at line 90 of file RuleEnsemble.h.

◆ SetModelRules()

void TMVA::RuleEnsemble::SetModelRules ( )
inline

Definition at line 93 of file RuleEnsemble.h.

◆ SetMsgType()

void TMVA::RuleEnsemble::SetMsgType ( EMsgType  t)

Definition at line 154 of file RuleEnsemble.cxx.

◆ SetOffset()

void TMVA::RuleEnsemble::SetOffset ( Double_t  v = 0.0)
inline

Definition at line 108 of file RuleEnsemble.h.

◆ SetRuleFit()

void TMVA::RuleEnsemble::SetRuleFit ( const RuleFit rf)
inline

Definition at line 102 of file RuleEnsemble.h.

◆ SetRuleMinDist()

void TMVA::RuleEnsemble::SetRuleMinDist ( Double_t  d)
inline

Definition at line 124 of file RuleEnsemble.h.

◆ SetRules()

void TMVA::RuleEnsemble::SetRules ( const std::vector< TMVA::Rule * > &  rules)

set rules

first clear all

Definition at line 535 of file RuleEnsemble.cxx.

◆ UpdateEventVal()

void TMVA::RuleEnsemble::UpdateEventVal ( )
inline

Definition at line 387 of file RuleEnsemble.h.

Friends And Related Function Documentation

◆ operator<<

std::ostream & operator<< ( std::ostream &  os,
const RuleEnsemble rules 
)
friend

Member Data Documentation

◆ fAverageRuleSigma

Double_t TMVA::RuleEnsemble::fAverageRuleSigma
private

average rule sigma

Definition at line 353 of file RuleEnsemble.h.

◆ fAverageSupport

Double_t TMVA::RuleEnsemble::fAverageSupport
private

average support (over all rules)

Definition at line 352 of file RuleEnsemble.h.

◆ fEvent

const Event* TMVA::RuleEnsemble::fEvent
private

current event.

Definition at line 368 of file RuleEnsemble.h.

◆ fEventCacheOK

Bool_t TMVA::RuleEnsemble::fEventCacheOK
private

true if rule/linear respons are updated

Definition at line 369 of file RuleEnsemble.h.

◆ fEventLinearVal

std::vector<Double_t> TMVA::RuleEnsemble::fEventLinearVal
private

linear respons

Definition at line 371 of file RuleEnsemble.h.

◆ fEventRuleVal

std::vector<Char_t> TMVA::RuleEnsemble::fEventRuleVal
private

the rule respons of current event <--— stores boolean

Definition at line 370 of file RuleEnsemble.h.

◆ fImportanceCut

Double_t TMVA::RuleEnsemble::fImportanceCut
private

minimum importance accepted

Definition at line 338 of file RuleEnsemble.h.

◆ fImportanceRef

Double_t TMVA::RuleEnsemble::fImportanceRef
private

reference importance (max)

Definition at line 351 of file RuleEnsemble.h.

◆ fLearningModel

ELearningModel TMVA::RuleEnsemble::fLearningModel
private

can be full (rules+linear), rules, linear

Definition at line 337 of file RuleEnsemble.h.

◆ fLinCoefficients

std::vector< Double_t > TMVA::RuleEnsemble::fLinCoefficients
private

linear coefficients, one per variable

Definition at line 345 of file RuleEnsemble.h.

◆ fLinDM

std::vector< Double_t > TMVA::RuleEnsemble::fLinDM
private

delta-

Definition at line 344 of file RuleEnsemble.h.

◆ fLinDP

std::vector< Double_t > TMVA::RuleEnsemble::fLinDP
private

delta+ in eq 24, ref 2

Definition at line 343 of file RuleEnsemble.h.

◆ fLinImportance

std::vector< Double_t > TMVA::RuleEnsemble::fLinImportance
private

linear term importance

Definition at line 349 of file RuleEnsemble.h.

◆ fLinNorm

std::vector< Double_t > TMVA::RuleEnsemble::fLinNorm
private

norm of ditto, see after eq 26 in ref 2

Definition at line 346 of file RuleEnsemble.h.

◆ fLinPDFB

std::vector< TH1F* > TMVA::RuleEnsemble::fLinPDFB
private

pdfs for each variable, background

Definition at line 347 of file RuleEnsemble.h.

◆ fLinPDFS

std::vector< TH1F* > TMVA::RuleEnsemble::fLinPDFS
private

pdfs for each variable, signal

Definition at line 348 of file RuleEnsemble.h.

◆ fLinQuantile

Double_t TMVA::RuleEnsemble::fLinQuantile
private

quantile cut to remove outliers

Definition at line 339 of file RuleEnsemble.h.

◆ fLinTermOK

std::vector< Char_t > TMVA::RuleEnsemble::fLinTermOK
private

flags linear terms with sufficient strong importance <– stores boolean

Definition at line 342 of file RuleEnsemble.h.

◆ fLogger

MsgLogger* TMVA::RuleEnsemble::fLogger
mutableprivate

! message logger

Definition at line 381 of file RuleEnsemble.h.

◆ fNRulesGenerated

UInt_t TMVA::RuleEnsemble::fNRulesGenerated
private

number of rules generated, before cleanup

Definition at line 366 of file RuleEnsemble.h.

◆ fOffset

Double_t TMVA::RuleEnsemble::fOffset
private

offset in discriminator function

Definition at line 340 of file RuleEnsemble.h.

◆ fRuleFit

const RuleFit* TMVA::RuleEnsemble::fRuleFit
private

pointer to rule fit object

Definition at line 379 of file RuleEnsemble.h.

◆ fRuleFSig

Double_t TMVA::RuleEnsemble::fRuleFSig
private

N(sig)/N(sig)+N(bkg)

Definition at line 361 of file RuleEnsemble.h.

◆ fRuleMap

std::vector< std::vector<UInt_t> > TMVA::RuleEnsemble::fRuleMap
private

map of rule responses

Definition at line 374 of file RuleEnsemble.h.

◆ fRuleMapEvents

const std::vector<const TMVA::Event *>* TMVA::RuleEnsemble::fRuleMapEvents
private

pointer to vector of events used

Definition at line 377 of file RuleEnsemble.h.

◆ fRuleMapInd0

UInt_t TMVA::RuleEnsemble::fRuleMapInd0
private

start index

Definition at line 375 of file RuleEnsemble.h.

◆ fRuleMapInd1

UInt_t TMVA::RuleEnsemble::fRuleMapInd1
private

last index

Definition at line 376 of file RuleEnsemble.h.

◆ fRuleMapOK

Bool_t TMVA::RuleEnsemble::fRuleMapOK
private

true if MakeRuleMap() has been called

Definition at line 373 of file RuleEnsemble.h.

◆ fRuleMinDist

Double_t TMVA::RuleEnsemble::fRuleMinDist
private

minimum rule distance

Definition at line 365 of file RuleEnsemble.h.

◆ fRuleNCave

Double_t TMVA::RuleEnsemble::fRuleNCave
private

N(cuts) average.

Definition at line 362 of file RuleEnsemble.h.

◆ fRuleNCsig

Double_t TMVA::RuleEnsemble::fRuleNCsig
private

idem sigma

Definition at line 363 of file RuleEnsemble.h.

◆ fRulePBB

std::vector< Double_t > TMVA::RuleEnsemble::fRulePBB
private

p(tag as B|B)

Definition at line 359 of file RuleEnsemble.h.

◆ fRulePBS

std::vector< Double_t > TMVA::RuleEnsemble::fRulePBS
private

p(tag as B|S)

Definition at line 358 of file RuleEnsemble.h.

◆ fRulePSB

std::vector< Double_t > TMVA::RuleEnsemble::fRulePSB
private

p(tag as S|B)

Definition at line 357 of file RuleEnsemble.h.

◆ fRulePSS

std::vector< Double_t > TMVA::RuleEnsemble::fRulePSS
private

p(tag as S|S) - tagged as S if rule is SIG and the event is accepted

Definition at line 356 of file RuleEnsemble.h.

◆ fRulePTag

std::vector< Double_t > TMVA::RuleEnsemble::fRulePTag
private

p(tag)

Definition at line 360 of file RuleEnsemble.h.

◆ fRules

std::vector< TMVA::Rule* > TMVA::RuleEnsemble::fRules
private

vector of rules

Definition at line 341 of file RuleEnsemble.h.

◆ fRuleVarFrac

std::vector< Double_t > TMVA::RuleEnsemble::fRuleVarFrac
private

fraction of rules using a given variable - size of vector = n(variables)

Definition at line 355 of file RuleEnsemble.h.

◆ fVarImportance

std::vector< Double_t > TMVA::RuleEnsemble::fVarImportance
private

one importance per input variable

Definition at line 350 of file RuleEnsemble.h.

Libraries for TMVA::RuleEnsemble:
[legend]

The documentation for this class was generated from the following files: