/usr/include/root/TMVA/KDEKernel.h is in libroot-tmva-dev 5.34.14-1build1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 | // @(#)root/tmva $Id$
// Author: Asen Christov
/**********************************************************************************
* Project: TMVA - a Root-integrated toolkit for multivariate data analysis *
* Package: TMVA *
* Class : KDEKernel *
* Web : http://tmva.sourceforge.net *
* *
* Description: *
* The Probability Density Functions (PDFs) used for the Likelihood analysis *
* can suffer from low statistics of the training samples. This can couse *
* the PDFs to fluctuate instead to be smooth. Nonparamatric Kernel Density *
* Estimation is one of the methods to produse "smooth" PDFs. *
* *
* Authors (alphabetical): *
* Asen Christov <christov@physik.uni-freiburg.de> - Freiburg U., Germany *
* *
* Copyright (c) 2007: *
* CERN, Switzerland *
* MPI-K Heidelberg, Germany *
* Freiburg U., Germany *
* *
* Redistribution and use in source and binary forms, with or without *
* modification, are permitted according to the terms listed in LICENSE *
* (http://tmva.sourceforge.net/LICENSE) *
**********************************************************************************/
#ifndef ROOT_TMVA_KDEKernel
#define ROOT_TMVA_KDEKernel
//////////////////////////////////////////////////////////////////////////
// //
// KDEKernel //
// //
// KDE Kernel for "smoothing" the PDFs //
// //
//////////////////////////////////////////////////////////////////////////
class TH1;
class TH1F;
class TF1;
namespace TMVA {
class MsgLogger;
class KDEKernel {
public:
enum EKernelType { kNone = 0, kGauss = 1 };
enum EKernelIter { kNonadaptiveKDE = 1, kAdaptiveKDE = 2 };
enum EKernelBorder { kNoTreatment = 1, kKernelRenorm = 2, kSampleMirror = 3 };
public:
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.);
virtual ~KDEKernel( void );
// calculates the integral of the Kernel function in the given bin.
Float_t GetBinKernelIntegral(Float_t lowr, Float_t highr, Float_t mean, Int_t binnum);
// sets the type of Kernel to be used (Default 1 mean Gaussian)
void SetKernelType( EKernelType ktype = kGauss );
// modified name (remove TMVA::)
const char* GetName() const { return "KDEKernel"; }
private:
Float_t fSigma; // Width of the Kernel function
EKernelIter fIter; // iteration number
Float_t fLowerEdge; // the lower edge of the PDF
Float_t fUpperEdge; // the upper edge of the PDF
Float_t fFineFactor; // fine tuning factor for Adaptive KDE: factor to multiply the "width" of the Kernel function
TF1 *fKernel_integ; // the integral of the Kernel function
EKernelBorder fKDEborder; // The method to take care about "border" effects
TH1F *fHist; // copy of input histogram
TH1F *fFirstIterHist; // histogram to be filled in the hidden iteration
TH1F *fSigmaHist; // contains the Sigmas Widths for adaptive KDE
Bool_t fHiddenIteration; // Defines if whats currently running is the
// (first) hidden iteration when doing adaptive KDE
mutable MsgLogger* fLogger; // message logger
MsgLogger& Log() const { return *fLogger; }
ClassDef(KDEKernel,0) // Kernel density estimator for PDF smoothing
};// namespace TMVA
}
#endif // KDEKernel_H
|