holoviews.operation.stats module#
- class holoviews.operation.stats.bivariate_kde(*, bandwidth, bw_method, contours, cut, filled, levels, n_samples, x_range, y_range, dynamic, group, input_ranges, link_inputs, streams, name)[source]#
Bases:
Operation
Computes a 2D kernel density estimate (KDE) of the first two dimensions in the input data. Kernel density estimation is a non-parametric way to estimate the probability density function of a random variable.
The KDE works by placing 2D Gaussian kernel at each sample with the supplied bandwidth. These kernels are then summed to produce the density estimate. By default a good bandwidth is determined using the bw_method but it may be overridden by an explicit value.
Parameter Definitions
Parameters inherited from:
holoviews.core.operation.Operation
: group, dynamic, input_ranges, link_inputs, streamscontours = Boolean(default=True, label='Contours')
Whether to compute contours from the KDE, determines whether to return an Image or Contours/Polygons.
bw_method = Selector(default='scott', label='Bw method', names={}, objects=['scott', 'silverman'])
Method of automatically determining KDE bandwidth
bandwidth = Number(allow_None=True, inclusive_bounds=(True, True), label='Bandwidth')
Allows supplying explicit bandwidth value rather than relying on scott or silverman method.
cut = Number(default=3, inclusive_bounds=(True, True), label='Cut')
Draw the estimate to cut * bw from the extreme data points.
filled = Boolean(default=False, label='Filled')
Controls whether to return filled or unfilled contours.
levels = ClassSelector(class_=(<class 'list'>, <class 'int'>), default=10, label='Levels')
A list of scalar values used to specify the contour levels.
n_samples = Integer(default=100, inclusive_bounds=(True, True), label='N samples')
Number of samples to compute the KDE over.
x_range = NumericTuple(allow_None=True, label='X range', length=2)
The x_range as a tuple of min and max x-value. Auto-ranges if set to None.
y_range = NumericTuple(allow_None=True, label='Y range', length=2)
The x_range as a tuple of min and max y-value. Auto-ranges if set to None.
- class holoviews.operation.stats.univariate_kde(*, bandwidth, bin_range, bw_method, cut, dimension, filled, groupby, n_samples, dynamic, group, input_ranges, link_inputs, streams, name)[source]#
Bases:
Operation
Computes a 1D kernel density estimate (KDE) along the supplied dimension. Kernel density estimation is a non-parametric way to estimate the probability density function of a random variable.
The KDE works by placing a Gaussian kernel at each sample with the supplied bandwidth. These kernels are then summed to produce the density estimate. By default a good bandwidth is determined using the bw_method but it may be overridden by an explicit value.
Parameter Definitions
Parameters inherited from:
holoviews.core.operation.Operation
: group, dynamic, input_ranges, link_inputs, streamsbw_method = Selector(default='scott', label='Bw method', names={}, objects=['scott', 'silverman'])
Method of automatically determining KDE bandwidth
bandwidth = Number(allow_None=True, inclusive_bounds=(True, True), label='Bandwidth')
Allows supplying explicit bandwidth value rather than relying on scott or silverman method.
cut = Number(default=3, inclusive_bounds=(True, True), label='Cut')
Draw the estimate to cut * bw from the extreme data points.
bin_range = NumericTuple(allow_None=True, label='Bin range', length=2)
Specifies the range within which to compute the KDE.
dimension = String(allow_None=True, label='Dimension')
Along which dimension of the Element to compute the KDE.
filled = Boolean(default=True, label='Filled')
Controls whether to return filled or unfilled KDE.
n_samples = Integer(default=100, inclusive_bounds=(True, True), label='N samples')
Number of samples to compute the KDE over.
groupby = ClassSelector(allow_None=True, class_=(<class 'str'>, <class 'holoviews.core.dimension.Dimension'>), label='Groupby')
Defines a dimension to group the Histogram returning an NdOverlay of Histograms.