incline.smoothing_spline_trend¶
- incline.smoothing_spline_trend(df, value_column='value', time_column=None, penalty=None, **kwargs)[source]¶
Estimate the trend with a cubic smoothing spline.
With
penaltyfixed this is a linear smoother and standard errors are exact. Leavingpenaltyas None selects it by generalized cross-validation under independent noise or covariance-aware generalized maximum likelihood under a non-constant covariance. Adaptive fits route uncertainty to the bootstrap.- Parameters:
df (pd.DataFrame) – Time series data.
value_column (str) – Column holding the values.
time_column (str | None) – Numeric time column.
penalty (float | None) – Fixed roughness penalty for the independent-error spline. This is not the covariance-dependent
generalized_penaltyreported by an adaptive GML fit.**kwargs (Any) – Uncertainty options; see
estimate().
- Returns:
The input frame plus the estimate columns.
- Return type:
pd.DataFrame