ROOT  6.06/09
Reference Guide
PDEFoamKernelGauss.h
Go to the documentation of this file.
1 // @(#)root/tmva $Id$
2 // Author: Dominik Dannheim, Alexander Voigt
3 
4 /**********************************************************************************
5  * Project: TMVA - a Root-integrated toolkit for multivariate data analysis *
6  * Package: TMVA *
7  * Classes: PDEFoamKernelGauss *
8  * Web : http://tmva.sourceforge.net *
9  * *
10  * Description: *
11  * PDEFoam kernel, which weights all cell values by a gauss function. *
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_PDEFoamKernelGauss
29 #define ROOT_TMVA_PDEFoamKernelGauss
30 
31 #ifndef ROOT_TMVA_PDEFoam
32 #include "TMVA/PDEFoam.h"
33 #endif
34 #ifndef ROOT_TMVA_PDEFoamKernelBase
35 #include "TMVA/PDEFoamKernelBase.h"
36 #endif
37 
38 namespace TMVA
39 {
40 
42  {
43 
44  protected:
45  Float_t fSigma; // width of gauss curve
46 
47  // Square function (fastest implementation)
48  template<typename T> T Sqr(T x) const { return x * x; }
49 
50  // calculate gaussian weight
51  Float_t WeightGaus(PDEFoam*, PDEFoamCell*, std::vector<Float_t>&);
52 
53  // estimate the cell value by its neighbors
54  Float_t GetAverageNeighborsValue(PDEFoam*, std::vector<Float_t>&, ECellValue);
55 
56  public:
57  PDEFoamKernelGauss(Float_t sigma); // Constructor
58  PDEFoamKernelGauss(const PDEFoamKernelGauss&); // Copy Constructor
59  virtual ~PDEFoamKernelGauss() {} // Destructor
60 
61  // kernel estimator
62  virtual Float_t Estimate(PDEFoam*, std::vector<Float_t>&, ECellValue);
63 
64  ClassDef(PDEFoamKernelGauss, 1) // Gaussian PDEFoam kernel estimator
65  }; // end of PDEFoamKernelGauss
66 } // namespace TMVA
67 
68 #endif
float Float_t
Definition: RtypesCore.h:53
double T(double x)
Definition: ChebyshevPol.h:34
Float_t WeightGaus(PDEFoam *, PDEFoamCell *, std::vector< Float_t > &)
Returns the gauss weight between the 'cell' and a given coordinate 'txvec'.
Double_t x[n]
Definition: legend1.C:17
Float_t GetAverageNeighborsValue(PDEFoam *, std::vector< Float_t > &, ECellValue)
This function returns the average value 'cv' of only nearest neighbor cells.
#define ClassDef(name, id)
Definition: Rtypes.h:254
PDEFoamKernelGauss(Float_t sigma)
virtual Float_t Estimate(PDEFoam *, std::vector< Float_t > &, ECellValue)
Gaussian kernel estimator.
ECellValue
Definition: PDEFoam.h:85
Abstract ClassifierFactory template that handles arbitrary types.