Loading [MathJax]/jax/input/TeX/config.js
ROOT
6.06/09
Reference Guide
ROOT Home Page
Main Page
Related Pages
User's Classes
Namespaces
All Classes
Files
Release Notes
File List
File Members
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Modules
Pages
tmva
tmva
inc
TMVA
KDEKernel.h
Go to the documentation of this file.
1
// @(#)root/tmva $Id$
2
// Author: Asen Christov
3
4
/**********************************************************************************
5
* Project: TMVA - a Root-integrated toolkit for multivariate data analysis *
6
* Package: TMVA *
7
* Class : KDEKernel *
8
* Web : http://tmva.sourceforge.net *
9
* *
10
* Description: *
11
* The Probability Density Functions (PDFs) used for the Likelihood analysis *
12
* can suffer from low statistics of the training samples. This can couse *
13
* the PDFs to fluctuate instead to be smooth. Nonparamatric Kernel Density *
14
* Estimation is one of the methods to produse "smooth" PDFs. *
15
* *
16
* Authors (alphabetical): *
17
* Asen Christov <christov@physik.uni-freiburg.de> - Freiburg U., Germany *
18
* *
19
* Copyright (c) 2007: *
20
* CERN, Switzerland *
21
* MPI-K Heidelberg, Germany *
22
* Freiburg U., 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
#ifndef ROOT_TMVA_KDEKernel
30
#define ROOT_TMVA_KDEKernel
31
32
//////////////////////////////////////////////////////////////////////////
33
// //
34
// KDEKernel //
35
// //
36
// KDE Kernel for "smoothing" the PDFs //
37
// //
38
//////////////////////////////////////////////////////////////////////////
39
40
#ifndef ROOT_Rtypes
41
#include "
Rtypes.h
"
42
#endif
43
44
class
TH1
;
45
class
TH1F
;
46
class
TF1
;
47
48
namespace
TMVA
{
49
50
class
MsgLogger;
51
52
class
KDEKernel
{
53
54
public
:
55
56
enum
EKernelType
{
kNone
= 0,
kGauss
= 1 };
57
enum
EKernelIter
{
kNonadaptiveKDE
= 1,
kAdaptiveKDE
= 2 };
58
enum
EKernelBorder
{
kNoTreatment
= 1,
kKernelRenorm
= 2,
kSampleMirror
= 3 };
59
60
public
:
61
62
KDEKernel
(
EKernelIter
kiter =
kNonadaptiveKDE
,
const
TH1
* hist = 0,
Float_t
lower_edge=0.,
Float_t
upper_edge=1.,
EKernelBorder
kborder =
kNoTreatment
,
Float_t
FineFactor = 1.);
63
64
virtual
~KDEKernel
(
void
);
65
66
// calculates the integral of the Kernel function in the given bin.
67
Float_t
GetBinKernelIntegral
(
Float_t
lowr,
Float_t
highr,
Float_t
mean,
Int_t
binnum);
68
69
// sets the type of Kernel to be used (Default 1 mean Gaussian)
70
void
SetKernelType
(
EKernelType
ktype =
kGauss
);
71
72
// modified name (remove TMVA::)
73
const
char
*
GetName
()
const
{
return
"KDEKernel"
; }
74
75
private
:
76
77
Float_t
fSigma
;
// Width of the Kernel function
78
EKernelIter
fIter
;
// iteration number
79
Float_t
fLowerEdge
;
// the lower edge of the PDF
80
Float_t
fUpperEdge
;
// the upper edge of the PDF
81
Float_t
fFineFactor
;
// fine tuning factor for Adaptive KDE: factor to multiply the "width" of the Kernel function
82
TF1
*
fKernel_integ
;
// the integral of the Kernel function
83
EKernelBorder
fKDEborder
;
// The method to take care about "border" effects
84
TH1F
*
fHist
;
// copy of input histogram
85
TH1F
*
fFirstIterHist
;
// histogram to be filled in the hidden iteration
86
TH1F
*
fSigmaHist
;
// contains the Sigmas Widths for adaptive KDE
87
Bool_t
fHiddenIteration
;
// Defines if whats currently running is the
88
// (first) hidden iteration when doing adaptive KDE
89
90
mutable
MsgLogger
*
fLogger
;
// message logger
91
MsgLogger
&
Log
()
const
{
return
*
fLogger
; }
92
93
ClassDef
(
KDEKernel
,0)
// Kernel density estimator for PDF smoothing
94
95
};
// namespace TMVA
96
}
97
#endif // KDEKernel_H
TMVA::KDEKernel::GetName
const char * GetName() const
Definition:
KDEKernel.h:73
TMVA::KDEKernel::kSampleMirror
Definition:
KDEKernel.h:58
TMVA::KDEKernel::fLowerEdge
Float_t fLowerEdge
Definition:
KDEKernel.h:79
Rtypes.h
Float_t
float Float_t
Definition:
RtypesCore.h:53
TMVA::KDEKernel::fUpperEdge
Float_t fUpperEdge
Definition:
KDEKernel.h:80
TMVA::KDEKernel::kNonadaptiveKDE
Definition:
KDEKernel.h:57
TH1F
1-D histogram with a float per channel (see TH1 documentation)}
Definition:
TH1.h:570
Int_t
int Int_t
Definition:
RtypesCore.h:41
Bool_t
bool Bool_t
Definition:
RtypesCore.h:59
TMVA::KDEKernel::fHist
TH1F * fHist
Definition:
KDEKernel.h:84
TMVA::KDEKernel::fFineFactor
Float_t fFineFactor
Definition:
KDEKernel.h:81
TMVA::KDEKernel::kKernelRenorm
Definition:
KDEKernel.h:58
TMVA::KDEKernel::fHiddenIteration
Bool_t fHiddenIteration
Definition:
KDEKernel.h:87
ClassDef
#define ClassDef(name, id)
Definition:
Rtypes.h:254
TMVA::KDEKernel
Definition:
KDEKernel.h:52
TMVA::KDEKernel::kNone
Definition:
KDEKernel.h:56
TMVA::KDEKernel::fIter
EKernelIter fIter
Definition:
KDEKernel.h:78
TMVA::KDEKernel::fKDEborder
EKernelBorder fKDEborder
Definition:
KDEKernel.h:83
TMVA::KDEKernel::fFirstIterHist
TH1F * fFirstIterHist
Definition:
KDEKernel.h:85
TMVA::KDEKernel::fSigmaHist
TH1F * fSigmaHist
Definition:
KDEKernel.h:86
TMVA::KDEKernel::EKernelBorder
EKernelBorder
Definition:
KDEKernel.h:58
TMVA::KDEKernel::fLogger
MsgLogger * fLogger
Definition:
KDEKernel.h:90
TMVA::KDEKernel::fSigma
Float_t fSigma
Definition:
KDEKernel.h:77
TMVA::KDEKernel::GetBinKernelIntegral
Float_t GetBinKernelIntegral(Float_t lowr, Float_t highr, Float_t mean, Int_t binnum)
calculates the integral of the Kernel
Definition:
KDEKernel.cxx:217
TMVA::KDEKernel::~KDEKernel
virtual ~KDEKernel(void)
destructor
Definition:
KDEKernel.cxx:76
TH1
The TH1 histogram class.
Definition:
TH1.h:80
TMVA::MsgLogger
Definition:
MsgLogger.h:63
TMVA
Abstract ClassifierFactory template that handles arbitrary types.
Definition:
MethodPyAdaBoost.h:29
TMVA::KDEKernel::kNoTreatment
Definition:
KDEKernel.h:58
TMVA::KDEKernel::kAdaptiveKDE
Definition:
KDEKernel.h:57
TMVA::KDEKernel::EKernelType
EKernelType
Definition:
KDEKernel.h:56
TF1
1-Dim function class
Definition:
TF1.h:149
TMVA::KDEKernel::EKernelIter
EKernelIter
Definition:
KDEKernel.h:57
TMVA::KDEKernel::SetKernelType
void SetKernelType(EKernelType ktype=kGauss)
fIter == 1 —> nonadaptive KDE fIter == 2 —> adaptive KDE
Definition:
KDEKernel.cxx:112
TMVA::KDEKernel::Log
MsgLogger & Log() const
Definition:
KDEKernel.h:91
TMVA::KDEKernel::KDEKernel
KDEKernel(EKernelIter kiter=kNonadaptiveKDE, const TH1 *hist=0, Float_t lower_edge=0., Float_t upper_edge=1., EKernelBorder kborder=kNoTreatment, Float_t FineFactor=1.)
TMVA::KDEKernel::kGauss
Definition:
KDEKernel.h:56
TMVA::KDEKernel::fKernel_integ
TF1 * fKernel_integ
Definition:
KDEKernel.h:82