ROOT » HIST » HIST » TKDE

class TKDE: public TNamed

Function Members (Methods)

public:
virtual~TKDE()
voidTObject::AbstractMethod(const char* method) const
virtual voidTObject::AppendPad(Option_t* option = "")
virtual voidTObject::Browse(TBrowser* b)
static TClass*Class()
virtual const char*TObject::ClassName() const
virtual voidTNamed::Clear(Option_t* option = "")
virtual TObject*TNamed::Clone(const char* newname = "") const
virtual Int_tTNamed::Compare(const TObject* obj) const
virtual voidTNamed::Copy(TObject& named) const
virtual voidTObject::Delete(Option_t* option = "")MENU
virtual Int_tTObject::DistancetoPrimitive(Int_t px, Int_t py)
virtual voidDraw(const Option_t* option = "")
virtual voidTObject::DrawClass() constMENU
virtual TObject*TObject::DrawClone(Option_t* option = "") constMENU
virtual voidTObject::Dump() constMENU
virtual voidTObject::Error(const char* method, const char* msgfmt) const
virtual voidTObject::Execute(const char* method, const char* params, Int_t* error = 0)
virtual voidTObject::Execute(TMethod* method, TObjArray* params, Int_t* error = 0)
virtual voidTObject::ExecuteEvent(Int_t event, Int_t px, Int_t py)
virtual voidTObject::Fatal(const char* method, const char* msgfmt) const
voidFill(Double_t data)
virtual voidTNamed::FillBuffer(char*& buffer)
virtual TObject*TObject::FindObject(const char* name) const
virtual TObject*TObject::FindObject(const TObject* obj) const
const Double_t*GetAdaptiveWeights() const
TF1*GetApproximateBias(UInt_t npx = 100, Double_t xMin = 1., Double_t xMax = 0.)
Double_tGetBias(Double_t x) const
TF1*GetDrawnFunction()
TGraphErrors*GetDrawnGraph()
TF1*GetDrawnLowerFunction()
TF1*GetDrawnUpperFunction()
virtual Option_t*TObject::GetDrawOption() const
static Long_tTObject::GetDtorOnly()
Double_tGetError(Double_t x) const
Double_tGetFixedWeight() const
TF1*GetFunction(UInt_t npx = 100, Double_t xMin = 1., Double_t xMax = 0.)
TGraphErrors*GetGraphWithErrors(UInt_t npx = 100, Double_t xMin = 1., Double_t xMax = 0.)
virtual const char*TObject::GetIconName() const
TF1*GetLowerFunction(Double_t confidenceLevel = 0.94999999999999996, UInt_t npx = 100, Double_t xMin = 1., Double_t xMax = 0.)
Double_tGetMean() const
virtual const char*TNamed::GetName() const
virtual char*TObject::GetObjectInfo(Int_t px, Int_t py) const
static Bool_tTObject::GetObjectStat()
virtual Option_t*TObject::GetOption() const
Double_tGetRAMISE() const
Double_tGetSigma() const
virtual const char*TNamed::GetTitle() const
virtual UInt_tTObject::GetUniqueID() const
TF1*GetUpperFunction(Double_t confidenceLevel = 0.94999999999999996, UInt_t npx = 100, Double_t xMin = 1., Double_t xMax = 0.)
Double_tGetValue(Double_t x) const
virtual Bool_tTObject::HandleTimer(TTimer* timer)
virtual ULong_tTNamed::Hash() const
virtual voidTObject::Info(const char* method, const char* msgfmt) const
virtual Bool_tTObject::InheritsFrom(const char* classname) const
virtual Bool_tTObject::InheritsFrom(const TClass* cl) const
virtual voidTObject::Inspect() constMENU
voidTObject::InvertBit(UInt_t f)
virtual TClass*IsA() const
virtual Bool_tTObject::IsEqual(const TObject* obj) const
virtual Bool_tTObject::IsFolder() const
Bool_tTObject::IsOnHeap() const
virtual Bool_tTNamed::IsSortable() const
Bool_tTObject::IsZombie() const
virtual voidTNamed::ls(Option_t* option = "") const
voidTObject::MayNotUse(const char* method) const
virtual Bool_tTObject::Notify()
voidTObject::Obsolete(const char* method, const char* asOfVers, const char* removedFromVers) const
voidTObject::operator delete(void* ptr)
voidTObject::operator delete(void* ptr, void* vp)
voidTObject::operator delete[](void* ptr)
voidTObject::operator delete[](void* ptr, void* vp)
void*TObject::operator new(size_t sz)
void*TObject::operator new(size_t sz, void* vp)
void*TObject::operator new[](size_t sz)
void*TObject::operator new[](size_t sz, void* vp)
Double_toperator()(Double_t x) const
Double_toperator()(const Double_t* x, const Double_t* p = 0) const
virtual voidTObject::Paint(Option_t* option = "")
virtual voidTObject::Pop()
virtual voidTNamed::Print(Option_t* option = "") const
virtual Int_tTObject::Read(const char* name)
virtual voidTObject::RecursiveRemove(TObject* obj)
voidTObject::ResetBit(UInt_t f)
virtual voidTObject::SaveAs(const char* filename = "", Option_t* option = "") constMENU
virtual voidTObject::SavePrimitive(ostream& out, Option_t* option = "")
voidSetBinning(TKDE::EBinning)
voidTObject::SetBit(UInt_t f)
voidTObject::SetBit(UInt_t f, Bool_t set)
virtual voidTObject::SetDrawOption(Option_t* option = "")MENU
static voidTObject::SetDtorOnly(void* obj)
voidSetIteration(TKDE::EIteration iter)
voidSetKernelType(TKDE::EKernelType kern)
voidSetMirror(TKDE::EMirror mir)
virtual voidTNamed::SetName(const char* name)MENU
virtual voidTNamed::SetNameTitle(const char* name, const char* title)
voidSetNBins(UInt_t nbins)
static voidTObject::SetObjectStat(Bool_t stat)
voidSetRange(Double_t xMin, Double_t xMax)
virtual voidTNamed::SetTitle(const char* title = "")MENU
voidSetTuneFactor(Double_t rho)
virtual voidTObject::SetUniqueID(UInt_t uid)
voidSetUseBinsNEvents(UInt_t nEvents)
virtual voidShowMembers(TMemberInspector& insp) const
virtual Int_tTNamed::Sizeof() const
virtual voidStreamer(TBuffer&)
voidStreamerNVirtual(TBuffer& ClassDef_StreamerNVirtual_b)
virtual voidTObject::SysError(const char* method, const char* msgfmt) const
Bool_tTObject::TestBit(UInt_t f) const
Int_tTObject::TestBits(UInt_t f) const
TKDE(UInt_t events = 0, const Double_t* data = 0, Double_t xMin = 0., Double_t xMax = 0., const Option_t* option = "KernelType:Gaussian;Iteration:Adaptive;Mirror:noMirror;Binning:RelaxedBinning", Double_t rho = 1.)
virtual voidTObject::UseCurrentStyle()
virtual voidTObject::Warning(const char* method, const char* msgfmt) const
virtual Int_tTObject::Write(const char* name = 0, Int_t option = 0, Int_t bufsize = 0)
virtual Int_tTObject::Write(const char* name = 0, Int_t option = 0, Int_t bufsize = 0) const
protected:
virtual voidTObject::DoError(int level, const char* location, const char* fmt, va_list va) const
voidTObject::MakeZombie()
private:
Double_tApproximateBias(const Double_t* x, const Double_t*) const
voidAssureOptions()
Double_tBiweightKernel(Double_t x) const
voidCheckKernelValidity()
voidCheckOptions(Bool_t isUserDefinedKernel = kFALSE)
Double_tComputeKernelIntegral() const
Double_tComputeKernelL2Norm() const
Double_tComputeKernelMu() const
Double_tComputeKernelSigma2() const
Double_tComputeMidspread()
Double_tCosineArchKernel(Double_t x) const
voidDrawConfidenceInterval(TString& drawOpt, double cl = 0.94999999999999996)
voidDrawErrors(TString& drawOpt)
Double_tEpanechnikovKernel(Double_t x) const
Double_tGaussianKernel(Double_t x) const
TF1*GetKDEApproximateBias(UInt_t npx = 100, Double_t xMin = 1., Double_t xMax = 0.)
TF1*GetKDEFunction(UInt_t npx = 100, Double_t xMin = 1., Double_t xMax = 0.)
voidGetOptions(string optionType, string option)
TF1*GetPDFLowerConfidenceInterval(Double_t confidenceLevel = 0.94999999999999996, UInt_t npx = 100, Double_t xMin = 1., Double_t xMax = 0.)
TF1*GetPDFUpperConfidenceInterval(Double_t confidenceLevel = 0.94999999999999996, UInt_t npx = 100, Double_t xMin = 1., Double_t xMax = 0.)
UInt_tIndex(Double_t x) const
voidInitFromNewData()
voidInstantiate(TKDE::KernelFunction_Ptr kernfunc, UInt_t events, const Double_t* data, Double_t xMin, Double_t xMax, const Option_t* option, Double_t rho)
Double_tLowerConfidenceInterval(const Double_t* x, const Double_t* p) const
TKDEoperator=(TKDE& kde)
voidSetBinCentreData(Double_t xmin, Double_t xmax)
voidSetBinCountData()
voidSetCanonicalBandwidth()
voidSetCanonicalBandwidths()
voidSetData(const Double_t* data)
voidSetDrawOptions(const Option_t* option, TString& plotOpt, TString& drawOpt)
voidSetHistogram()
voidSetKernel()
voidSetKernelFunction(TKDE::KernelFunction_Ptr kernfunc = 0)
voidSetKernelSigma2()
voidSetKernelSigmas2()
voidSetMean()
voidSetMirror()
voidSetMirroredEvents()
voidSetOptions(const Option_t* option, Double_t rho)
voidSetSigma(Double_t R)
voidSetUseBins()
TKDE(TKDE& kde)
Double_tUpperConfidenceInterval(const Double_t* x, const Double_t* p) const

Data Members

public:
static TKDE::EIterationkAdaptive
static TObject::(anonymous)TObject::kBitMask
static TKDE::EKernelTypekBiweight
static TObject::EStatusBitsTObject::kCanDelete
static TObject::EStatusBitsTObject::kCannotPick
static TKDE::EKernelTypekCosineArch
static TKDE::EKernelTypekEpanechnikov
static TKDE::EIterationkFixed
static TKDE::EBinningkForcedBinning
static TKDE::EKernelTypekGaussian
static TObject::EStatusBitsTObject::kHasUUID
static TObject::EStatusBitsTObject::kInvalidObject
static TObject::(anonymous)TObject::kIsOnHeap
static TObject::EStatusBitsTObject::kIsReferenced
static TKDE::EMirrorkMirrorAsymBoth
static TKDE::EMirrorkMirrorAsymLeft
static TKDE::EMirrorkMirrorAsymLeftRight
static TKDE::EMirrorkMirrorAsymRight
static TKDE::EMirrorkMirrorBoth
static TKDE::EMirrorkMirrorLeft
static TKDE::EMirrorkMirrorLeftAsymRight
static TKDE::EMirrorkMirrorRight
static TObject::EStatusBitsTObject::kMustCleanup
static TObject::EStatusBitsTObject::kNoContextMenu
static TKDE::EMirrorkNoMirror
static TObject::(anonymous)TObject::kNotDeleted
static TObject::EStatusBitsTObject::kObjInCanvas
static TObject::(anonymous)TObject::kOverwrite
static TKDE::EBinningkRelaxedBinning
static TObject::(anonymous)TObject::kSingleKey
static TKDE::EKernelTypekTotalKernels
static TKDE::EBinningkUnbinned
static TKDE::EKernelTypekUserDefined
static TObject::(anonymous)TObject::kWriteDelete
static TObject::(anonymous)TObject::kZombie
protected:
TStringTNamed::fNameobject identifier
TStringTNamed::fTitleobject title
private:
Double_tfAdaptiveBandwidthFactorGeometric mean of the kernel density estimation from the data for adaptive iteration
TF1*fApproximateBiasOutput Kernel Density Estimation approximate bias
Bool_tfAsymLeft
Bool_tfAsymRight
vector<UInt_t>fBinCountNumber of events per bin for binned data option
TKDE::EBinningfBinning
vector<Double_t>fCanonicalBandwidths
vector<Double_t>fDataData events
vector<Double_t>fEventsOriginal data storage
TGraphErrors*fGraphGraph with the errors
TKDE::EIterationfIteration
TKDE::TKernel*fKernel
TKDE::KernelFunction_PtrfKernelFunction
vector<Double_t>fKernelSigmas2
TKDE::EKernelTypefKernelType
TF1*fLowerPDFOutput Kernel Density Estimation lower confidence interval PDF function
Double_tfMeanData mean
TKDE::EMirrorfMirror
Bool_tfMirrorLeft
Bool_tfMirrorRight
UInt_tfNBinsNumber of bins for binned data option
UInt_tfNEventsData's number of events
Bool_tfNewDataflag to control when new data are given
TF1*fPDFOutput Kernel Density Estimation PDF function
Double_tfRhoAdjustment factor for sigma
vector<Bool_t>fSettedOptionsUser input options flag
Double_tfSigmaData std deviation
Double_tfSigmaRobData std deviation (robust estimation)
TF1*fUpperPDFOutput Kernel Density Estimation upper confidence interval PDF function
Bool_tfUseBins
UInt_tfUseBinsNEventsIf the algorithm is allowed to use binning this is the minimum number of events to do so
Bool_tfUseMinMaxFromDataflag top control if min and max must be used from data
Bool_tfUseMirroring
Double_tfWeightSizeCaches the weight size
Double_tfXMaxData maximum value
Double_tfXMinData minimum value

Class Charts

Inheritance Inherited Members Includes Libraries
Class Charts

Function documentation

TKDE(UInt_t events = 0, const Double_t* data = 0, Double_t xMin = 0., Double_t xMax = 0., const Option_t* option = "KernelType:Gaussian;Iteration:Adaptive;Mirror:noMirror;Binning:RelaxedBinning", Double_t rho = 1.)
Class constructor
~TKDE()
Class destructor
void Instantiate(TKDE::KernelFunction_Ptr kernfunc, UInt_t events, const Double_t* data, Double_t xMin, Double_t xMax, const Option_t* option, Double_t rho)
 Template's constructor surrogate
void SetOptions(const Option_t* option, Double_t rho)
Sets User defined construction options
void SetDrawOptions(const Option_t* option, TString& plotOpt, TString& drawOpt)
 Sets User defined drawing options
void GetOptions(string optionType, string option)
 Gets User defined KDE construction options
void AssureOptions()
 Sets missing construction options to default ones
void CheckOptions(Bool_t isUserDefinedKernel = kFALSE)
 Sets User global options
void SetKernelType(TKDE::EKernelType kern)
 Sets User option for the choice of kernel estimator
void SetIteration(TKDE::EIteration iter)
 Sets User option for fixed or adaptive iteration
void SetMirror(TKDE::EMirror mir)
 Sets User option for mirroring the data
void SetBinning(TKDE::EBinning )
 Sets User option for binning the weights
void SetNBins(UInt_t nbins)
 Sets User option for number of bins
void SetUseBinsNEvents(UInt_t nEvents)
 Sets User option for the minimum number of events for allowing automatic binning
void SetTuneFactor(Double_t rho)
 Factor which can be used to tune the smoothing.
 It is used as multiplicative factor for the fixed and adaptive bandwidth.
 A value < 1 will reproduce better the tails but oversmooth the peak
 while a factor > 1 will overestimate the tail
void SetRange(Double_t xMin, Double_t xMax)
 Sets minimum range value and maximum range value
void SetUseBins()
 Sets User option for using binned weights
void SetMirror()
 Sets the mirroring
void SetData(const Double_t* data)
 Sets the data events input sample or bin centres for binned option and computes basic estimators
void InitFromNewData()
 re-initialize when new data have been filled in TKDE
 re-compute kernel quantities and mean and sigma
void SetMirroredEvents()
 Mirrors the data
void SetMean()
 Computes input data's mean
void SetSigma(Double_t R)
 Computes input data's sigma
void SetKernel()
 Sets the kernel density estimator
void SetKernelFunction(TKDE::KernelFunction_Ptr kernfunc = 0)
 Sets kernel estimator
void SetCanonicalBandwidths()
 Sets the canonical bandwidths according to the kernel type
void SetKernelSigmas2()
 Sets the kernel sigmas2 according to the kernel type
TF1* GetFunction(UInt_t npx = 100, Double_t xMin = 1., Double_t xMax = 0.)
 Returns the PDF estimate as a function sampled in npx between xMin and xMax
 the KDE is not re-normalized to the xMin/xMax range.
 The user manages the returned function
 For getting a non-sampled TF1, one can create a TF1 directly from the TKDE by doing
 TF1 * f1  = new TF1("f1",kde,xMin,xMax,0);
TF1* GetUpperFunction(Double_t confidenceLevel = 0.94999999999999996, UInt_t npx = 100, Double_t xMin = 1., Double_t xMax = 0.)
 Returns the PDF upper estimate (upper confidence interval limit)
TF1* GetLowerFunction(Double_t confidenceLevel = 0.94999999999999996, UInt_t npx = 100, Double_t xMin = 1., Double_t xMax = 0.)
 Returns the PDF lower estimate (lower confidence interval limit)
TF1* GetApproximateBias(UInt_t npx = 100, Double_t xMin = 1., Double_t xMax = 0.)
 Returns the PDF estimate bias
void Fill(Double_t data)
 Fills data member with User input data event for the unbinned option
Double_t operator()(const Double_t* x, const Double_t* p = 0) const
 The class's unary function: returns the kernel density estimate
Double_t operator()(Double_t x) const
 The class's unary function: returns the kernel density estimate
Double_t GetMean() const
 return the mean of the data
Double_t GetSigma() const
 return the standard deviation  of the data
Double_t GetRAMISE() const
 Returns the Root Asymptotic Mean Integrated Squared Error according to Silverman's rule of thumb with assumed Gaussian density
void SetBinCentreData(Double_t xmin, Double_t xmax)
 Returns the bins' centres from the data for using with the binned option
void SetBinCountData()
 Returns the bins' count from the data for using with the binned option
void Draw(const Option_t* option = "")
 Draws either the KDE functions or its errors
 Possible options:
                    ""  (default) - draw just the kde
                    "same" draw on top of existing pad
                    "Errors" draw a TGraphErrors with the point and errors
                    "confidenceinterval" draw KDE + conf interval functions (default is 95%)
                    "confidenceinterval@0.90" draw KDE + conf interval functions at 90%
                      Extra options can be passed in opt for drawing the TF1 or the TGraph

NOTE:  The functions GetDrawnFunction(), GetDrawnUpperFunction(), GetDrawnLowerFunction()
  and GetGraphWithErrors() return the corresponding drawn objects (which are maneged by the TKDE)
 They can be used to changes style, color, etc...
void DrawErrors(TString& drawOpt)
 Draws a TGraphErrors for the KDE errors
TGraphErrors* GetGraphWithErrors(UInt_t npx = 100, Double_t xMin = 1., Double_t xMax = 0.)
void DrawConfidenceInterval(TString& drawOpt, double cl = 0.94999999999999996)
 Draws the KDE and its confidence interval
Double_t GetFixedWeight() const
 Returns the bandwidth for the non adaptive KDE
const Double_t * GetAdaptiveWeights() const
 Returns the bandwidths for the adaptive KDE
UInt_t Index(Double_t x) const
 Returns the indices (bins) for the binned weights
Double_t UpperConfidenceInterval(const Double_t* x, const Double_t* p) const
 Returns the pointwise upper estimated density
Double_t LowerConfidenceInterval(const Double_t* x, const Double_t* p) const
 Returns the pointwise lower estimated density
Double_t GetBias(Double_t x) const
 Returns the pointwise approximate estimated density bias
Double_t GetError(Double_t x) const
 Returns the pointwise sigma of estimated density
void CheckKernelValidity()
 Checks if kernel has unit integral, mu = 0 and positive finite sigma conditions
Double_t ComputeKernelL2Norm() const
 Computes the kernel's L2 norm
Double_t ComputeKernelSigma2() const
 Computes the kernel's sigma squared
Double_t ComputeKernelMu() const
 Computes the kernel's mu
Double_t ComputeKernelIntegral() const
 Computes the kernel's integral which ought to be unity
Double_t ComputeMidspread()
 Computes the inter-quartile range from the data
void SetCanonicalBandwidth()
 Computes the user's input kernel function canonical bandwidth
void SetKernelSigma2()
 Computes the user's input kernel function sigma2
TF1* GetKDEFunction(UInt_t npx = 100, Double_t xMin = 1., Double_t xMax = 0.)
Returns the estimated density
TF1* GetPDFUpperConfidenceInterval(Double_t confidenceLevel = 0.94999999999999996, UInt_t npx = 100, Double_t xMin = 1., Double_t xMax = 0.)
 Returns the upper estimated density
TF1* GetPDFLowerConfidenceInterval(Double_t confidenceLevel = 0.94999999999999996, UInt_t npx = 100, Double_t xMin = 1., Double_t xMax = 0.)
 Returns the upper estimated density
TF1* GetKDEApproximateBias(UInt_t npx = 100, Double_t xMin = 1., Double_t xMax = 0.)
 Returns the approximate bias
explicit TKDE(UInt_t events = 0, const Double_t* data = 0, Double_t xMin = 0., Double_t xMax = 0., const Option_t* option = "KernelType:Gaussian;Iteration:Adaptive;Mirror:noMirror;Binning:RelaxedBinning", Double_t rho = 1.)
Double_t GetValue(Double_t x) const
{ return (*this)(x); }
TF1 * GetDrawnFunction()
 get the drawn object to chanage settings
 These objects are managed by TKDE and should not be deleted by the user
{ return fPDF;}
TF1 * GetDrawnUpperFunction()
{ return fUpperPDF;}
TF1 * GetDrawnLowerFunction()
{ return fLowerPDF;}
TGraphErrors * GetDrawnGraph()
{ return fGraph;}
TKDE operator=(TKDE& kde)
Double_t GaussianKernel(Double_t x) const
 Returns the kernel evaluation at x
Double_t EpanechnikovKernel(Double_t x) const
Double_t BiweightKernel(Double_t x) const
 Returns the kernel evaluation at x
Double_t CosineArchKernel(Double_t x) const
 Returns the kernel evaluation at x
Double_t ApproximateBias(const Double_t* x, const Double_t* ) const
{ return GetBias(*x); }
void SetHistogram()