- class RIFT.misc.bounded_kde.BoundedKDE(pts, low=-inf, high=inf, periodic=False, bw_method=None)
Bases:
gaussian_kdeDensity estimation using a KDE on bounded domains. Bounds can be any combination of low or high (if no bound, set to
float('inf')orfloat('-inf')), and can be periodic or non-periodic. Cannot handle topologies that have multi-dimensional periodicities; will only handle topologies that are direct products of (arbitrary numbers of) R, [0,1], and S1. :param pts:(Ndim, Npts)shaped array of points (as ingaussian_kde).- Parameters:
low – Lower bounds; if
None, assume no lower bounds.high – Upper bounds; if
None, assume no upper bounds.periodic – Boolean array giving periodicity in each dimension; if
Noneassume no dimension is periodic.bw_method – (optional) Bandwidth estimation method (see
gaussian_kde).
- evaluate(pts)
Evaluate the KDE at the given points.
- quantile(pt)
Quantile of
pt, evaluated by a greedy algorithm. :param pt:The point at which the quantile value is to be computed.
The quantile of
ptis the fraction of points used to construct the KDE that have a lower KDE density thanpt.
- class RIFT.misc.bounded_kde.BoundedKDE_2d(pts, xlow=None, xhigh=None, ylow=None, yhigh=None, *args, **kwargs)
Bases:
gaussian_kdeRepresents a two-dimensional Gaussian kernel density estimator for a probability distribution function that exists on a bounded domain.
- evaluate(pts)
Return an estimate of the density evaluated at the given points.
- property xhigh
The upper bound of the x domain.
- property xlow
The lower bound of the x domain.
- property yhigh
The upper bound of the y domain.
- property ylow
The lower bound of the y domain.