Kde1d.__init__

Kde1d.__init__(self, xmin: float | None = None, xmax: float | None = None, type: str = 'continuous', multiplier: float = 1.0, bandwidth: float | None = None, degree: int = 2, grid_size: int = 400) None

Constructs a Kde1d instance.

Parameters:
xmin

Lower bound for the support of the density. NaN means no boundary.

xmax

Upper bound for the support of the density. NaN means no boundary.

type

Variable type. One of "continuous", "discrete", or "zero_inflated".

multiplier

Bandwidth multiplier. The actual bandwidth used is bandwidth * multiplier.

bandwidth

Bandwidth parameter. None / NaN selects the bandwidth automatically via the plug-in methodology.

degree

Degree of the local polynomial (0, 1, or 2 for log-constant, log-linear, or log-quadratic fitting).

grid_size

Number of grid points for the interpolation grid (must be >= 4).