incline.spline_trend

incline.spline_trend(df, column_value='value', time_column=None, function_order=3, s=None, **kwargs)[source]

Estimate the trend with a knot-selecting smoothing spline.

UnivariateSpline places knots to meet a residual budget, so the fit depends on the data and no exact operator exists; standard errors come from the bootstrap. Use pspline_trend() for the exact route.

Parameters:
  • df (pd.DataFrame) – Time series data.

  • column_value (str) – Column holding the values.

  • time_column (str | None) – Numeric time column.

  • function_order (int) – Spline degree.

  • s (float | None) – Residual budget. Derived from the noise level when None.

  • **kwargs (Any) – Uncertainty options; see estimate().

Returns:

The input frame plus the estimate columns.

Return type:

pd.DataFrame