Kde1d.from_params
- Kde1d.from_params(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) pyvinecopulib.Kde1d
Create a Kde1d object from parameters.
This is a factory method that creates a Kde1d object with specified parameters. The object needs to be fitted to data using the
fit()
method.- Parameters:
xmin (float, optional) – Lower bound for the support of the density. Default is
NaN
.xmax (float, optional) – Upper bound for the support of the density. Default is
NaN
.type (str, optional) – Variable type (
"continuous"
,"discrete"
, or"zero_inflated"
). Default is"continuous"
.multiplier (float, optional) – Bandwidth multiplier. Default is 1.0.
bandwidth (float, optional) – Bandwidth parameter (
NaN
for automatic selection). Default isNaN
.degree (int, optional) – Degree of the local polynomial (0, 1, or 2). Default is 2.
grid_size (int, optional) – Number of grid points for the interpolation grid. Must be at least 4. Default is 400.
- Returns:
Kde1d – A Kde1d object ready for fitting.