incline.l1_trend_filter¶
- incline.l1_trend_filter(df, column_value='value', time_column=None, lambda_param=1.0, difference_order=2, **kwargs)[source]¶
Estimate a piecewise-polynomial trend with sparse changes in slope.
- Parameters:
df (pd.DataFrame) – Time series data.
column_value (str) – Column holding the values.
time_column (str | None) – Numeric time column.
lambda_param (float) – Penalty on the differences; larger means fewer kinks.
difference_order (int) – Order of the penalized difference. Two gives a piecewise-linear trend.
**kwargs (Any) – Uncertainty options; see
estimate().
- Returns:
The input frame plus the estimate columns.
- Return type:
pd.DataFrame