A class doing the actual fitting of a linear model using rules as base functions.
Definition at line 49 of file RuleFitParams.h.
Public Member Functions | |
RuleFitParams () | |
constructor | |
virtual | ~RuleFitParams () |
destructor | |
Int_t | FindGDTau () |
This finds the cutoff parameter tau by scanning several different paths. | |
UInt_t | GetPathIdx1 () const |
UInt_t | GetPathIdx2 () const |
UInt_t | GetPerfIdx1 () const |
UInt_t | GetPerfIdx2 () const |
void | Init () |
Initializes all parameters using the RuleEnsemble and the training tree. | |
void | InitGD () |
Initialize GD path search. | |
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 Classifications where y = {+1,-1} for (sig,bkg) | |
Double_t | LossFunction (UInt_t evtidx) const |
Implementation of squared-error ramp loss function (eq 39,40 in ref 1) This is used for binary Classifications where y = {+1,-1} for (sig,bkg) | |
Double_t | LossFunction (UInt_t evtidx, UInt_t itau) const |
Implementation of squared-error ramp loss function (eq 39,40 in ref 1) This is used for binary Classifications where y = {+1,-1} for (sig,bkg) | |
void | MakeGDPath () |
The following finds the gradient directed path in parameter space. | |
Double_t | Penalty () const |
This is the "lasso" penalty To be used for regression. | |
Double_t | Risk (UInt_t ind1, UInt_t ind2, Double_t neff) const |
risk assessment | |
Double_t | Risk (UInt_t ind1, UInt_t ind2, Double_t neff, UInt_t itau) const |
risk assessment for tau model <itau> | |
Double_t | RiskPath () const |
Double_t | RiskPerf () const |
Double_t | RiskPerf (UInt_t itau) const |
UInt_t | RiskPerfTst () |
Estimates the error rate with the current set of parameters. | |
void | SetGDErrScale (Double_t s) |
void | SetGDNPathSteps (Int_t np) |
void | SetGDPathStep (Double_t s) |
void | SetGDTau (Double_t t) |
void | SetGDTauPrec (Double_t p) |
void | SetGDTauRange (Double_t t0, Double_t t1) |
void | SetGDTauScan (UInt_t n) |
void | SetMsgType (EMsgType t) |
void | SetRuleFit (RuleFit *rf) |
Int_t | Type (const Event *e) const |
Protected Types | |
typedef std::vector< constTMVA::Event * >::const_iterator | EventItr |
Protected Member Functions | |
Double_t | CalcAverageResponse () |
calculate the average response - TODO : rewrite bad dependancy on EvaluateAverage() ! | |
Double_t | CalcAverageResponseOLD () |
Double_t | CalcAverageTruth () |
calculate the average truth | |
void | CalcFStar () |
Estimates F* (optimum scoring function) for all events for the given sets. | |
void | CalcGDNTau () |
void | CalcTstAverageResponse () |
calc average response for all test paths - TODO: see comment under CalcAverageResponse() note that 0 offset is used | |
Double_t | ErrorRateBin () |
Estimates the error rate with the current set of parameters It uses a binary estimate of (y-F*(x)) (y-F*(x)) = (Num of events where sign(F)!=sign(y))/Neve y = {+1 if event is signal, -1 otherwise} — NOT USED —. | |
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. | |
Double_t | ErrorRateRocRaw (std::vector< Double_t > &sFsig, std::vector< Double_t > &sFbkg) |
Estimates the error rate with the current set of parameters. | |
void | ErrorRateRocTst () |
Estimates the error rate with the current set of parameters. | |
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 | EvaluateAveragePath () |
void | EvaluateAveragePerf () |
void | FillCoefficients () |
helper function to store the rule coefficients in local arrays | |
void | InitNtuple () |
initializes the ntuple | |
void | MakeGradientVector () |
make gradient vector | |
void | MakeTstGradientVector () |
make test gradient vector for all tau same algorithm as MakeGradientVector() | |
Double_t | Optimism () |
implementation of eq. | |
void | UpdateCoefficients () |
Establish maximum gradient for rules, linear terms and the offset. | |
void | UpdateTstCoefficients () |
Establish maximum gradient for rules, linear terms and the offset for all taus TODO: do not need index range! | |
Private Member Functions | |
MsgLogger & | Log () const |
message logger | |
Private Attributes | |
MsgLogger * | fLogger |
#include <TMVA/RuleFitParams.h>
|
protected |
Definition at line 130 of file RuleFitParams.h.
TMVA::RuleFitParams::RuleFitParams | ( | ) |
constructor
Definition at line 64 of file RuleFitParams.cxx.
|
virtual |
destructor
Definition at line 104 of file RuleFitParams.cxx.
|
protected |
calculate the average response - TODO : rewrite bad dependancy on EvaluateAverage() !
note that 0 offset is used
Definition at line 1518 of file RuleFitParams.cxx.
|
protected |
|
protected |
calculate the average truth
Definition at line 1533 of file RuleFitParams.cxx.
|
protected |
Estimates F* (optimum scoring function) for all events for the given sets.
The result is used in ErrorRateReg(). — NOT USED —
Definition at line 885 of file RuleFitParams.cxx.
|
inlineprotected |
Definition at line 136 of file RuleFitParams.h.
|
protected |
calc average response for all test paths - TODO: see comment under CalcAverageResponse() note that 0 offset is used
Definition at line 1497 of file RuleFitParams.cxx.
|
protected |
Estimates the error rate with the current set of parameters It uses a binary estimate of (y-F*(x)) (y-F*(x)) = (Num of events where sign(F)!=sign(y))/Neve y = {+1 if event is signal, -1 otherwise} — NOT USED —.
Definition at line 1010 of file RuleFitParams.cxx.
|
protected |
Estimates the error rate with the current set of parameters This code is pretty messy at the moment.
Cleanup is needed. – NOT USED —
Definition at line 966 of file RuleFitParams.cxx.
|
protected |
Estimates the error rate with the current set of parameters.
It calculates the area under the bkg rejection vs signal efficiency curve. The value returned is 1-area. This works but is less efficient than calculating the Risk using RiskPerf().
Definition at line 1111 of file RuleFitParams.cxx.
|
protected |
Estimates the error rate with the current set of parameters.
It calculates the area under the bkg rejection vs signal efficiency curve. The value returned is 1-area.
Definition at line 1044 of file RuleFitParams.cxx.
|
protected |
Estimates the error rate with the current set of parameters.
It calculates the area under the bkg rejection vs signal efficiency curve. The value returned is 1-area.
See comment under ErrorRateRoc().
Definition at line 1159 of file RuleFitParams.cxx.
|
protected |
evaluate the average of each variable and f(x) in the given range
Definition at line 208 of file RuleFitParams.cxx.
|
inlineprotected |
Definition at line 177 of file RuleFitParams.h.
|
inlineprotected |
Definition at line 180 of file RuleFitParams.h.
|
protected |
helper function to store the rule coefficients in local arrays
Definition at line 868 of file RuleFitParams.cxx.
Int_t TMVA::RuleFitParams::FindGDTau | ( | ) |
This finds the cutoff parameter tau by scanning several different paths.
Definition at line 449 of file RuleFitParams.cxx.
|
inline |
Definition at line 91 of file RuleFitParams.h.
|
inline |
Definition at line 92 of file RuleFitParams.h.
|
inline |
Definition at line 93 of file RuleFitParams.h.
|
inline |
Definition at line 94 of file RuleFitParams.h.
void TMVA::RuleFitParams::Init | ( | ) |
Initializes all parameters using the RuleEnsemble and the training tree.
Definition at line 114 of file RuleFitParams.cxx.
void TMVA::RuleFitParams::InitGD | ( | ) |
Initialize GD path search.
Definition at line 373 of file RuleFitParams.cxx.
|
protected |
initializes the ntuple
Definition at line 185 of file RuleFitParams.cxx.
|
inlineprivate |
message logger
Definition at line 254 of file RuleFitParams.h.
Implementation of squared-error ramp loss function (eq 39,40 in ref 1) This is used for binary Classifications where y = {+1,-1} for (sig,bkg)
Definition at line 278 of file RuleFitParams.cxx.
Implementation of squared-error ramp loss function (eq 39,40 in ref 1) This is used for binary Classifications where y = {+1,-1} for (sig,bkg)
Definition at line 290 of file RuleFitParams.cxx.
Implementation of squared-error ramp loss function (eq 39,40 in ref 1) This is used for binary Classifications where y = {+1,-1} for (sig,bkg)
Definition at line 302 of file RuleFitParams.cxx.
void TMVA::RuleFitParams::MakeGDPath | ( | ) |
The following finds the gradient directed path in parameter space.
More work is needed... FT, 24/9/2006
The algorithm is currently as follows (if not otherwise stated, the sample used below is [fPathIdx1,fPathIdx2]):
The algorithm will warn if:
Definition at line 538 of file RuleFitParams.cxx.
|
protected |
make gradient vector
Definition at line 1381 of file RuleFitParams.cxx.
|
protected |
make test gradient vector for all tau same algorithm as MakeGradientVector()
Definition at line 1263 of file RuleFitParams.cxx.
|
protected |
implementation of eq.
7.17 in Hastie,Tibshirani & Friedman book this is the covariance between the estimated response yhat and the true value y. NOT REALLY SURE IF THIS IS CORRECT! — THIS IS NOT USED —
Definition at line 925 of file RuleFitParams.cxx.
Double_t TMVA::RuleFitParams::Penalty | ( | ) | const |
This is the "lasso" penalty To be used for regression.
— NOT USED —
Definition at line 356 of file RuleFitParams.cxx.
risk assessment
Definition at line 314 of file RuleFitParams.cxx.
risk assessment for tau model <itau>
Definition at line 334 of file RuleFitParams.cxx.
|
inline |
Definition at line 108 of file RuleFitParams.h.
|
inline |
Definition at line 109 of file RuleFitParams.h.
Definition at line 110 of file RuleFitParams.h.
UInt_t TMVA::RuleFitParams::RiskPerfTst | ( | ) |
Estimates the error rate with the current set of parameters.
using the <Perf> subsample. Return the tau index giving the lowest error
Definition at line 1205 of file RuleFitParams.cxx.
Definition at line 85 of file RuleFitParams.h.
Definition at line 65 of file RuleFitParams.h.
Definition at line 68 of file RuleFitParams.h.
Definition at line 82 of file RuleFitParams.h.
Definition at line 86 of file RuleFitParams.h.
Definition at line 71 of file RuleFitParams.h.
Definition at line 79 of file RuleFitParams.h.
void TMVA::RuleFitParams::SetMsgType | ( | EMsgType | t | ) |
Definition at line 1562 of file RuleFitParams.cxx.
Definition at line 62 of file RuleFitParams.h.
Definition at line 1556 of file RuleFitParams.cxx.
|
protected |
Establish maximum gradient for rules, linear terms and the offset.
Definition at line 1447 of file RuleFitParams.cxx.
|
protected |
Establish maximum gradient for rules, linear terms and the offset for all taus TODO: do not need index range!
Definition at line 1333 of file RuleFitParams.cxx.
|
protected |
Definition at line 205 of file RuleFitParams.h.
|
protected |
Definition at line 207 of file RuleFitParams.h.
|
protected |
Definition at line 204 of file RuleFitParams.h.
|
protected |
Definition at line 206 of file RuleFitParams.h.
|
protected |
Definition at line 232 of file RuleFitParams.h.
|
protected |
Definition at line 248 of file RuleFitParams.h.
|
protected |
Definition at line 249 of file RuleFitParams.h.
|
protected |
Definition at line 234 of file RuleFitParams.h.
|
protected |
Definition at line 235 of file RuleFitParams.h.
|
protected |
Definition at line 218 of file RuleFitParams.h.
|
protected |
Definition at line 217 of file RuleFitParams.h.
|
protected |
Definition at line 230 of file RuleFitParams.h.
|
protected |
Definition at line 215 of file RuleFitParams.h.
|
protected |
Definition at line 216 of file RuleFitParams.h.
|
protected |
Definition at line 229 of file RuleFitParams.h.
|
protected |
Definition at line 222 of file RuleFitParams.h.
|
protected |
Definition at line 221 of file RuleFitParams.h.
|
protected |
Definition at line 237 of file RuleFitParams.h.
|
protected |
Definition at line 219 of file RuleFitParams.h.
|
protected |
Definition at line 228 of file RuleFitParams.h.
|
protected |
Definition at line 227 of file RuleFitParams.h.
|
protected |
Definition at line 226 of file RuleFitParams.h.
|
protected |
Definition at line 225 of file RuleFitParams.h.
|
protected |
Definition at line 223 of file RuleFitParams.h.
|
protected |
Definition at line 224 of file RuleFitParams.h.
|
protected |
Definition at line 220 of file RuleFitParams.h.
|
protected |
Definition at line 209 of file RuleFitParams.h.
|
protected |
Definition at line 210 of file RuleFitParams.h.
|
protected |
Definition at line 213 of file RuleFitParams.h.
|
protected |
Definition at line 212 of file RuleFitParams.h.
|
mutableprivate |
Definition at line 253 of file RuleFitParams.h.
|
protected |
Definition at line 201 of file RuleFitParams.h.
|
protected |
Definition at line 202 of file RuleFitParams.h.
|
protected |
Definition at line 192 of file RuleFitParams.h.
|
protected |
Definition at line 191 of file RuleFitParams.h.
|
protected |
Definition at line 243 of file RuleFitParams.h.
|
protected |
Definition at line 241 of file RuleFitParams.h.
|
protected |
Definition at line 239 of file RuleFitParams.h.
|
protected |
Definition at line 244 of file RuleFitParams.h.
|
protected |
Definition at line 240 of file RuleFitParams.h.
|
protected |
Definition at line 242 of file RuleFitParams.h.
|
protected |
Definition at line 238 of file RuleFitParams.h.
|
protected |
Definition at line 197 of file RuleFitParams.h.
|
protected |
Definition at line 198 of file RuleFitParams.h.
|
protected |
Definition at line 199 of file RuleFitParams.h.
|
protected |
Definition at line 200 of file RuleFitParams.h.
|
protected |
Definition at line 189 of file RuleFitParams.h.
|
protected |
Definition at line 188 of file RuleFitParams.h.
|
protected |
Definition at line 246 of file RuleFitParams.h.
|
protected |
Definition at line 247 of file RuleFitParams.h.