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

Constructor for the Kde1d class.

Parameters:
  • xmin (float, optional) – Lower bound for the support of the density. NaN means no boundary. Default is NaN.

  • xmax (float, optional) – Upper bound for the support of the density. NaN means no boundary. Default is NaN.

  • type (str, optional) – Variable type. Must be one of "continuous", "discrete", or "zero_inflated". Default is "continuous".

  • multiplier (float, optional) – Bandwidth multiplier. The actual bandwidth used is bandwidth * multiplier. Default is 1.0.

  • bandwidth (float, optional) – Bandwidth parameter. Must be a positive number or NaN for automatic selection using the plug-in methodology. Default is NaN.

  • degree (int, optional) – Degree of the local polynomial. Either 0, 1, or 2 for log-constant, log-linear, and log-quadratic fitting, respectively. Default is 2.

  • grid_size (int, optional) – Number of grid points for the interpolation grid. Must be at least 4. Default is 400.