33 #ifndef ROOT_TMVA_RuleFitParams
34 #define ROOT_TMVA_RuleFitParams
37 #ifndef ROOT_TMathBase
46 #ifndef ROOT_TMVA_Event
81 fGDTauMin = (t0>1.0 ? 1.0:(t0<0.0 ? 0.0:t0));
138 typedef std::vector<const TMVA::Event *>::const_iterator
EventItr;
181 std::vector<Double_t> &avsel,
182 std::vector<Double_t> &avrul);
Bool_t operator()(Double_t first, Double_t second) const
MsgLogger & Log() const
message logger
std::vector< std::vector< Double_t > > fGDCoefLinTst
std::vector< Double_t > fAverageSelectorPath
UInt_t GetPathIdx2() const
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 Penalty() const
This is the "lasso" penalty To be used for regression.
std::vector< std::vector< Double_t > > fGradVecTst
void EvaluateAveragePath()
std::vector< Double_t > fAverageRulePath
void SetGDTauPrec(Double_t p)
std::vector< Double_t > fGDTauVec
std::vector< Double_t > fFstar
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
Double_t CalcAverageTruth()
calulate 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)
void SetGDTauScan(UInt_t n)
Int_t Type(const Event *e) 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.
std::vector< Double_t > fGDOfsTst
Double_t Optimism()
implementation of eq.
Double_t RiskPath() const
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 InitNtuple()
initializes the ntuple
Double_t RiskPerf() const
Double_t CalcAverageResponseOLD()
void CalcFStar()
Estimates F* (optimum scoring function) for all events for the given sets.
virtual ~RuleFitParams()
destructor
UInt_t GetPathIdx1() const
std::vector< std::vector< Double_t > > fGradVecLinTst
void UpdateCoefficients()
Establish maximum gradient for rules, linear terms and the offset.
Double_t ErrorRateRocRaw(std::vector< Double_t > &sFsig, std::vector< Double_t > &sFbkg)
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
UInt_t GetPerfIdx1() const
void Init()
Initializes all parameters using the RuleEnsemble and the training tree.
Double_t CalcAverageResponse()
calulate the average response - TODO : rewrite bad dependancy on EvaluateAverage() ! ...
RuleEnsemble * fRuleEnsemble
Double_t Risk(UInt_t ind1, UInt_t ind2, Double_t neff) const
risk asessment
UInt_t GetPerfIdx2() const
void InitGD()
Initialize GD path search.
A TTree object has a header with a name and a title.
Double_t RiskPerf(UInt_t itau) const
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.
void SetGDPathStep(Double_t s)
void CalcTstAverageResponse()
calc average response for all test paths - TODO: see comment under CalcAverageResponse() note that 0 ...