Author: | Pierre Barbier de Reuille <pierre.barbierdereuille@gmail.com> |
---|
This module contains a set of methods to compute univariate KDEs. See the objects in the pyqt_fit.kde module for more details on these methods.
The exact definition of such a method is found in pyqt_fit.kde.KDE1D.method
Helper method returning a regular grid on the domain of the KDE.
Parameters: |
|
---|---|
Returns: | A vector of N regularly spaced points |
Base class providing a default grid method and a default method for unbounded evaluation.
Method to use if there is, effectively, no bounds
Evaluate the method on a grid spanning the whole domain of the KDE and containing N points.
Parameters: |
|
---|---|
Returns: | A tuple with the grid points and the estimated values on these points |
Here are the methods implemented in pyqt_fit. To access these methods, the simplest is to use the instances provided:
Instance of the RenormalizationMethod class.
Instance of the ReflectionMethod class.
Instance of the LinearCombinationMethod class.
Instance of the CyclicMethod class.
This method consists in using the normal kernel method, but renormalize to only take into account the part of the kernel within the domain of the density [1]_.
The kernel is then replaced with:
[1] | Jones, M. C. 1993. Simple boundary correction for kernel density estimation. Statistics and Computing 3: 135–146. |
This method consist in simulating the reflection of the data left and right of the boundaries. If one of the boundary is infinite, then the data is not reflected in that direction. To this purpose, the kernel is replaced with:
When computing grids, if the bandwidth is constant, the result is computing using CDT.
This method uses the linear combination correction published in [1]_.
The estimation is done with a modified kernel given by:
[1] | Jones, M. C. 1993. Simple boundary correction for kernel density estimation. Statistics and Computing 3: 135–146. |
This method assumes cyclic boundary conditions and works only for closed boundaries.
The estimation is done with a modified kernel given by:
When computing grids, if the bandwidth is constant, the result is computing using FFT.