incline.kalman_trend¶
- incline.kalman_trend(df, column_value='value', time_column=None, seasonal_periods=None, **kwargs)[source]¶
Estimate the trend with a local linear trend state-space model.
The slope is a state, so its standard error is a diagonal entry of the smoother covariance.
- Parameters:
df (pd.DataFrame) – Time series data.
column_value (str) – Column holding the values.
time_column (str | None) – Numeric time column.
seasonal_periods (int | None) – Length of a seasonal cycle, if any.
**kwargs (Any) – Uncertainty options; see
estimate().
- Returns:
The input frame plus the estimate columns.
- Return type:
pd.DataFrame