33#ifndef ROOT_TMVA_RuleFitParams
34#define ROOT_TMVA_RuleFitParams
73 fGDTauMin = (t0>1.0 ? 1.0:(t0<0.0 ? 0.0:t0));
130 typedef std::vector<const TMVA::Event *>::const_iterator
EventItr;
173 std::vector<Double_t> &avsel,
174 std::vector<Double_t> &avrul);
Bool_t operator()(Double_t first, Double_t second) const
ostringstream derivative to redirect and format output
A class doing the actual fitting of a linear model using rules as base functions.
void CalcTstAverageResponse()
calc average response for all test paths - TODO: see comment under CalcAverageResponse() note that 0 ...
void MakeGDPath()
The following finds the gradient directed path in parameter space.
std::vector< std::vector< Double_t > > fGDCoefLinTst
void EvaluateAverage(UInt_t ind1, UInt_t ind2, std::vector< Double_t > &avsel, std::vector< Double_t > &avrul)
evaluate the average of each variable and f(x) in the given range
UInt_t RiskPerfTst()
Estimates the error rate with the current set of parameters.
Double_t Risk(UInt_t ind1, UInt_t ind2, Double_t neff) const
risk assessment
Double_t RiskPerf(UInt_t itau) const
Double_t Optimism()
implementation of eq.
Int_t FindGDTau()
This finds the cutoff parameter tau by scanning several different paths.
void SetGDPathStep(Double_t s)
std::vector< Double_t > fAverageSelectorPath
void EvaluateAveragePerf()
std::vector< Double_t > fGradVecLin
virtual ~RuleFitParams()
destructor
RuleFitParams()
constructor
void SetRuleFit(RuleFit *rf)
std::vector< constTMVA::Event * >::const_iterator EventItr
void Init()
Initializes all parameters using the RuleEnsemble and the training tree.
Double_t CalcAverageResponse()
calculate the average response - TODO : rewrite bad dependancy on EvaluateAverage() !
std::vector< Double_t > fAverageRulePerf
void SetMsgType(EMsgType t)
Double_t Penalty() const
This is the "lasso" penalty To be used for regression.
std::vector< std::vector< Double_t > > fGradVecLinTst
void SetGDTauRange(Double_t t0, Double_t t1)
std::vector< std::vector< Double_t > > fGDCoefTst
Double_t RiskPath() const
void FillCoefficients()
helper function to store the rule coefficients in local arrays
std::vector< Double_t > fGDTauVec
void SetGDErrScale(Double_t s)
void InitGD()
Initialize GD path search.
void EvaluateAveragePath()
std::vector< Double_t > fGDErrTst
void ErrorRateRocTst()
Estimates the error rate with the current set of parameters.
void SetGDTauPrec(Double_t p)
std::vector< Double_t > fGradVec
std::vector< Double_t > fAverageSelectorPerf
std::vector< std::vector< Double_t > > fGradVecTst
std::vector< Char_t > fGDErrTstOK
RuleEnsemble * fRuleEnsemble
void CalcFStar()
Estimates F* (optimum scoring function) for all events for the given sets.
MsgLogger & Log() const
message logger
UInt_t GetPathIdx2() const
void MakeTstGradientVector()
make test gradient vector for all tau same algorithm as MakeGradientVector()
UInt_t GetPerfIdx2() const
Double_t CalcAverageTruth()
calculate the average truth
void SetGDTauScan(UInt_t n)
std::vector< Double_t > fFstar
void UpdateTstCoefficients()
Establish maximum gradient for rules, linear terms and the offset for all taus TODO: do not need inde...
Double_t RiskPerf() const
void MakeGradientVector()
make gradient vector
void UpdateCoefficients()
Establish maximum gradient for rules, linear terms and the offset.
UInt_t GetPerfIdx1() const
void InitNtuple()
initializes the ntuple
Double_t CalcAverageResponseOLD()
Double_t ErrorRateBin()
Estimates the error rate with the current set of parameters It uses a binary estimate of (y-F*(x)) (y...
void SetGDTau(Double_t t)
Double_t ErrorRateReg()
Estimates the error rate with the current set of parameters This code is pretty messy at the moment.
std::vector< Double_t > fGDOfsTst
UInt_t GetPathIdx1() const
Double_t ErrorRateRoc()
Estimates the error rate with the current set of parameters.
Double_t ErrorRateRocRaw(std::vector< Double_t > &sFsig, std::vector< Double_t > &sFbkg)
Estimates the error rate with the current set of parameters.
std::vector< Double_t > fAverageRulePath
void SetGDNPathSteps(Int_t np)
A class implementing various fits of rule ensembles.
A TTree represents a columnar dataset.
create variable transformations