33 #ifndef ROOT_TMVA_RuleFitParams 34 #define ROOT_TMVA_RuleFitParams 77 fGDTauMin = (t0>1.0 ? 1.0:(t0<0.0 ? 0.0:t0));
134 typedef std::vector<const TMVA::Event *>::const_iterator
EventItr;
177 std::vector<Double_t> &avsel,
178 std::vector<Double_t> &avrul);
A class doing the actual fitting of a linear model using rules as base functions. ...
std::vector< std::vector< Double_t > > fGDCoefLinTst
std::vector< Double_t > fAverageSelectorPath
A class implementing various fits of rule ensembles.
void MakeGradientVector()
make gradient vector
void EvaluateAveragePerf()
void SetGDTau(Double_t t)
void FillCoefficients()
helper function to store the rule coefficients in local arrays
Double_t RiskPath() const
std::vector< std::vector< Double_t > > fGradVecTst
void EvaluateAveragePath()
std::vector< Double_t > fAverageRulePath
void SetGDTauPrec(Double_t p)
UInt_t GetPerfIdx2() const
std::vector< Double_t > fGDTauVec
UInt_t GetPerfIdx1() const
std::vector< Double_t > fFstar
UInt_t GetPathIdx2() const
void ErrorRateRocTst()
Estimates the error rate with the current set of parameters.
void MakeTstGradientVector()
make test gradient vector for all tau same algorithm as MakeGradientVector()
std::vector< std::vector< Double_t > > fGDCoefTst
Int_t FindGDTau()
This finds the cutoff parameter tau by scanning several different paths.
std::vector< Double_t > fAverageSelectorPerf
MsgLogger & Log() const
message logger
Double_t Risk(UInt_t ind1, UInt_t ind2, Double_t neff) const
risk assessment
UInt_t GetPathIdx1() const
Double_t CalcAverageTruth()
calculate the average truth
void SetGDErrScale(Double_t s)
Double_t ErrorRateBin()
Estimates the error rate with the current set of parameters It uses a binary estimate of (y-F*(x)) (y...
std::vector< Double_t > fAverageRulePerf
std::vector< const TMVA::Event * >::const_iterator EventItr
void SetMsgType(EMsgType t)
void SetGDNPathSteps(Int_t np)
Double_t LossFunction(const Event &e) const
Implementation of squared-error ramp loss function (eq 39,40 in ref 1) This is used for binary Classi...
void SetGDTauScan(UInt_t n)
Double_t RiskPerf(UInt_t itau) const
std::vector< Char_t > fGDErrTstOK
Double_t ErrorRateReg()
Estimates the error rate with the current set of parameters This code is pretty messy at the moment...
Double_t ErrorRateRoc()
Estimates the error rate with the current set of parameters.
Bool_t operator()(Double_t first, Double_t second) const
std::vector< Double_t > fGDOfsTst
Double_t Optimism()
implementation of eq.
Double_t Penalty() const
This is the "lasso" penalty To be used for regression.
void InitNtuple()
initializes the ntuple
Double_t CalcAverageResponseOLD()
void CalcFStar()
Estimates F* (optimum scoring function) for all events for the given sets.
virtual ~RuleFitParams()
destructor
you should not use this method at all Int_t Int_t Double_t Double_t Double_t e
std::vector< std::vector< Double_t > > fGradVecLinTst
void UpdateCoefficients()
Establish maximum gradient for rules, linear terms and the offset.
ostringstream derivative to redirect and format output
Double_t ErrorRateRocRaw(std::vector< Double_t > &sFsig, std::vector< Double_t > &sFbkg)
Estimates the error rate with the current set of parameters.
void SetGDTauRange(Double_t t0, Double_t t1)
RuleFitParams()
constructor
std::vector< Double_t > fGradVecLin
Abstract ClassifierFactory template that handles arbitrary types.
std::vector< Double_t > fGradVec
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() ! ...
RuleEnsemble * fRuleEnsemble
void InitGD()
Initialize GD path search.
A TTree object has a header with a name and a title.
void UpdateTstCoefficients()
Establish maximum gradient for rules, linear terms and the offset for all taus TODO: do not need inde...
void SetRuleFit(RuleFit *rf)
UInt_t RiskPerfTst()
Estimates the error rate with the current set of parameters.
std::vector< Double_t > fGDErrTst
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
void MakeGDPath()
The following finds the gradient directed path in parameter space.
Double_t RiskPerf() const
void SetGDPathStep(Double_t s)
Int_t Type(const Event *e) const
void CalcTstAverageResponse()
calc average response for all test paths - TODO: see comment under CalcAverageResponse() note that 0 ...