26#ifndef ROOT_TMVA_MethodRuleFit
27#define ROOT_TMVA_MethodRuleFit
143 inline Bool_t VerifyRange( MsgLogger& mlog,
const char *varstr, T& var,
const T& vmin,
const T& vmax );
146 inline Bool_t VerifyRange( MsgLogger& mlog,
const char *varstr, T& var,
const T& vmin,
const T& vmax,
const T& vdef );
221 if (var>vmax)
return 1;
222 if (var<vmin)
return -1;
243 mlog << kWARNING <<
"Option <" << varstr <<
"> " << (dir==1 ?
"above":
"below") <<
" allowed range. Reset to new value = " << var <<
Endl;
261 mlog << kWARNING <<
"Option <" << varstr <<
"> " << (dir==1 ?
"above":
"below") <<
" allowed range. Reset to default value = " << var <<
Endl;
#define ClassDef(name, id)
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char ColorStruct_t color const char Pixmap_t Pixmap_t PictureAttributes_t attr const char char ret_data h unsigned char height h Atom_t Int_t ULong_t ULong_t unsigned char prop_list Atom_t Atom_t Atom_t Time_t type
Describe directory structure in memory.
Class that contains all the data information.
Virtual base Class for all MVA method.
TDirectory * BaseDir() const
returns the ROOT directory where info/histograms etc of the corresponding MVA method instance are sto...
virtual void ReadWeightsFromStream(std::istream &)=0
J Friedman's RuleFit method.
Double_t GetLinQuantile() const
RuleFit fRuleFit
RuleFit instance.
RuleFit * GetRuleFitPtr()
const std::vector< TMVA::Event * > & GetTrainingEvents() const
UInt_t fGDTauScan
GD path: number of points to scan.
Double_t fNTPss
ntuple: rule P(tag s, true s)
TString fForestTypeS
forest generation: how the trees are generated
Int_t GetRFNendnodes() const
Double_t GetMinFracNEve() const
Double_t GetGDPathEveFrac() const
Double_t fMinimp
rule/linear: minimum importance
TString fRuleFitModuleS
which rulefit module to use
Double_t fLinQuantile
quantile cut to remove outliers - see RuleEnsemble
void MakeClassSpecific(std::ostream &, const TString &) const
write specific classifier response
Double_t fMinFracNEve
min fraction of number events
Int_t fNTType
ntuple: rule type (+1->signal, -1->bkg)
Bool_t fUseRuleFitJF
if true interface with J.Friedmans RuleFit module
Double_t fGDTauMax
GD path: max threshold fraction [0..1].
Double_t fGDPathEveFrac
GD path: fraction of subsamples used for the fitting.
Bool_t fUseBoost
use boosted events for forest generation
TMVA::DecisionTree::EPruneMethod fPruneMethod
forest generation: method used for pruning - see DecisionTree
std::vector< DecisionTree * > fForest
the forest
Double_t GetGDErrScale() const
Double_t fMaxFracNEve
ditto max
Double_t GetGDValidEveFrac() const
Int_t GetRFNrules() const
TString fRFWorkDir
working directory from Friedmans module
Double_t fTreeEveFrac
fraction of events used for training each tree
const TString GetRFWorkDir() const
void MakeClassLinear(std::ostream &) const
print out the linear terms
Double_t fNTPsb
ntuple: rule P(tag s, true b)
void GetHelpMessage() const
get help message text
Int_t fNTNvars
ntuple: rule number of vars
Int_t fGDNPathSteps
GD path: number of steps.
std::vector< TMVA::Event * > fEventSample
the complete training sample
Double_t fNTPbb
ntuple: rule P(tag b, true b)
Double_t fNTSSB
ntuple: rule S/(S+B)
void TrainJFRuleFit()
training of rules using Jerome Friedmans implementation
Double_t GetPruneStrength() const
Int_t fNTNcuts
ntuple: rule number of cuts
TString fModelTypeS
rule ensemble: which model (rule,linear or both)
virtual Bool_t HasAnalysisType(Types::EAnalysisType type, UInt_t numberClasses, UInt_t)
RuleFit can handle classification with 2 classes.
Double_t fNTImportance
ntuple: rule importance
void ProcessOptions()
process the options specified by the user
const SeparationBase * GetSeparationBaseConst() const
TMVA::DecisionTree::EPruneMethod GetPruneMethod() const
void ReadWeightsFromStream(std::istream &istr)
read rules from an std::istream
void AddWeightsXMLTo(void *parent) const
add the rules to XML node
Double_t fGDValidEveFrac
GD path: fraction of subsamples used for the fitting.
void InitEventSample(void)
write all Events from the Tree into a vector of Events, that are more easily manipulated.
void MakeClassRuleCuts(std::ostream &) const
print out the rule cuts
Double_t fNTCoefficient
ntuple: rule coefficient
TDirectory * GetMethodBaseDir() const
const std::vector< TMVA::DecisionTree * > & GetForest() const
TString fSepTypeS
forest generation: separation type - see DecisionTree
void InitMonitorNtuple()
initialize the monitoring ntuple
Int_t fNTrees
number of trees in forest
Double_t fNTPtag
ntuple: rule P(tag)
virtual ~MethodRuleFit(void)
destructor
Int_t fRFNendnodes
max number of rules (only Friedmans module)
void Init(void)
default initialization
Double_t GetGDPathStep() const
Double_t fNTPbs
ntuple: rule P(tag b, true s)
TTree * fMonitorNtuple
pointer to monitor rule ntuple
void WriteMonitoringHistosToFile(void) const
write special monitoring histograms to file (here ntuple)
Double_t GetTreeEveFrac() const
Double_t fNTSupport
ntuple: rule support
Double_t fGDTauMin
GD path: min threshold fraction [0..1].
void ReadWeightsFromXML(void *wghtnode)
read rules from XML node
Double_t fGDTau
GD path: def threshold fraction [0..1].
SeparationBase * fSepType
the separation used in node splitting
Double_t fGDPathStep
GD path: step size in path.
Double_t fGDTauPrec
GD path: precision of estimated tau.
Double_t fPruneStrength
forest generation: prune strength - see DecisionTree
Int_t fNCuts
grid used in cut applied in node splitting
const RuleFit * GetRuleFitConstPtr() const
Double_t fGDErrScale
GD path: stop.
void DeclareOptions()
define the options (their key words) that can be set in the option string know options.
TString fPruneMethodS
forest generation: prune method - see DecisionTree
Double_t GetMaxFracNEve() const
Double_t fRuleMinDist
rule min distance - see RuleEnsemble
Int_t fRFNrules
max number of rules (only Friedmans module)
Bool_t VerifyRange(MsgLogger &mlog, const char *varstr, T &var, const T &vmin, const T &vmax)
Double_t GetMvaValue(Double_t *err=nullptr, Double_t *errUpper=nullptr)
returns MVA value for given event
SeparationBase * GetSeparationBase() const
Int_t GetGDNPathSteps() const
const Ranking * CreateRanking()
computes ranking of input variables
void TrainTMVARuleFit()
training of rules using TMVA implementation
Double_t fSignalFraction
scalefactor for bkg events to modify initial s/b fraction in training data
ostringstream derivative to redirect and format output
Ranking for variables in method (implementation)
A class implementing various fits of rule ensembles.
An interface to calculate the "SeparationGain" for different separation criteria used in various trai...
A TTree represents a columnar dataset.
create variable transformations
MsgLogger & Endl(MsgLogger &ml)