Kernel Density Estimator

General KDE object

class sinflow.kde.KernelDensityEstimator(data, bandwidth=None)

Kernel Density Estimator for 1D data using Gaussian kernels.

Attributes:

data(np.ndarray)

1D array of data points.

bandwidthfloat

Bandwidth of the Gaussian kernels.

cdf(x)

Evaluates the KDE CDF at the given points.

Parameters:

xfloat or array-like

Points at which to evaluate the CDF.

Returns:

float or np.ndarray

CDF values at the specified points.

derivative_pdf(x)

Evaluates the derivative of the KDE PDF at the given points.

Parameters:

xfloat or array-like

Points at which to evaluate the derivative of the PDF.

Returns:

float or np.ndarray

Derivative of the PDF at the specified points.

pdf(x)

Evaluates the KDE PDF at the given points.

Parameters:

xfloat or array-like

Points at which to evaluate the PDF.

Returns:

float or np.ndarray

PDF values at the specified points.