ROOT  6.06/08
Reference Guide
Public Types | Public Member Functions | Private Member Functions | Private Attributes | Friends | List of all members
TMVA::RuleEnsemble Class Reference

Definition at line 67 of file RuleEnsemble.h.

Public Types

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

Public Member Functions

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

Private Member Functions

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

Private Attributes

ELearningModel fLearningModel
 
Double_t fImportanceCut
 
Double_t fLinQuantile
 
Double_t fOffset
 
std::vector< TMVA::Rule *> fRules
 
std::vector< Char_tfLinTermOK
 
std::vector< Double_tfLinDP
 
std::vector< Double_tfLinDM
 
std::vector< Double_tfLinCoefficients
 
std::vector< Double_tfLinNorm
 
std::vector< TH1F *> fLinPDFB
 
std::vector< TH1F *> fLinPDFS
 
std::vector< Double_tfLinImportance
 
std::vector< Double_tfVarImportance
 
Double_t fImportanceRef
 
Double_t fAverageSupport
 
Double_t fAverageRuleSigma
 
std::vector< Double_tfRuleVarFrac
 
std::vector< Double_tfRulePSS
 
std::vector< Double_tfRulePSB
 
std::vector< Double_tfRulePBS
 
std::vector< Double_tfRulePBB
 
std::vector< Double_tfRulePTag
 
Double_t fRuleFSig
 
Double_t fRuleNCave
 
Double_t fRuleNCsig
 
Double_t fRuleMinDist
 
UInt_t fNRulesGenerated
 
const EventfEvent
 
Bool_t fEventCacheOK
 
std::vector< Char_tfEventRuleVal
 
std::vector< Double_tfEventLinearVal
 
Bool_t fRuleMapOK
 
std::vector< std::vector< UInt_t > > fRuleMap
 
UInt_t fRuleMapInd0
 
UInt_t fRuleMapInd1
 
const std::vector< const TMVA::Event * > * fRuleMapEvents
 
const RuleFitfRuleFit
 
MsgLoggerfLogger
 

Friends

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

#include <TMVA/RuleEnsemble.h>

+ Collaboration diagram for TMVA::RuleEnsemble:

Member Enumeration Documentation

§ ELearningModel

Enumerator
kFull 
kRules 
kLinear 

Definition at line 74 of file RuleEnsemble.h.

Constructor & Destructor Documentation

§ RuleEnsemble() [1/3]

TMVA::RuleEnsemble::RuleEnsemble ( RuleFit rf)

constructor

Definition at line 44 of file RuleEnsemble.cxx.

§ RuleEnsemble() [2/3]

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

copy constructor

Definition at line 70 of file RuleEnsemble.cxx.

§ RuleEnsemble() [3/3]

TMVA::RuleEnsemble::RuleEnsemble ( )

constructor

Definition at line 83 of file RuleEnsemble.cxx.

§ ~RuleEnsemble()

TMVA::RuleEnsemble::~RuleEnsemble ( )
virtual

destructor

Definition at line 110 of file RuleEnsemble.cxx.

Member Function Documentation

§ AddOffset()

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

Definition at line 123 of file RuleEnsemble.h.

§ AddRule()

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

add a new rule to the tree

Definition at line 1303 of file RuleEnsemble.cxx.

Referenced by DeleteRules(), and MakeRulesFromTree().

§ AddXMLTo()

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

write rules to XML

Definition at line 1095 of file RuleEnsemble.cxx.

Referenced by TMVA::MethodRuleFit::AddWeightsXMLTo(), and IsRuleMapOK().

§ CalcImportance()

void TMVA::RuleEnsemble::CalcImportance ( )

calculate the importance of each rule

Definition at line 420 of file RuleEnsemble.cxx.

Referenced by TMVA::RuleFit::CalcImportance(), and ClearRuleMap().

§ CalcLinImportance()

Double_t TMVA::RuleEnsemble::CalcLinImportance ( )

calculate the linear importance for each rule

Definition at line 461 of file RuleEnsemble.cxx.

Referenced by CalcImportance(), ClearRuleMap(), and TMVA::RuleFitAPI::ReadModelSum().

§ CalcLinNorm()

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

Definition at line 130 of file RuleEnsemble.h.

Referenced by MakeLinearTerms(), and TMVA::RuleFitAPI::ReadModelSum().

§ CalcNRules()

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

calculate the number of rules

Definition at line 1266 of file RuleEnsemble.cxx.

Referenced by MakeRules(), and SetAverageRuleSigma().

§ CalcRuleImportance()

Double_t TMVA::RuleEnsemble::CalcRuleImportance ( )

calculate importance of each rule

Definition at line 441 of file RuleEnsemble.cxx.

Referenced by CalcImportance(), and ClearRuleMap().

§ CalcRuleSupport()

void TMVA::RuleEnsemble::CalcRuleSupport ( )

calculate the support for all rules

Definition at line 369 of file RuleEnsemble.cxx.

Referenced by ClearRuleMap(), and MakeModel().

§ CalcVarImportance()

void TMVA::RuleEnsemble::CalcVarImportance ( )

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

Definition at line 489 of file RuleEnsemble.cxx.

Referenced by TMVA::RuleFit::CalcImportance(), ClearRuleMap(), and TMVA::RuleFitAPI::ReadModelSum().

§ CleanupLinear()

void TMVA::RuleEnsemble::CleanupLinear ( )

cleanup linear model

Definition at line 354 of file RuleEnsemble.cxx.

Referenced by TMVA::RuleFit::CalcImportance(), ClearRuleMap(), and TMVA::RuleFitAPI::ReadModelSum().

§ CleanupRules()

void TMVA::RuleEnsemble::CleanupRules ( )

cleanup rules

Definition at line 323 of file RuleEnsemble.cxx.

Referenced by TMVA::RuleFit::CalcImportance(), and ClearRuleMap().

§ ClearCoefficients()

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

Definition at line 133 of file RuleEnsemble.h.

Referenced by TMVA::RuleFitParams::MakeGDPath().

§ ClearLinCoefficients()

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

Definition at line 134 of file RuleEnsemble.h.

Referenced by TMVA::RuleFitParams::MakeGDPath().

§ ClearLinNorm()

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

Definition at line 135 of file RuleEnsemble.h.

§ ClearRuleMap()

void TMVA::RuleEnsemble::ClearRuleMap ( )
inline

Definition at line 164 of file RuleEnsemble.h.

Referenced by TMVA::MethodRuleFit::Train().

§ CoefficientRadius()

Double_t TMVA::RuleEnsemble::CoefficientRadius ( )

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

Definition at line 190 of file RuleEnsemble.cxx.

Referenced by TMVA::RuleFitParams::MakeGDPath(), and operator=().

§ Copy()

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

copy function

Definition at line 1239 of file RuleEnsemble.cxx.

Referenced by DeleteRules(), operator=(), and RuleEnsemble().

§ DeleteRules()

void TMVA::RuleEnsemble::DeleteRules ( )
inlineprivate

Definition at line 333 of file RuleEnsemble.h.

Referenced by ReadFromXML(), ReadRaw(), and SetRules().

§ DoFull()

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

Definition at line 271 of file RuleEnsemble.h.

§ DoLinear()

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

§ DoOnlyLinear()

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

Definition at line 270 of file RuleEnsemble.h.

Referenced by TMVA::RuleFitAPI::ImportSetup().

§ DoOnlyRules()

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

Definition at line 269 of file RuleEnsemble.h.

Referenced by TMVA::RuleFitAPI::ImportSetup().

§ DoRules()

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

§ EvalEvent() [1/6]

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

§ EvalEvent() [2/6]

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

Definition at line 481 of file RuleEnsemble.h.

§ EvalEvent() [3/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 453 of file RuleEnsemble.h.

§ EvalEvent() [4/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 490 of file RuleEnsemble.h.

§ EvalEvent() [5/6]

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

Definition at line 502 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 528 of file RuleEnsemble.h.

§ EvalLinEvent() [1/9]

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

§ EvalLinEvent() [2/9]

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

Definition at line 587 of file RuleEnsemble.h.

§ EvalLinEvent() [3/9]

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

Definition at line 600 of file RuleEnsemble.h.

§ EvalLinEvent() [4/9]

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

Definition at line 610 of file RuleEnsemble.h.

§ EvalLinEvent() [5/9]

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

Definition at line 620 of file RuleEnsemble.h.

§ EvalLinEvent() [6/9]

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

Definition at line 645 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 630 of file RuleEnsemble.h.

§ EvalLinEvent() [8/9]

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

Definition at line 660 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 670 of file RuleEnsemble.h.

§ EvalLinEventRaw() [1/2]

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

§ EvalLinEventRaw() [2/2]

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

Definition at line 563 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 1278 of file RuleEnsemble.cxx.

Referenced by CalcNRules(), and SetAverageRuleSigma().

§ 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 793 of file RuleEnsemble.cxx.

Referenced by TMVA::RuleFitParams::CalcFStar(), ClearRuleMap(), and FStar().

§ 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 779 of file RuleEnsemble.cxx.

§ GetAverageRuleSigma()

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

Definition at line 306 of file RuleEnsemble.h.

§ GetAverageSupport()

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

Definition at line 305 of file RuleEnsemble.h.

§ GetCoefficients()

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

Retrieve all rule coefficients.

Definition at line 234 of file RuleEnsemble.cxx.

Referenced by TMVA::RuleFitParams::MakeGDPath(), and operator=().

§ GetEvent()

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

Definition at line 265 of file RuleEnsemble.h.

§ GetEventLinearVal()

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

Definition at line 308 of file RuleEnsemble.h.

§ GetEventLinearValNorm()

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

Definition at line 309 of file RuleEnsemble.h.

Referenced by EvalLinEvent(), and TMVA::RuleFitParams::EvaluateAverage().

§ GetEventRuleMap()

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

§ GetEventRuleVal()

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

Definition at line 307 of file RuleEnsemble.h.

Referenced by TMVA::RuleFitParams::EvaluateAverage().

§ GetImportanceCut()

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

Definition at line 273 of file RuleEnsemble.h.

Referenced by Copy(), and TMVA::RuleFit::FillVisHistCorr().

§ GetImportanceRef()

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

§ GetLearningModel()

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

Definition at line 272 of file RuleEnsemble.h.

Referenced by Copy().

§ GetLinCoefficients() [1/2]

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

§ GetLinCoefficients() [2/2]

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

Definition at line 291 of file RuleEnsemble.h.

§ GetLinDM()

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

Definition at line 293 of file RuleEnsemble.h.

Referenced by TMVA::MethodRuleFit::MakeClassLinear().

§ GetLinDP()

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

Definition at line 294 of file RuleEnsemble.h.

Referenced by TMVA::MethodRuleFit::MakeClassLinear().

§ GetLinImportance() [1/2]

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

Definition at line 281 of file RuleEnsemble.h.

Referenced by TMVA::RuleFit::FillLin(), and TMVA::MethodRuleFit::MakeClassLinear().

§ GetLinImportance() [2/2]

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

Definition at line 295 of file RuleEnsemble.h.

§ GetLinNorm() [1/2]

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

§ GetLinNorm() [2/2]

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

Definition at line 292 of file RuleEnsemble.h.

§ GetLinQuantile()

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

Definition at line 284 of file RuleEnsemble.h.

Referenced by Copy().

§ GetMethodBase()

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

Get a pointer to the original MethodRuleFit.

Definition at line 162 of file RuleEnsemble.cxx.

Referenced by CalcVarImportance(), TMVA::Rule::GetVarName(), Initialize(), operator=(), Print(), and RuleResponseStats().

§ GetMethodRuleFit()

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

Get a pointer to the original MethodRuleFit.

Definition at line 152 of file RuleEnsemble.cxx.

Referenced by CalcRuleSupport(), operator=(), and PrintRuleGen().

§ GetNLinear()

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

§ GetNRules()

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

§ GetOffset()

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

§ GetRuleFit()

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

Definition at line 261 of file RuleEnsemble.h.

Referenced by Copy(), and TMVA::Rule::RuleDist().

§ GetRuleMapEvent()

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

Definition at line 312 of file RuleEnsemble.h.

Referenced by TMVA::RuleFitParams::LossFunction().

§ GetRuleMinDist()

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

Definition at line 290 of file RuleEnsemble.h.

Referenced by Copy().

§ GetRulePBB()

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

Definition at line 301 of file RuleEnsemble.h.

Referenced by TMVA::MethodRuleFit::TrainTMVARuleFit().

§ GetRulePBS()

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

Definition at line 300 of file RuleEnsemble.h.

Referenced by TMVA::MethodRuleFit::TrainTMVARuleFit().

§ GetRulePSB()

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

Definition at line 299 of file RuleEnsemble.h.

Referenced by TMVA::MethodRuleFit::TrainTMVARuleFit().

§ GetRulePSS()

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

Definition at line 298 of file RuleEnsemble.h.

Referenced by TMVA::MethodRuleFit::TrainTMVARuleFit().

§ GetRulePTag()

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

Definition at line 297 of file RuleEnsemble.h.

Referenced by TMVA::MethodRuleFit::TrainTMVARuleFit().

§ GetRules() [1/2]

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

§ GetRules() [2/2]

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

Definition at line 287 of file RuleEnsemble.h.

§ GetRulesConst() [1/2]

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

§ GetRulesConst() [2/2]

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

Definition at line 286 of file RuleEnsemble.h.

§ GetRulesNCuts()

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

Definition at line 289 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 256 of file RuleEnsemble.cxx.

Referenced by GetRuleFit().

§ GetTrainingEvents()

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

get list of training events from the rule fitter

Definition at line 248 of file RuleEnsemble.cxx.

Referenced by CalcRuleSupport(), GetRuleFit(), MakeLinearTerms(), MakeRuleMap(), and RuleResponseStats().

§ GetVarImportance() [1/2]

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

Definition at line 282 of file RuleEnsemble.h.

Referenced by Copy(), and TMVA::MethodRuleFit::CreateRanking().

§ GetVarImportance() [2/2]

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

Definition at line 296 of file RuleEnsemble.h.

§ Initialize()

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

Initializes all member variables with default values.

Definition at line 122 of file RuleEnsemble.cxx.

Referenced by TMVA::RuleFit::InitPtrs(), and RuleEnsemble().

§ IsLinTermOK()

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

Definition at line 303 of file RuleEnsemble.h.

Referenced by TMVA::MethodRuleFit::MakeClassLinear().

§ IsRuleMapOK()

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

Definition at line 313 of file RuleEnsemble.h.

Referenced by TMVA::RuleFitParams::EvaluateAverage().

§ Log()

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

§ MakeLinearTerms()

void TMVA::RuleEnsemble::MakeLinearTerms ( )

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

Definition at line 611 of file RuleEnsemble.cxx.

Referenced by MakeModel().

§ MakeModel()

void TMVA::RuleEnsemble::MakeModel ( )

create model

Definition at line 170 of file RuleEnsemble.cxx.

Referenced by TMVA::RuleFit::Initialize().

§ 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 1370 of file RuleEnsemble.cxx.

Referenced by MakeModel(), and SetEvent().

§ 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 556 of file RuleEnsemble.cxx.

Referenced by MakeModel().

§ MakeRulesFromTree()

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

create rules from the decsision tree structure

Definition at line 1294 of file RuleEnsemble.cxx.

Referenced by DeleteRules(), and MakeRules().

§ 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 1332 of file RuleEnsemble.cxx.

Referenced by AddRule(), and DeleteRules().

§ operator=()

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

Definition at line 250 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 720 of file RuleEnsemble.cxx.

Referenced by ClearRuleMap(), and FStar().

§ 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 746 of file RuleEnsemble.cxx.

Referenced by ClearRuleMap(), and FStar().

§ Print()

void TMVA::RuleEnsemble::Print ( ) const

§ PrintRaw()

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

write rules to stream

Definition at line 1061 of file RuleEnsemble.cxx.

Referenced by IsRuleMapOK().

§ PrintRuleGen()

void TMVA::RuleEnsemble::PrintRuleGen ( ) const

print rule generation info

Definition at line 924 of file RuleEnsemble.cxx.

Referenced by IsRuleMapOK(), and MakeModel().

§ ReadFromXML()

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

read rules from XML

Definition at line 1126 of file RuleEnsemble.cxx.

Referenced by IsRuleMapOK(), and TMVA::MethodRuleFit::ReadWeightsFromXML().

§ ReadRaw()

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

read rule ensemble from stream

Definition at line 1181 of file RuleEnsemble.cxx.

Referenced by IsRuleMapOK(), and TMVA::MethodRuleFit::ReadWeightsFromStream().

§ RemoveSimilarRules()

void TMVA::RuleEnsemble::RemoveSimilarRules ( )

remove rules that behave similar

Definition at line 264 of file RuleEnsemble.cxx.

Referenced by ClearRuleMap(), and MakeRules().

§ ResetCoefficients()

void TMVA::RuleEnsemble::ResetCoefficients ( )
private

reset all rule coefficients

Definition at line 207 of file RuleEnsemble.cxx.

Referenced by DeleteRules(), and MakeRules().

§ RuleResponseStats()

void TMVA::RuleEnsemble::RuleResponseStats ( )

calculate various statistics for this rule

Definition at line 815 of file RuleEnsemble.cxx.

Referenced by TMVA::RuleFit::CalcImportance(), and ClearRuleMap().

§ RuleStatistics()

void TMVA::RuleEnsemble::RuleStatistics ( )

calculate various statistics for this rule

Definition at line 902 of file RuleEnsemble.cxx.

Referenced by ClearRuleMap(), and MakeModel().

§ SetAverageRuleSigma()

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

Definition at line 147 of file RuleEnsemble.h.

Referenced by CalcRuleSupport(), Initialize(), and TMVA::RuleFitAPI::ReadModelSum().

§ SetCoefficient()

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

Definition at line 120 of file RuleEnsemble.h.

Referenced by ClearCoefficients(), and SetCoefficient().

§ SetCoefficients()

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

set all rule coefficients

Definition at line 219 of file RuleEnsemble.cxx.

Referenced by TMVA::RuleFitParams::FindGDTau(), TMVA::RuleFitParams::MakeGDPath(), and SetRuleFit().

§ SetEvent()

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

Definition at line 155 of file RuleEnsemble.h.

Referenced by EvalEvent(), EvalLinEvent(), and FStar().

§ SetImportanceCut()

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

Definition at line 141 of file RuleEnsemble.h.

Referenced by TMVA::RuleFit::SetImportanceCut().

§ SetImportanceRef()

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

set reference importance

Definition at line 431 of file RuleEnsemble.cxx.

Referenced by CalcImportance(), ClearRuleMap(), and TMVA::RuleFitAPI::ReadModelSum().

§ SetLinCoefficient()

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

Definition at line 125 of file RuleEnsemble.h.

Referenced by TMVA::RuleFitParams::UpdateCoefficients().

§ SetLinCoefficients()

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

§ SetLinDM()

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

Definition at line 126 of file RuleEnsemble.h.

Referenced by TMVA::RuleFitAPI::ReadModelSum().

§ SetLinDP()

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

Definition at line 127 of file RuleEnsemble.h.

Referenced by TMVA::RuleFitAPI::ReadModelSum().

§ SetLinNorm()

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

Definition at line 128 of file RuleEnsemble.h.

Referenced by TMVA::RuleFitAPI::ReadModelSum().

§ SetLinQuantile()

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

Definition at line 144 of file RuleEnsemble.h.

Referenced by TMVA::MethodRuleFit::ProcessOptions().

§ SetModelFull()

void TMVA::RuleEnsemble::SetModelFull ( )
inline

Definition at line 110 of file RuleEnsemble.h.

Referenced by TMVA::RuleFit::SetModelFull().

§ SetModelLinear()

void TMVA::RuleEnsemble::SetModelLinear ( )
inline

Definition at line 104 of file RuleEnsemble.h.

Referenced by TMVA::RuleFit::SetModelLinear().

§ SetModelRules()

void TMVA::RuleEnsemble::SetModelRules ( )
inline

Definition at line 107 of file RuleEnsemble.h.

Referenced by TMVA::RuleFit::SetModelRules().

§ SetMsgType()

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

Definition at line 142 of file RuleEnsemble.cxx.

Referenced by TMVA::RuleFit::SetMsgType().

§ SetOffset()

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

§ SetRuleFit()

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

Definition at line 116 of file RuleEnsemble.h.

§ SetRuleMinDist()

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

Definition at line 138 of file RuleEnsemble.h.

Referenced by TMVA::RuleFit::SetRuleMinDist().

§ SetRules()

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

set rules

first clear all

Definition at line 539 of file RuleEnsemble.cxx.

Referenced by TMVA::RuleFitAPI::ReadModelSum(), and SetModelFull().

§ UpdateEventVal()

void TMVA::RuleEnsemble::UpdateEventVal ( )
inline

Definition at line 401 of file RuleEnsemble.h.

Referenced by EvalEvent(), EvalLinEvent(), FStar(), and SetEvent().

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

§ fAverageSupport

Double_t TMVA::RuleEnsemble::fAverageSupport
private

§ fEvent

const Event* TMVA::RuleEnsemble::fEvent
private

Definition at line 382 of file RuleEnsemble.h.

Referenced by GetEvent(), SetEvent(), and UpdateEventVal().

§ fEventCacheOK

Bool_t TMVA::RuleEnsemble::fEventCacheOK
private

Definition at line 383 of file RuleEnsemble.h.

Referenced by Copy(), SetEvent(), SetRules(), and UpdateEventVal().

§ fEventLinearVal

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

§ fEventRuleVal

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

Definition at line 384 of file RuleEnsemble.h.

Referenced by EvalEvent(), GetEventRuleVal(), PdfRule(), and UpdateEventVal().

§ fImportanceCut

Double_t TMVA::RuleEnsemble::fImportanceCut
private

§ fImportanceRef

Double_t TMVA::RuleEnsemble::fImportanceRef
private

§ fLearningModel

ELearningModel TMVA::RuleEnsemble::fLearningModel
private

§ fLinCoefficients

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

§ fLinDM

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

§ fLinDP

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

§ fLinImportance

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

§ fLinNorm

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

§ fLinPDFB

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

Definition at line 361 of file RuleEnsemble.h.

Referenced by Initialize(), MakeLinearTerms(), and PdfLinear().

§ fLinPDFS

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

Definition at line 362 of file RuleEnsemble.h.

Referenced by Initialize(), MakeLinearTerms(), and PdfLinear().

§ fLinQuantile

Double_t TMVA::RuleEnsemble::fLinQuantile
private

§ fLinTermOK

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

§ fLogger

MsgLogger* TMVA::RuleEnsemble::fLogger
mutableprivate

Definition at line 395 of file RuleEnsemble.h.

Referenced by Log(), Print(), SetMsgType(), and ~RuleEnsemble().

§ fNRulesGenerated

UInt_t TMVA::RuleEnsemble::fNRulesGenerated
private

Definition at line 380 of file RuleEnsemble.h.

Referenced by Copy(), MakeRules(), and PrintRuleGen().

§ fOffset

Double_t TMVA::RuleEnsemble::fOffset
private

§ fRuleFit

const RuleFit* TMVA::RuleEnsemble::fRuleFit
private

§ fRuleFSig

Double_t TMVA::RuleEnsemble::fRuleFSig
private

Definition at line 375 of file RuleEnsemble.h.

Referenced by Copy(), Print(), and RuleResponseStats().

§ fRuleMap

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

Definition at line 388 of file RuleEnsemble.h.

Referenced by ClearRuleMap(), EvalEvent(), GetEventRuleMap(), and MakeRuleMap().

§ fRuleMapEvents

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

Definition at line 391 of file RuleEnsemble.h.

Referenced by ClearRuleMap(), EvalEvent(), EvalLinEvent(), GetRuleMapEvent(), and MakeRuleMap().

§ fRuleMapInd0

UInt_t TMVA::RuleEnsemble::fRuleMapInd0
private

Definition at line 389 of file RuleEnsemble.h.

Referenced by Copy(), EvalEvent(), EvalLinEvent(), and MakeRuleMap().

§ fRuleMapInd1

UInt_t TMVA::RuleEnsemble::fRuleMapInd1
private

Definition at line 390 of file RuleEnsemble.h.

Referenced by Copy(), EvalEvent(), EvalLinEvent(), and MakeRuleMap().

§ fRuleMapOK

Bool_t TMVA::RuleEnsemble::fRuleMapOK
private

Definition at line 387 of file RuleEnsemble.h.

Referenced by Copy(), IsRuleMapOK(), and MakeRuleMap().

§ fRuleMinDist

Double_t TMVA::RuleEnsemble::fRuleMinDist
private

Definition at line 379 of file RuleEnsemble.h.

Referenced by Copy(), GetRuleMinDist(), RemoveSimilarRules(), and SetRuleMinDist().

§ fRuleNCave

Double_t TMVA::RuleEnsemble::fRuleNCave
private

Definition at line 376 of file RuleEnsemble.h.

Referenced by Copy(), Print(), PrintRuleGen(), and RuleStatistics().

§ fRuleNCsig

Double_t TMVA::RuleEnsemble::fRuleNCsig
private

Definition at line 377 of file RuleEnsemble.h.

Referenced by Copy(), Print(), PrintRuleGen(), and RuleStatistics().

§ fRulePBB

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

Definition at line 373 of file RuleEnsemble.h.

Referenced by GetRulePBB(), and RuleResponseStats().

§ fRulePBS

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

Definition at line 372 of file RuleEnsemble.h.

Referenced by GetRulePBS(), and RuleResponseStats().

§ fRulePSB

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

Definition at line 371 of file RuleEnsemble.h.

Referenced by GetRulePSB(), and RuleResponseStats().

§ fRulePSS

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

Definition at line 370 of file RuleEnsemble.h.

Referenced by GetRulePSS(), and RuleResponseStats().

§ fRulePTag

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

Definition at line 374 of file RuleEnsemble.h.

Referenced by GetRulePTag(), and RuleResponseStats().

§ fRules

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

§ fRuleVarFrac

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

Definition at line 369 of file RuleEnsemble.h.

Referenced by Print(), and RuleResponseStats().

§ fVarImportance

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

Definition at line 364 of file RuleEnsemble.h.

Referenced by CalcVarImportance(), Copy(), GetVarImportance(), Initialize(), and Print().


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