fit#
- SuperLSS.fit(
- X: object | EagerFrame,
- y: NDArray,
- sample_weight: NDArray | None = None,
- offsets: Mapping[str, NDArray] | None = None,
- *,
- lambdas: Mapping[str, float] | None = None,
- max_inner_iter: int = 100,
- inner_tol: float = 1e-07,
- retain_rows: bool = True,
Fit coefficients while holding smoothing parameters fixed.
- Parameters:
- XDataFrame or EagerFrame
Input columns named in the predictor declarations.
- yarray-like of shape (n_observations,)
Response values in the family’s support, in the same row order as
X.- sample_weightarray-like, optional
One weight per row, interpreted using
weight_semantics.- offsetsmapping of str to array-like, optional
Known additions to predictors on their link scales. Keys are family parameter names, such as
"mean"for Tweedie.- lambdasmapping of str to float, optional
Smoothing strengths keyed by fully qualified penalty names, such as
"location:age#wiggle"for a Gaussian smooth.- max_inner_iterint, default=100
Maximum number of coefficient iterations.
- inner_tolfloat, default=1e-7
Coefficient convergence tolerance.
- retain_rowsbool, default=True
Retain fitted row arrays for training diagnostics.
- Returns:
- SuperLSS
This model, with its fitted state replaced by the new fit.
See also
fit_remlEstimate smoothing parameters as part of the fit.