Logo ROOT  
Reference Guide
PDEFoam.h
Go to the documentation of this file.
1 // @(#)root/tmva $Id$
2 // Author: S. Jadach, Tancredi Carli, Dominik Dannheim, Alexander Voigt
3 
4 /**********************************************************************************
5  * Project: TMVA - a Root-integrated toolkit for multivariate data analysis *
6  * Package: TMVA *
7  * Classes: PDEFoam *
8  * Web : http://tmva.sourceforge.net *
9  * *
10  * Description: *
11  * Class for PDEFoam object *
12  * *
13  * Authors (alphabetical): *
14  * S. Jadach - Institute of Nuclear Physics, Cracow, Poland *
15  * Tancredi Carli - CERN, Switzerland *
16  * Dominik Dannheim - CERN, Switzerland *
17  * Alexander Voigt - TU Dresden, Germany *
18  * *
19  * Copyright (c) 2008, 2010: *
20  * CERN, Switzerland *
21  * MPI-K Heidelberg, Germany *
22  * *
23  * Redistribution and use in source and binary forms, with or without *
24  * modification, are permitted according to the terms listed in LICENSE *
25  * (http://tmva.sourceforge.net/LICENSE) *
26  **********************************************************************************/
27 
28 #ifndef ROOT_TMVA_PDEFoam
29 #define ROOT_TMVA_PDEFoam
30 
31 #include <iosfwd>
32 #include <cassert>
33 #include <vector>
34 #include <map>
35 
36 #include "TH2D.h"
37 #include "TObjArray.h"
38 #include "TObjString.h"
39 #include "TVectorT.h"
40 #include "TString.h"
41 #include "TMVA/VariableInfo.h"
42 #include "TMVA/Timer.h"
43 #include "TObject.h"
44 #include "TRandom3.h"
45 
46 namespace TMVA {
47  class PDEFoamCell;
48  class PDEFoamVect;
49  class PDEFoamDensityBase;
50  class PDEFoamKernelBase;
51  class PDEFoam;
52 
53  // separation types
54  enum EDTSeparation { kFoam, kGiniIndex, kMisClassificationError,
55  kCrossEntropy, kGiniIndexWithLaplace, kSdivSqrtSplusB };
56 
57  // foam types
58  enum EFoamType { kSeparate, kDiscr, kMonoTarget, kMultiTarget, kMultiClass };
59 
60  // enum type for possible foam cell values
61  // kValue : cell value who's rms is minimized
62  // kValueError : error on kValue
63  // kValueDensity : kValue / cell volume
64  // kMeanValue : mean sampling value (saved in fIntegral)
65  // kRms : rms of sampling distribution (saved in fDriver)
66  // kRmsOvMean : rms/mean of sampling distribution (saved in
67  // fDriver and fIntegral)
68  // kCellVolume : volume of cell
69  enum ECellValue { kValue, kValueError, kValueDensity, kMeanValue,
70  kRms, kRmsOvMean, kCellVolume };
71 }
72 
74 #include "TMVA/PDEFoamVect.h"
75 #include "TMVA/PDEFoamCell.h"
76 
77 namespace TMVA {
78 
79  class PDEFoam : public TObject {
80  protected:
81  // COMPONENTS //
82  //-------------- Input parameters
83  TString fName; // Name of a given instance of the FOAM class
84  Int_t fDim; // Dimension of the integration/simulation space
85  Int_t fNCells; // Maximum number of cells
86  //-------------------
87  Int_t fNBin; // No. of bins in the edge histogram for cell MC exploration
88  Int_t fNSampl; // No. of MC events, when dividing (exploring) cell
89  Int_t fEvPerBin; // Maximum number of effective (wt=1) events per bin
90  //------------------- MULTI-BRANCHING ---------------------
91  Int_t *fMaskDiv; //! [fDim] Dynamic Mask for cell division
92  Int_t *fInhiDiv; //! [fDim] Flags for inhibiting cell division
93  //------------------- GEOMETRY ----------------------------
94  Int_t fNoAct; // Number of active cells
95  Int_t fLastCe; // Index of the last cell
96  PDEFoamCell **fCells; // [fNCells] Array of ALL cells
97  //------------------ M.C. generation----------------------------
98  TObjArray *fHistEdg; // Histograms of wt, one for each cell edge
99  Double_t *fRvec; // [fDim] random number vector from r.n. generator fDim+1 maximum elements
100  //----------- Procedures
101  TRandom3 *fPseRan; // Pointer to user-defined generator of pseudorandom numbers
102  //---------- working space for CELL exploration -------------
103  Double_t *fAlpha; // [fDim] Internal parameters of the hyperrectangle
104  // --------- PDE-Foam specific variables
105  EFoamType fFoamType; // BACKWARDS COMPATIBILITY: type of foam
106  Double_t *fXmin; // [fDim] minimum for variable transform
107  Double_t *fXmax; // [fDim] maximum for variable transform
108  UInt_t fNElements; // BACKWARDS COMPATIBILITY: number of variables in every cell
109  UInt_t fNmin; // minimal number of events in cell to split cell
110  UInt_t fMaxDepth; // maximum depth of cell tree
111  Float_t fVolFrac; // BACKWARDS COMPATIBILITY: volume fraction (with respect to total phase space
112  Bool_t fFillFoamWithOrigWeights; // BACKWARDS COMPATIBILITY: fill the foam with boost or orig. weights
113  EDTSeparation fDTSeparation; // BACKWARDS COMPATIBILITY: split cells according to decision tree logic
114  Bool_t fPeekMax; // BACKWARDS COMPATIBILITY: peek up cell with max. driver integral for split
115  PDEFoamDensityBase *fDistr; //! distribution of training events
116  Timer *fTimer; //! timer for graphical output
117  TObjArray *fVariableNames;// collection of all variable names
118  mutable MsgLogger* fLogger; //! message logger
119 
120  /////////////////////////////////////////////////////////////////
121  // METHODS //
122  /////////////////////////////////////////////////////////////////
123 
124  protected:
125  // ---------- TMVA console output
126 
127  void OutputGrow(Bool_t finished = false ); // nice TMVA console output
128 
129  // ---------- Foam build-up functions
130 
131  // Internal foam initialization functions
132  void InitCells(); // Initialisation of all foam cells
133  Int_t CellFill(Int_t, PDEFoamCell*);// Allocates new empty cell and return its index
134  virtual void Explore(PDEFoamCell *Cell); // Exploration of the new cell, determine <wt>, wtMax etc.
135  void Varedu(Double_t [], Int_t&, Double_t&,Double_t&); // Determines the best edge, variance reduction
136  void MakeAlpha(); // Provides random point inside hyperrectangle
137  void Grow(); // build up foam
138  Long_t PeekMax(); // peek cell with max. driver integral
139  Int_t Divide(PDEFoamCell *); // Divide iCell into two daughters; iCell retained, taged as inactive
140  Double_t Eval(Double_t *xRand, Double_t &event_density); // evaluate distribution on point 'xRand'
141 
142  // ---------- Cell value access functions
143 
144  // low level functions to access a certain cell value
145  Double_t GetCellElement(const PDEFoamCell *cell, UInt_t i) const; // get Element 'i' in cell 'cell'
146  void SetCellElement(PDEFoamCell *cell, UInt_t i, Double_t value); // set Element 'i' in cell 'cell' to value 'value'
147 
148  // specific function used during evaluation; determines, whether a cell value is undefined
150 
151  // finds cell according to given event variables
152  PDEFoamCell* FindCell(const std::vector<Float_t>&) const ;
153  std::vector<TMVA::PDEFoamCell*> FindCells(const std::vector<Float_t>&) const;
154  std::vector<TMVA::PDEFoamCell*> FindCells(const std::map<Int_t,Float_t>&) const;
155  void FindCells(const std::map<Int_t, Float_t>&, PDEFoamCell*, std::vector<PDEFoamCell*> &) const;
156 
157  // get internal density
158  PDEFoamDensityBase* GetDistr() const { assert(fDistr); return fDistr; }
159 
160  // Square function (fastest implementation)
161  template<typename T> T Sqr(T x) const { return x*x; }
162 
163  PDEFoam(const PDEFoam&); // Copy Constructor NOT USED
164 
165  // ---------- Public functions ----------------------------------
166  public:
167  PDEFoam(); // Default constructor (used only by ROOT streamer)
168  PDEFoam(const TString&); // Principal user-defined constructor
169  virtual ~PDEFoam(); // Default destructor
170 
171  // ---------- Foam creation functions
172 
173  void Initialize() {} // initialize the PDEFoam
174  void FillBinarySearchTree( const Event* ev ); // fill event into BST
175  void Create(); // build-up foam
176 
177  // function to fill created cell with given value
178  virtual void FillFoamCells(const Event* ev, Float_t wt);
179 
180  // remove all cell elements
181  void ResetCellElements();
182 
183  // function to call after foam is grown
184  virtual void Finalize() {}
185 
186  // ---------- Getters and Setters
187 
188  void SetDim(Int_t kDim); // Sets dimension of cubical space
189  void SetnCells(Long_t nCells){fNCells =nCells;} // Sets maximum number of cells
190  void SetnSampl(Long_t nSampl){fNSampl =nSampl;} // Sets no of MC events in cell exploration
191  void SetnBin(Int_t nBin){fNBin = nBin;} // Sets no of bins in histograms in cell exploration
192  void SetEvPerBin(Int_t EvPerBin){fEvPerBin =EvPerBin;} // Sets max. no. of effective events per bin
193  void SetInhiDiv(Int_t, Int_t ); // Set inhibition of cell division along certain edge
194  void SetDensity(PDEFoamDensityBase *dens) { fDistr = dens; }
195 
196  // coverity[ -tainted_data_return ]
197  Int_t GetTotDim() const {return fDim; } // Get total dimension
198  TString GetFoamName() const {return fName; } // Get name of foam
199  UInt_t GetNActiveCells() const {return fNoAct;} // returns number of active cells
200  UInt_t GetNInActiveCells() const {return GetNCells()-GetNActiveCells();} // returns number of not active cells
201  UInt_t GetNCells() const {return fNCells;} // returns number of cells
202  PDEFoamCell* GetRootCell() const {return fCells[0];} // get pointer to root cell
203 
204  // Getters and Setters for user cut options
205  void SetNmin(UInt_t val) { fNmin=val; }
206  UInt_t GetNmin() { return fNmin; }
207  void SetMaxDepth(UInt_t maxdepth) { fMaxDepth = maxdepth; }
208  UInt_t GetMaxDepth() const { return fMaxDepth; }
209 
210  // Getters and Setters for foam boundaries
211  void SetXmin(Int_t idim, Double_t wmin);
212  void SetXmax(Int_t idim, Double_t wmax);
213  Double_t GetXmin(Int_t idim) const {return fXmin[idim];}
214  Double_t GetXmax(Int_t idim) const {return fXmax[idim];}
215 
216  // Getters and Setters for variable names
217  void AddVariableName(const char *s) { AddVariableName(new TObjString(s)); }
219  TObjString* GetVariableName(Int_t idx) {return dynamic_cast<TObjString*>(fVariableNames->At(idx));}
220 
221  // Delete the fDistr object, which contains the binary search
222  // tree
223  void DeleteBinarySearchTree();
224 
225  // ---------- Transformation functions for event variables into foam boundaries
226  // reason: foam always has boundaries [0, 1]
227 
228  Float_t VarTransform(Int_t idim, Float_t x) const; // transform [xmin, xmax] --> [0, 1]
229  std::vector<Float_t> VarTransform(const std::vector<Float_t> &invec) const;
230  Float_t VarTransformInvers(Int_t idim, Float_t x) const; // transform [0, 1] --> [xmin, xmax]
231  std::vector<Float_t> VarTransformInvers(const std::vector<Float_t> &invec) const;
232 
233  // ---------- Debug functions
234 
235  void CheckAll(Int_t); // Checks correctness of the entire data structure in the FOAM object
236  void PrintCell(Long_t iCell=0); // Print content of cell
237  void PrintCells(); // Prints content of all cells
238 
239  // Message logger
240  MsgLogger& Log() const { return *fLogger; }
241 
242  // ---------- Foam projection methods
243 
244  // project foam to two-dimensional histogram
245  virtual TH2D* Project2(Int_t idim1, Int_t idim2, ECellValue cell_value=kValue,
246  PDEFoamKernelBase *kernel=NULL, UInt_t nbin=50);
247 
248  // Project one-dimensional foam to a 1-dim histogram
249  TH1D* Draw1Dim(ECellValue cell_value, Int_t nbin, PDEFoamKernelBase *kernel=NULL);
250 
251  // Generates C++ code (root macro) for drawing foam with boxes (only 2-dim!)
252  void RootPlot2dim( const TString& filename, TString opt,
253  Bool_t createCanvas = kTRUE, Bool_t colors = kTRUE );
254 
255  // ---------- Foam evaluation functions
256 
257  // get cell value for a given event
258  virtual Float_t GetCellValue( const std::vector<Float_t>& xvec, ECellValue cv, PDEFoamKernelBase* );
259 
260  // get cell values for a given (incomplete) event vector
261  virtual std::vector<Float_t> GetCellValue( const std::map<Int_t,Float_t>& xvec, ECellValue cv );
262 
263  // get cell value stored in a foam cell
264  virtual Float_t GetCellValue( const PDEFoamCell* cell, ECellValue cv );
265 
266  // ---------- friend classes
267  friend class PDEFoamKernelBase;
268  friend class PDEFoamKernelTrivial;
269  friend class PDEFoamKernelLinN;
270  friend class PDEFoamKernelGauss;
271 
272  // ---------- ROOT class definition
273  ClassDef(PDEFoam,7) // Tree of PDEFoamCells
274  }; // end of PDEFoam
275 
276 } // namespace TMVA
277 
278 // ---------- Inline functions
279 
280 //_____________________________________________________________________
282 {
283  // transform variable x from [xmin, xmax] --> [0, 1]
284  return (x-fXmin[idim])/(fXmax[idim]-fXmin[idim]);
285 }
286 
287 //_____________________________________________________________________
288 inline std::vector<Float_t> TMVA::PDEFoam::VarTransform(const std::vector<Float_t> &invec) const
289 {
290  // transform vector invec from [xmin, xmax] --> [0, 1]
291  std::vector<Float_t> outvec;
292  for(UInt_t i=0; i<invec.size(); i++)
293  outvec.push_back(VarTransform(i, invec.at(i)));
294  return outvec;
295 }
296 
297 //_____________________________________________________________________
299 {
300  // transform variable x from [0, 1] --> [xmin, xmax]
301  return x*(fXmax[idim]-fXmin[idim]) + fXmin[idim];
302 }
303 
304 //_____________________________________________________________________
305 inline std::vector<Float_t> TMVA::PDEFoam::VarTransformInvers(const std::vector<Float_t> &invec) const
306 {
307  // transform vector invec from [0, 1] --> [xmin, xmax]
308  std::vector<Float_t> outvec;
309  for(UInt_t i=0; i<invec.size(); i++)
310  outvec.push_back(VarTransformInvers(i, invec.at(i)));
311  return outvec;
312 }
313 
314 #endif
TMVA::PDEFoam::SetDensity
void SetDensity(PDEFoamDensityBase *dens)
Definition: PDEFoam.h:194
TMVA::PDEFoam::fNmin
UInt_t fNmin
Definition: PDEFoam.h:109
TMVA::PDEFoam::SetInhiDiv
void SetInhiDiv(Int_t, Int_t)
This can be called before Create, after setting kDim It defines which variables are excluded in the p...
Definition: PDEFoam.cxx:802
TMVA::PDEFoam::PDEFoam
PDEFoam()
Default constructor for streamer, user should not use it.
Definition: PDEFoam.cxx:103
TMVA::PDEFoam::fEvPerBin
Int_t fEvPerBin
Definition: PDEFoam.h:89
kTRUE
const Bool_t kTRUE
Definition: RtypesCore.h:91
TMVA::PDEFoam::FillFoamCells
virtual void FillFoamCells(const Event *ev, Float_t wt)
This function fills a weight 'wt' into the PDEFoam cell, which corresponds to the given event 'ev'.
Definition: PDEFoam.cxx:955
TMVA::PDEFoam::GetVariableName
TObjString * GetVariableName(Int_t idx)
Definition: PDEFoam.h:219
TObjArray
An array of TObjects.
Definition: TObjArray.h:37
TMVA::PDEFoam::GetRootCell
PDEFoamCell * GetRootCell() const
Definition: PDEFoam.h:202
TMVA::PDEFoam::PeekMax
Long_t PeekMax()
Internal subprogram used by Create.
Definition: PDEFoam.cxx:651
TMVA::PDEFoam::PrintCells
void PrintCells()
Prints geometry of ALL cells of the FOAM.
Definition: PDEFoam.cxx:942
TMVA::PDEFoam::fInhiDiv
Int_t * fInhiDiv
[fDim] Dynamic Mask for cell division
Definition: PDEFoam.h:92
TMVA::PDEFoam::Varedu
void Varedu(Double_t[], Int_t &, Double_t &, Double_t &)
Internal subprogram used by Create.
Definition: PDEFoam.cxx:570
TMVA::PDEFoamDensityBase
This is an abstract class, which provides an interface for a PDEFoam density estimator.
Definition: PDEFoamDensityBase.h:47
TMVA::PDEFoam::Grow
void Grow()
Internal subprogram used by Create.
Definition: PDEFoam.cxx:767
TMVA::PDEFoam::fHistEdg
TObjArray * fHistEdg
Definition: PDEFoam.h:98
TMVA::PDEFoam::PrintCell
void PrintCell(Long_t iCell=0)
Prints geometry of and elements of 'iCell', as well as relations to parent and daughter cells.
Definition: PDEFoam.cxx:895
TMVA::PDEFoam::fFoamType
EFoamType fFoamType
Definition: PDEFoam.h:105
TObjString.h
TMVA::PDEFoamKernelBase
This class is the abstract kernel interface for PDEFoam.
Definition: PDEFoamKernelBase.h:41
TMVA::PDEFoam::GetCellElement
Double_t GetCellElement(const PDEFoamCell *cell, UInt_t i) const
Returns cell element i of cell 'cell'.
Definition: PDEFoam.cxx:1416
PDEFoamCell.h
TMVA::PDEFoam::fNSampl
Int_t fNSampl
Definition: PDEFoam.h:88
TMVA::PDEFoam::Divide
Int_t Divide(PDEFoamCell *)
Internal subprogram used by Create.
Definition: PDEFoam.cxx:714
colors
Color * colors
Definition: X3DBuffer.c:21
TMVA::PDEFoam::VarTransform
Float_t VarTransform(Int_t idim, Float_t x) const
Definition: PDEFoam.h:281
TH1D
1-D histogram with a double per channel (see TH1 documentation)}
Definition: TH1.h:618
TMVA::PDEFoam::fNoAct
Int_t fNoAct
[fDim] Flags for inhibiting cell division
Definition: PDEFoam.h:94
Float_t
float Float_t
Definition: RtypesCore.h:57
TMVA::PDEFoam::Sqr
T Sqr(T x) const
Definition: PDEFoam.h:161
VariableInfo.h
TGeant4Unit::s
static constexpr double s
Definition: TGeant4SystemOfUnits.h:162
TMVA::PDEFoam::SetDim
void SetDim(Int_t kDim)
Sets dimension of cubical space.
Definition: PDEFoam.cxx:250
PDEFoamDensityBase.h
TMVA::PDEFoam::Project2
virtual TH2D * Project2(Int_t idim1, Int_t idim2, ECellValue cell_value=kValue, PDEFoamKernelBase *kernel=NULL, UInt_t nbin=50)
Project foam variable idim1 and variable idim2 to histogram.
Definition: PDEFoam.cxx:1270
TMVA::DNN::ELossFunction::kCrossEntropy
@ kCrossEntropy
TMVA::PDEFoam::GetCellValue
virtual Float_t GetCellValue(const std::vector< Float_t > &xvec, ECellValue cv, PDEFoamKernelBase *)
This function finds the cell, which corresponds to the given untransformed event vector 'xvec' and re...
Definition: PDEFoam.cxx:1016
TMVA::PDEFoam::fCells
PDEFoamCell ** fCells
Definition: PDEFoam.h:96
TMVA::PDEFoam::fXmax
Double_t * fXmax
Definition: PDEFoam.h:107
TMVA::PDEFoam::SetEvPerBin
void SetEvPerBin(Int_t EvPerBin)
Definition: PDEFoam.h:192
TMVA::PDEFoam::GetTotDim
Int_t GetTotDim() const
Definition: PDEFoam.h:197
TMVA::PDEFoam::SetXmin
void SetXmin(Int_t idim, Double_t wmin)
set lower foam bound in dimension idim
Definition: PDEFoam.cxx:265
x
Double_t x[n]
Definition: legend1.C:17
TMVA::PDEFoam::Eval
Double_t Eval(Double_t *xRand, Double_t &event_density)
Internal subprogram.
Definition: PDEFoam.cxx:747
TMVA::PDEFoam::AddVariableName
void AddVariableName(TObjString *s)
Definition: PDEFoam.h:218
TObjArray::At
TObject * At(Int_t idx) const
Definition: TObjArray.h:166
TMVA::PDEFoam::Draw1Dim
TH1D * Draw1Dim(ECellValue cell_value, Int_t nbin, PDEFoamKernelBase *kernel=NULL)
Draws 1-dimensional foam (= histogram)
Definition: PDEFoam.cxx:1218
TString
Basic string class.
Definition: TString.h:136
TMVA::PDEFoam::GetNInActiveCells
UInt_t GetNInActiveCells() const
Definition: PDEFoam.h:200
Bool_t
bool Bool_t
Definition: RtypesCore.h:63
TMVA::PDEFoam::CellFill
Int_t CellFill(Int_t, PDEFoamCell *)
Internal subprogram used by Create.
Definition: PDEFoam.cxx:389
TMVA::PDEFoam::fDistr
PDEFoamDensityBase * fDistr
Definition: PDEFoam.h:115
TString.h
bool
TObjArray::Add
void Add(TObject *obj)
Definition: TObjArray.h:74
TMVA::PDEFoam::ResetCellElements
void ResetCellElements()
Remove the cell elements from all cells.
Definition: PDEFoam.cxx:971
TMVA::PDEFoam::CellValueIsUndefined
virtual Bool_t CellValueIsUndefined(PDEFoamCell *)
Returns true, if the value of the given cell is undefined.
Definition: PDEFoam.cxx:990
TMVA::PDEFoam::Initialize
void Initialize()
Definition: PDEFoam.h:173
PDEFoamVect.h
TObjString
Collectable string class.
Definition: TObjString.h:28
TMVA::PDEFoam::SetMaxDepth
void SetMaxDepth(UInt_t maxdepth)
Definition: PDEFoam.h:207
TMVA::PDEFoam::fName
TString fName
Definition: PDEFoam.h:83
TMVA::PDEFoam
Implementation of PDEFoam.
Definition: PDEFoam.h:79
TMVA::PDEFoam::~PDEFoam
virtual ~PDEFoam()
Default destructor.
Definition: PDEFoam.cxx:184
TVectorT.h
Timer.h
TMVA::PDEFoam::fDim
Int_t fDim
Definition: PDEFoam.h:84
TMVA::PDEFoam::fNElements
UInt_t fNElements
Definition: PDEFoam.h:108
TH2D.h
TRandom3
Random number generator class based on M.
Definition: TRandom3.h:27
TMVA::PDEFoam::fRvec
Double_t * fRvec
Definition: PDEFoam.h:99
TMVA::PDEFoam::fFillFoamWithOrigWeights
Bool_t fFillFoamWithOrigWeights
Definition: PDEFoam.h:112
TMVA::PDEFoam::SetNmin
void SetNmin(UInt_t val)
Definition: PDEFoam.h:205
TMVA::PDEFoam::SetnSampl
void SetnSampl(Long_t nSampl)
Definition: PDEFoam.h:190
TMVA::PDEFoam::InitCells
void InitCells()
Internal subprogram used by Create.
Definition: PDEFoam.cxx:356
TMVA::PDEFoamKernelTrivial
This class is a trivial PDEFoam kernel estimator.
Definition: PDEFoamKernelTrivial.h:40
TMVA::PDEFoam::VarTransformInvers
Float_t VarTransformInvers(Int_t idim, Float_t x) const
Definition: PDEFoam.h:298
Long_t
long Long_t
Definition: RtypesCore.h:54
TH2D
2-D histogram with a double per channel (see TH1 documentation)}
Definition: TH2.h:292
TMVA::PDEFoam::GetNActiveCells
UInt_t GetNActiveCells() const
Definition: PDEFoam.h:199
TMVA::PDEFoam::fVariableNames
TObjArray * fVariableNames
timer for graphical output
Definition: PDEFoam.h:117
TMVA::PDEFoam::AddVariableName
void AddVariableName(const char *s)
Definition: PDEFoam.h:217
TMVA::PDEFoam::SetXmax
void SetXmax(Int_t idim, Double_t wmax)
set upper foam bound in dimension idim
Definition: PDEFoam.cxx:276
TMVA::PDEFoam::fDTSeparation
EDTSeparation fDTSeparation
Definition: PDEFoam.h:113
TMVA::PDEFoam::fXmin
Double_t * fXmin
Definition: PDEFoam.h:106
TRandom3.h
TMVA::PDEFoamKernelGauss
This PDEFoam kernel estimates a cell value for a given event by weighting all cell values with a gaus...
Definition: PDEFoamKernelGauss.h:39
TMVA::PDEFoam::fVolFrac
Float_t fVolFrac
Definition: PDEFoam.h:111
TMVA::PDEFoam::GetXmax
Double_t GetXmax(Int_t idim) const
Definition: PDEFoam.h:214
TMVA::PDEFoam::GetNCells
UInt_t GetNCells() const
Definition: PDEFoam.h:201
UInt_t
unsigned int UInt_t
Definition: RtypesCore.h:46
TMVA::PDEFoam::GetDistr
PDEFoamDensityBase * GetDistr() const
Definition: PDEFoam.h:158
TMVA::PDEFoam::fPeekMax
Bool_t fPeekMax
Definition: PDEFoam.h:114
TMVA::PDEFoam::OutputGrow
void OutputGrow(Bool_t finished=false)
message logger
Definition: PDEFoam.cxx:1460
TMVA::PDEFoam::SetCellElement
void SetCellElement(PDEFoamCell *cell, UInt_t i, Double_t value)
Set cell element i of cell to value.
Definition: PDEFoam.cxx:1432
TMVA::PDEFoamKernelLinN
This PDEFoam kernel estimates a cell value for a given event by weighting with cell values of the nea...
Definition: PDEFoamKernelLinN.h:40
TMVA::PDEFoam::GetFoamName
TString GetFoamName() const
Definition: PDEFoam.h:198
unsigned int
TMVA::Timer
Timing information for training and evaluation of MVA methods.
Definition: Timer.h:58
TMVA::PDEFoam::fAlpha
Double_t * fAlpha
Definition: PDEFoam.h:103
TMVA::PDEFoam::Log
MsgLogger & Log() const
Definition: PDEFoam.h:240
TMVA::PDEFoam::fTimer
Timer * fTimer
distribution of training events
Definition: PDEFoam.h:116
Double_t
double Double_t
Definition: RtypesCore.h:59
TMVA::MsgLogger
ostringstream derivative to redirect and format output
Definition: MsgLogger.h:59
TObject.h
TObjArray.h
TMVA::PDEFoam::FindCells
std::vector< TMVA::PDEFoamCell * > FindCells(const std::vector< Float_t > &) const
Find all cells, that contain txvec.
Definition: PDEFoam.cxx:1165
TMVA::PDEFoam::RootPlot2dim
void RootPlot2dim(const TString &filename, TString opt, Bool_t createCanvas=kTRUE, Bool_t colors=kTRUE)
Debugging tool which plots the cells of a 2-dimensional PDEFoam as rectangles in C++ format readable ...
Definition: PDEFoam.cxx:1511
TMVA::PDEFoam::CheckAll
void CheckAll(Int_t)
User utility, miscellaneous and debug.
Definition: PDEFoam.cxx:822
TMVA::PDEFoam::Create
void Create()
Basic initialization of FOAM invoked by the user.
Definition: PDEFoam.cxx:292
TMVA::PDEFoam::DeleteBinarySearchTree
void DeleteBinarySearchTree()
Delete the foam's density estimator, which contains the binary search tree.
Definition: PDEFoam.cxx:1666
TMVA::PDEFoam::SetnCells
void SetnCells(Long_t nCells)
Definition: PDEFoam.h:189
TObject
Mother of all ROOT objects.
Definition: TObject.h:37
TMVA::Event
Definition: Event.h:51
ClassDef
#define ClassDef(name, id)
Definition: Rtypes.h:325
TMVA::PDEFoam::fMaskDiv
Int_t * fMaskDiv
Definition: PDEFoam.h:91
TMVA::PDEFoam::fMaxDepth
UInt_t fMaxDepth
Definition: PDEFoam.h:110
ROOT::Math::Chebyshev::T
double T(double x)
Definition: ChebyshevPol.h:34
TMVA::PDEFoam::MakeAlpha
void MakeAlpha()
Internal subprogram used by Create.
Definition: PDEFoam.cxx:637
TMVA::PDEFoam::Finalize
virtual void Finalize()
Definition: PDEFoam.h:184
TMVA::PDEFoam::fNCells
Int_t fNCells
Definition: PDEFoam.h:85
TMVA::PDEFoam::GetNmin
UInt_t GetNmin()
Definition: PDEFoam.h:206
TMVA::PDEFoam::FillBinarySearchTree
void FillBinarySearchTree(const Event *ev)
Insert event to internal foam's density estimator PDEFoamDensityBase.
Definition: PDEFoam.cxx:1657
TMVA::PDEFoam::FindCell
PDEFoamCell * FindCell(const std::vector< Float_t > &) const
Find cell that contains 'xvec' (in foam coordinates [0,1]).
Definition: PDEFoam.cxx:1080
TMVA::PDEFoam::SetnBin
void SetnBin(Int_t nBin)
Definition: PDEFoam.h:191
TMVA::PDEFoam::GetXmin
Double_t GetXmin(Int_t idim) const
Definition: PDEFoam.h:213
CPyCppyy::Utility::kValue
@ kValue
Definition: Utility.h:36
TMVA::PDEFoam::fLastCe
Int_t fLastCe
Definition: PDEFoam.h:95
TMVA::PDEFoam::fPseRan
TRandom3 * fPseRan
Definition: PDEFoam.h:101
TMVA::PDEFoam::Explore
virtual void Explore(PDEFoamCell *Cell)
Internal subprogram used by Create.
Definition: PDEFoam.cxx:434
TMVA::PDEFoam::GetMaxDepth
UInt_t GetMaxDepth() const
Definition: PDEFoam.h:208
TMVA::PDEFoamCell
Definition: PDEFoamCell.h:41
TMVA
create variable transformations
Definition: GeneticMinimizer.h:22
TMVA::PDEFoam::fNBin
Int_t fNBin
Definition: PDEFoam.h:87
int
TMVA::PDEFoam::fLogger
MsgLogger * fLogger
Definition: PDEFoam.h:118