ROOT  6.06/09
Reference Guide
MethodHMatrix.cxx
Go to the documentation of this file.
1 // @(#)root/tmva $Id$
2 // Author: Andreas Hoecker, Joerg Stelzer, Helge Voss, Kai Voss
3 
4 /**********************************************************************************
5  * Project: TMVA - a Root-integrated toolkit for multivariate Data analysis *
6  * Package: TMVA *
7  * Class : TMVA::MethodHMatrix *
8  * Web : http://tmva.sourceforge.net *
9  * *
10  * Description: *
11  * Implementation (see header file for description) *
12  * *
13  * Authors (alphabetical): *
14  * Andreas Hoecker <Andreas.Hocker@cern.ch> - CERN, Switzerland *
15  * Peter Speckmayer <Peter.Speckmayer@cern.ch> - CERN, Switzerland *
16  * Helge Voss <Helge.Voss@cern.ch> - MPI-K Heidelberg, Germany *
17  * Kai Voss <Kai.Voss@cern.ch> - U. of Victoria, Canada *
18  * *
19  * Copyright (c) 2005: *
20  * CERN, Switzerland *
21  * U. of Victoria, Canada *
22  * MPI-K Heidelberg, Germany *
23  * *
24  * Redistribution and use in source and binary forms, with or without *
25  * modification, are permitted according to the terms listed in LICENSE *
26  * (http://tmva.sourceforge.net/LICENSE) *
27  **********************************************************************************/
28 
29 #include "TMVA/ClassifierFactory.h"
30 #include "TMVA/MethodHMatrix.h"
31 #include "TMVA/Tools.h"
32 #include "TMatrix.h"
33 #include "Riostream.h"
34 #include <algorithm>
35 
36 REGISTER_METHOD(HMatrix)
37 
38 ClassImp(TMVA::MethodHMatrix)
39 
40 //_______________________________________________________________________
41 //Begin_Html
42 /*
43  H-Matrix method, which is implemented as a simple comparison of
44  chi-squared estimators for signal and background, taking into
45  account the linear correlations between the input variables
46 
47  This MVA approach is used by the D&#216; collaboration (FNAL) for the
48  purpose of electron identification (see, eg.,
49  <a href="http://arxiv.org/abs/hep-ex/9507007">hep-ex/9507007</a>).
50  As it is implemented in TMVA, it is usually equivalent or worse than
51  the Fisher-Mahalanobis discriminant, and it has only been added for
52  the purpose of completeness.
53  Two &chi;<sup>2</sup> estimators are computed for an event, each one
54  for signal and background, using the estimates for the means and
55  covariance matrices obtained from the training sample:<br>
56  <center>
57  <img vspace=6 src="gif/tmva_chi2.gif" align="bottom" >
58  </center>
59  TMVA then uses as normalised analyser for event (<i>i</i>) the ratio:
60  (<i>&chi;<sub>S</sub>(i)<sup>2</sup> &minus; &chi;<sub>B</sub><sup>2</sup>(i)</i>)
61  (<i>&chi;<sub>S</sub><sup>2</sup>(i) + &chi;<sub>B</sub><sup>2</sup>(i)</i>).
62 */
63 //End_Html
64 //_______________________________________________________________________
65 
66 
67 ////////////////////////////////////////////////////////////////////////////////
68 /// standard constructor for the H-Matrix method
69 
70 TMVA::MethodHMatrix::MethodHMatrix( const TString& jobName,
71  const TString& methodTitle,
72  DataSetInfo& theData,
73  const TString& theOption,
74  TDirectory* theTargetDir )
75  : TMVA::MethodBase( jobName, Types::kHMatrix, methodTitle, theData, theOption, theTargetDir )
76  ,fInvHMatrixS(0)
77  ,fInvHMatrixB(0)
78  ,fVecMeanS(0)
79  ,fVecMeanB(0)
80 {
81 }
82 
83 ////////////////////////////////////////////////////////////////////////////////
84 /// constructor from weight file
85 
87  const TString& theWeightFile,
88  TDirectory* theTargetDir )
89  : TMVA::MethodBase( Types::kHMatrix, theData, theWeightFile, theTargetDir )
90  ,fInvHMatrixS(0)
91  ,fInvHMatrixB(0)
92  ,fVecMeanS(0)
93  ,fVecMeanB(0)
94 {
95 }
96 
97 ////////////////////////////////////////////////////////////////////////////////
98 /// default initialization called by all constructors
99 
101 {
102  //SetNormalised( kFALSE ); obsolete!
103 
104  fInvHMatrixS = new TMatrixD( GetNvar(), GetNvar() );
105  fInvHMatrixB = new TMatrixD( GetNvar(), GetNvar() );
106  fVecMeanS = new TVectorD( GetNvar() );
107  fVecMeanB = new TVectorD( GetNvar() );
108 
109  // the minimum requirement to declare an event signal-like
110  SetSignalReferenceCut( 0.0 );
111 }
112 
113 ////////////////////////////////////////////////////////////////////////////////
114 /// destructor
115 
117 {
118  if (NULL != fInvHMatrixS) delete fInvHMatrixS;
119  if (NULL != fInvHMatrixB) delete fInvHMatrixB;
120  if (NULL != fVecMeanS ) delete fVecMeanS;
121  if (NULL != fVecMeanB ) delete fVecMeanB;
122 }
123 
124 ////////////////////////////////////////////////////////////////////////////////
125 /// FDA can handle classification with 2 classes and regression with one regression-target
126 
128 {
129  if( type == Types::kClassification && numberClasses == 2 ) return kTRUE;
130  return kFALSE;
131 }
132 
133 
134 ////////////////////////////////////////////////////////////////////////////////
135 /// MethodHMatrix options: none (apart from those implemented in MethodBase)
136 
138 {
139 }
140 
141 ////////////////////////////////////////////////////////////////////////////////
142 /// process user options
143 
145 {
146 }
147 
148 ////////////////////////////////////////////////////////////////////////////////
149 /// computes H-matrices for signal and background samples
150 
152 {
153  // covariance matrices for signal and background
154  ComputeCovariance( kTRUE, fInvHMatrixS );
155  ComputeCovariance( kFALSE, fInvHMatrixB );
156 
157  // sanity checks
158  if (TMath::Abs(fInvHMatrixS->Determinant()) < 10E-24) {
159  Log() << kWARNING << "<Train> H-matrix S is almost singular with deterinant= "
160  << TMath::Abs(fInvHMatrixS->Determinant())
161  << " did you use the variables that are linear combinations or highly correlated ???"
162  << Endl;
163  }
164  if (TMath::Abs(fInvHMatrixB->Determinant()) < 10E-24) {
165  Log() << kWARNING << "<Train> H-matrix B is almost singular with deterinant= "
166  << TMath::Abs(fInvHMatrixB->Determinant())
167  << " did you use the variables that are linear combinations or highly correlated ???"
168  << Endl;
169  }
170 
171  if (TMath::Abs(fInvHMatrixS->Determinant()) < 10E-120) {
172  Log() << kFATAL << "<Train> H-matrix S is singular with deterinant= "
173  << TMath::Abs(fInvHMatrixS->Determinant())
174  << " did you use the variables that are linear combinations ???"
175  << Endl;
176  }
177  if (TMath::Abs(fInvHMatrixB->Determinant()) < 10E-120) {
178  Log() << kFATAL << "<Train> H-matrix B is singular with deterinant= "
179  << TMath::Abs(fInvHMatrixB->Determinant())
180  << " did you use the variables that are linear combinations ???"
181  << Endl;
182  }
183 
184  // invert matrix
185  fInvHMatrixS->Invert();
186  fInvHMatrixB->Invert();
187 }
188 
189 ////////////////////////////////////////////////////////////////////////////////
190 /// compute covariance matrix
191 
193 {
194  Data()->SetCurrentType(Types::kTraining);
195 
196  const UInt_t nvar = DataInfo().GetNVariables();
197  UInt_t ivar, jvar;
198 
199  // init matrices
200  TVectorD vec(nvar); vec *= 0;
201  TMatrixD mat2(nvar, nvar); mat2 *= 0;
202 
203  // initialize internal sum-of-weights variables
204  Double_t sumOfWeights = 0;
205  Double_t *xval = new Double_t[nvar];
206 
207  // perform event loop
208  for (Int_t i=0, iEnd=Data()->GetNEvents(); i<iEnd; ++i) {
209 
210  // retrieve the original (not transformed) event
211  const Event* origEvt = Data()->GetEvent(i);
212  Double_t weight = origEvt->GetWeight();
213 
214  // in case event with neg weights are to be ignored
215  if (IgnoreEventsWithNegWeightsInTraining() && weight <= 0) continue;
216 
217  if (DataInfo().IsSignal(origEvt) != isSignal) continue;
218 
219  // transform the event
220  GetTransformationHandler().SetTransformationReferenceClass( origEvt->GetClass() );
221  const Event* ev = GetTransformationHandler().Transform( origEvt );
222 
223  // event is of good type
224  sumOfWeights += weight;
225 
226  // mean values
227  for (ivar=0; ivar<nvar; ivar++) xval[ivar] = ev->GetValue(ivar);
228 
229  // covariance matrix
230  for (ivar=0; ivar<nvar; ivar++) {
231 
232  vec(ivar) += xval[ivar]*weight;
233  mat2(ivar, ivar) += (xval[ivar]*xval[ivar])*weight;
234 
235  for (jvar=ivar+1; jvar<nvar; jvar++) {
236  mat2(ivar, jvar) += (xval[ivar]*xval[jvar])*weight;
237  mat2(jvar, ivar) = mat2(ivar, jvar); // symmetric matrix
238  }
239  }
240  }
241 
242  // variance-covariance
243  for (ivar=0; ivar<nvar; ivar++) {
244 
245  if (isSignal) (*fVecMeanS)(ivar) = vec(ivar)/sumOfWeights;
246  else (*fVecMeanB)(ivar) = vec(ivar)/sumOfWeights;
247 
248  for (jvar=0; jvar<nvar; jvar++) {
249  (*mat)(ivar, jvar) = mat2(ivar, jvar)/sumOfWeights - vec(ivar)*vec(jvar)/(sumOfWeights*sumOfWeights);
250  }
251  }
252 
253  delete [] xval;
254 }
255 
256 ////////////////////////////////////////////////////////////////////////////////
257 /// returns the H-matrix signal estimator
258 
260 {
261  Double_t s = GetChi2( Types::kSignal );
262  Double_t b = GetChi2( Types::kBackground );
263 
264  if (s+b < 0) Log() << kFATAL << "big trouble: s+b: " << s+b << Endl;
265 
266  // cannot determine error
267  NoErrorCalc(err, errUpper);
268 
269  return (b - s)/(s + b);
270 }
271 
272 ////////////////////////////////////////////////////////////////////////////////
273 /// compute chi2-estimator for event according to type (signal/background)
274 
276 {
277  // get original (not transformed) event
278 
279  const Event* origEvt = fTmpEvent ? fTmpEvent:Data()->GetEvent();
280 
281  // loop over variables
282  UInt_t ivar(0), jvar(0), nvar(GetNvar());
283  std::vector<Double_t> val( nvar );
284 
285  // transform the event according to the given type (signal/background)
286  if (type==Types::kSignal)
287  GetTransformationHandler().SetTransformationReferenceClass( fSignalClass );
288  else
289  GetTransformationHandler().SetTransformationReferenceClass( fBackgroundClass );
290 
291  const Event* ev = GetTransformationHandler().Transform( origEvt );
292 
293  for (ivar=0; ivar<nvar; ivar++) val[ivar] = ev->GetValue( ivar );
294 
295  Double_t chi2 = 0;
296  for (ivar=0; ivar<nvar; ivar++) {
297  for (jvar=0; jvar<nvar; jvar++) {
298  if (type == Types::kSignal)
299  chi2 += ( (val[ivar] - (*fVecMeanS)(ivar))*(val[jvar] - (*fVecMeanS)(jvar))
300  * (*fInvHMatrixS)(ivar,jvar) );
301  else
302  chi2 += ( (val[ivar] - (*fVecMeanB)(ivar))*(val[jvar] - (*fVecMeanB)(jvar))
303  * (*fInvHMatrixB)(ivar,jvar) );
304  }
305  }
306 
307  // sanity check
308  if (chi2 < 0) Log() << kFATAL << "<GetChi2> negative chi2: " << chi2 << Endl;
309 
310  return chi2;
311 }
312 
313 ////////////////////////////////////////////////////////////////////////////////
314 /// create XML description for HMatrix classification
315 
316 void TMVA::MethodHMatrix::AddWeightsXMLTo( void* parent ) const
317 {
318  void* wght = gTools().AddChild(parent, "Weights");
319  gTools().WriteTVectorDToXML( wght, "VecMeanS", fVecMeanS );
320  gTools().WriteTVectorDToXML( wght, "VecMeanB", fVecMeanB );
321  gTools().WriteTMatrixDToXML( wght, "InvHMatS", fInvHMatrixS );
322  gTools().WriteTMatrixDToXML( wght, "InvHMatB", fInvHMatrixB );
323 }
324 
325 ////////////////////////////////////////////////////////////////////////////////
326 /// read weights from XML file
327 
329 {
330  void* descnode = gTools().GetChild(wghtnode);
331  gTools().ReadTVectorDFromXML( descnode, "VecMeanS", fVecMeanS );
332  descnode = gTools().GetNextChild(descnode);
333  gTools().ReadTVectorDFromXML( descnode, "VecMeanB", fVecMeanB );
334  descnode = gTools().GetNextChild(descnode);
335  gTools().ReadTMatrixDFromXML( descnode, "InvHMatS", fInvHMatrixS );
336  descnode = gTools().GetNextChild(descnode);
337  gTools().ReadTMatrixDFromXML( descnode, "InvHMatB", fInvHMatrixB );
338 }
339 
340 ////////////////////////////////////////////////////////////////////////////////
341 /// read variable names and min/max
342 /// NOTE: the latter values are mandatory for the normalisation
343 /// in the reader application !!!
344 
346 {
347  UInt_t ivar,jvar;
348  TString var, dummy;
349  istr >> dummy;
350  //this->SetMethodName(dummy);
351 
352  // mean vectors
353  for (ivar=0; ivar<GetNvar(); ivar++)
354  istr >> (*fVecMeanS)(ivar) >> (*fVecMeanB)(ivar);
355 
356  // inverse covariance matrices (signal)
357  for (ivar=0; ivar<GetNvar(); ivar++)
358  for (jvar=0; jvar<GetNvar(); jvar++)
359  istr >> (*fInvHMatrixS)(ivar,jvar);
360 
361  // inverse covariance matrices (background)
362  for (ivar=0; ivar<GetNvar(); ivar++)
363  for (jvar=0; jvar<GetNvar(); jvar++)
364  istr >> (*fInvHMatrixB)(ivar,jvar);
365 }
366 
367 ////////////////////////////////////////////////////////////////////////////////
368 /// write Fisher-specific classifier response
369 
370 void TMVA::MethodHMatrix::MakeClassSpecific( std::ostream& fout, const TString& className ) const
371 {
372  fout << " // arrays of input evt vs. variable " << std::endl;
373  fout << " double fInvHMatrixS[" << GetNvar() << "][" << GetNvar() << "]; // inverse H-matrix (signal)" << std::endl;
374  fout << " double fInvHMatrixB[" << GetNvar() << "][" << GetNvar() << "]; // inverse H-matrix (background)" << std::endl;
375  fout << " double fVecMeanS[" << GetNvar() << "]; // vector of mean values (signal)" << std::endl;
376  fout << " double fVecMeanB[" << GetNvar() << "]; // vector of mean values (background)" << std::endl;
377  fout << " " << std::endl;
378  fout << " double GetChi2( const std::vector<double>& inputValues, int type ) const;" << std::endl;
379  fout << "};" << std::endl;
380  fout << " " << std::endl;
381  fout << "void " << className << "::Initialize() " << std::endl;
382  fout << "{" << std::endl;
383  fout << " // init vectors with mean values" << std::endl;
384  for (UInt_t ivar=0; ivar<GetNvar(); ivar++) {
385  fout << " fVecMeanS[" << ivar << "] = " << (*fVecMeanS)(ivar) << ";" << std::endl;
386  fout << " fVecMeanB[" << ivar << "] = " << (*fVecMeanB)(ivar) << ";" << std::endl;
387  }
388  fout << " " << std::endl;
389  fout << " // init H-matrices" << std::endl;
390  for (UInt_t ivar=0; ivar<GetNvar(); ivar++) {
391  for (UInt_t jvar=0; jvar<GetNvar(); jvar++) {
392  fout << " fInvHMatrixS[" << ivar << "][" << jvar << "] = "
393  << (*fInvHMatrixS)(ivar,jvar) << ";" << std::endl;
394  fout << " fInvHMatrixB[" << ivar << "][" << jvar << "] = "
395  << (*fInvHMatrixB)(ivar,jvar) << ";" << std::endl;
396  }
397  }
398  fout << "}" << std::endl;
399  fout << " " << std::endl;
400  fout << "inline double " << className << "::GetMvaValue__( const std::vector<double>& inputValues ) const" << std::endl;
401  fout << "{" << std::endl;
402  fout << " // returns the H-matrix signal estimator" << std::endl;
403  fout << " std::vector<double> inputValuesSig = inputValues;" << std::endl;
404  fout << " std::vector<double> inputValuesBgd = inputValues;" << std::endl;
405  if (GetTransformationHandler().GetTransformationList().GetSize() != 0) {
406 
407  UInt_t signalClass =DataInfo().GetClassInfo("Signal")->GetNumber();
408  UInt_t backgroundClass=DataInfo().GetClassInfo("Background")->GetNumber();
409 
410  fout << " Transform(inputValuesSig," << signalClass << ");" << std::endl;
411  fout << " Transform(inputValuesBgd," << backgroundClass << ");" << std::endl;
412  }
413 
414 // fout << " for(uint i=0; i<GetNvar(); ++i) std::cout << inputValuesSig.at(i) << \" \" << inputValuesBgd.at(i) << std::endl; " << std::endl;
415 
416  fout << " double s = GetChi2( inputValuesSig, " << Types::kSignal << " );" << std::endl;
417  fout << " double b = GetChi2( inputValuesBgd, " << Types::kBackground << " );" << std::endl;
418 
419 // fout << " std::cout << s << \" \" << b << std::endl; " << std::endl;
420 
421  fout << " " << std::endl;
422  fout << " if (s+b <= 0) std::cout << \"Problem in class " << className << "::GetMvaValue__: s+b = \"" << std::endl;
423  fout << " << s+b << \" <= 0 \" << std::endl;" << std::endl;
424  fout << " " << std::endl;
425  fout << " return (b - s)/(s + b);" << std::endl;
426  fout << "}" << std::endl;
427  fout << " " << std::endl;
428  fout << "inline double " << className << "::GetChi2( const std::vector<double>& inputValues, int type ) const" << std::endl;
429  fout << "{" << std::endl;
430  fout << " // compute chi2-estimator for event according to type (signal/background)" << std::endl;
431  fout << " " << std::endl;
432  fout << " size_t ivar,jvar;" << std::endl;
433  fout << " double chi2 = 0;" << std::endl;
434  fout << " for (ivar=0; ivar<GetNvar(); ivar++) {" << std::endl;
435  fout << " for (jvar=0; jvar<GetNvar(); jvar++) {" << std::endl;
436  fout << " if (type == " << Types::kSignal << ") " << std::endl;
437  fout << " chi2 += ( (inputValues[ivar] - fVecMeanS[ivar])*(inputValues[jvar] - fVecMeanS[jvar])" << std::endl;
438  fout << " * fInvHMatrixS[ivar][jvar] );" << std::endl;
439  fout << " else" << std::endl;
440  fout << " chi2 += ( (inputValues[ivar] - fVecMeanB[ivar])*(inputValues[jvar] - fVecMeanB[jvar])" << std::endl;
441  fout << " * fInvHMatrixB[ivar][jvar] );" << std::endl;
442  fout << " }" << std::endl;
443  fout << " } // loop over variables " << std::endl;
444  fout << " " << std::endl;
445  fout << " // sanity check" << std::endl;
446  fout << " if (chi2 < 0) std::cout << \"Problem in class " << className << "::GetChi2: chi2 = \"" << std::endl;
447  fout << " << chi2 << \" < 0 \" << std::endl;" << std::endl;
448  fout << " " << std::endl;
449  fout << " return chi2;" << std::endl;
450  fout << "}" << std::endl;
451  fout << " " << std::endl;
452  fout << "// Clean up" << std::endl;
453  fout << "inline void " << className << "::Clear() " << std::endl;
454  fout << "{" << std::endl;
455  fout << " // nothing to clear" << std::endl;
456  fout << "}" << std::endl;
457 }
458 
459 ////////////////////////////////////////////////////////////////////////////////
460 /// get help message text
461 ///
462 /// typical length of text line:
463 /// "|--------------------------------------------------------------|"
464 
466 {
467  Log() << Endl;
468  Log() << gTools().Color("bold") << "--- Short description:" << gTools().Color("reset") << Endl;
469  Log() << Endl;
470  Log() << "The H-Matrix classifier discriminates one class (signal) of a feature" << Endl;
471  Log() << "vector from another (background). The correlated elements of the" << Endl;
472  Log() << "vector are assumed to be Gaussian distributed, and the inverse of" << Endl;
473  Log() << "the covariance matrix is the H-Matrix. A multivariate chi-squared" << Endl;
474  Log() << "estimator is built that exploits differences in the mean values of" << Endl;
475  Log() << "the vector elements between the two classes for the purpose of" << Endl;
476  Log() << "discrimination." << Endl;
477  Log() << Endl;
478  Log() << gTools().Color("bold") << "--- Performance optimisation:" << gTools().Color("reset") << Endl;
479  Log() << Endl;
480  Log() << "The TMVA implementation of the H-Matrix classifier has been shown" << Endl;
481  Log() << "to underperform in comparison with the corresponding Fisher discriminant," << Endl;
482  Log() << "when using similar assumptions and complexity. Its use is therefore" << Endl;
483  Log() << "depreciated. Only in cases where the background model is strongly" << Endl;
484  Log() << "non-Gaussian, H-Matrix may perform better than Fisher. In such" << Endl;
485  Log() << "occurrences the user is advised to employ non-linear classifiers. " << Endl;
486  Log() << Endl;
487  Log() << gTools().Color("bold") << "--- Performance tuning via configuration options:" << gTools().Color("reset") << Endl;
488  Log() << Endl;
489  Log() << "None" << Endl;
490 }
void ReadWeightsFromXML(void *wghtnode)
read weights from XML file
void Init()
default initialization called by all constructors
MsgLogger & Endl(MsgLogger &ml)
Definition: MsgLogger.h:162
void AddWeightsXMLTo(void *parent) const
create XML description for HMatrix classification
Double_t GetMvaValue(Double_t *err=0, Double_t *errUpper=0)
returns the H-matrix signal estimator
void ProcessOptions()
process user options
virtual Bool_t HasAnalysisType(Types::EAnalysisType type, UInt_t numberClasses, UInt_t numberTargets)
FDA can handle classification with 2 classes and regression with one regression-target.
EAnalysisType
Definition: Types.h:124
Basic string class.
Definition: TString.h:137
int Int_t
Definition: RtypesCore.h:41
bool Bool_t
Definition: RtypesCore.h:59
const Bool_t kFALSE
Definition: Rtypes.h:92
Double_t GetWeight() const
return the event weight - depending on whether the flag IgnoreNegWeightsInTraining is or not...
Definition: Event.cxx:376
void * AddChild(void *parent, const char *childname, const char *content=0, bool isRootNode=false)
add child node
Definition: Tools.cxx:1134
Short_t Abs(Short_t d)
Definition: TMathBase.h:110
void ReadWeightsFromStream(std::istream &istr)
read variable names and min/max NOTE: the latter values are mandatory for the normalisation in the re...
Float_t GetValue(UInt_t ivar) const
return value of i'th variable
Definition: Event.cxx:231
void ReadTMatrixDFromXML(void *node, const char *name, TMatrixD *mat)
Definition: Tools.cxx:1284
virtual ~MethodHMatrix()
destructor
Tools & gTools()
Definition: Tools.cxx:79
void GetHelpMessage() const
get help message text
ClassImp(TMVA::MethodHMatrix) TMVA
standard constructor for the H-Matrix method
void * GetChild(void *parent, const char *childname=0)
get child node
Definition: Tools.cxx:1158
std::vector< std::vector< double > > Data
MethodHMatrix(const TString &jobName, const TString &methodTitle, DataSetInfo &theData, const TString &theOption="", TDirectory *theTargetDir=0)
TVectorT< Double_t > TVectorD
Definition: TVectorDfwd.h:24
TMatrixT< Double_t > TMatrixD
Definition: TMatrixDfwd.h:24
unsigned int UInt_t
Definition: RtypesCore.h:42
Double_t E()
Definition: TMath.h:54
void Train()
computes H-matrices for signal and background samples
double Double_t
Definition: RtypesCore.h:55
Describe directory structure in memory.
Definition: TDirectory.h:41
void ComputeCovariance(Bool_t, TMatrixD *)
compute covariance matrix
int type
Definition: TGX11.cxx:120
void MakeClassSpecific(std::ostream &, const TString &) const
write Fisher-specific classifier response
void WriteTVectorDToXML(void *node, const char *name, TVectorD *vec)
Definition: Tools.cxx:1267
static RooMathCoreReg dummy
void * GetNextChild(void *prevchild, const char *childname=0)
XML helpers.
Definition: Tools.cxx:1170
UInt_t GetClass() const
Definition: Event.h:86
const TString & Color(const TString &)
human readable color strings
Definition: Tools.cxx:837
void WriteTMatrixDToXML(void *node, const char *name, TMatrixD *mat)
XML helpers.
Definition: Tools.cxx:1251
#define REGISTER_METHOD(CLASS)
for example
Abstract ClassifierFactory template that handles arbitrary types.
void DeclareOptions()
MethodHMatrix options: none (apart from those implemented in MethodBase)
#define NULL
Definition: Rtypes.h:82
void ReadTVectorDFromXML(void *node, const char *name, TVectorD *vec)
Definition: Tools.cxx:1275
const Bool_t kTRUE
Definition: Rtypes.h:91
Definition: math.cpp:60
Double_t GetChi2(Types::ESBType)
compute chi2-estimator for event according to type (signal/background)