incline.estimate_trend

incline.estimate_trend(df, column_value='value', time_column=None, method='auto', derivative_order=1, se=False, **kwargs)[source]

Estimate a trend, choosing the method automatically if asked.

Dispatches through the smoother registry rather than a hand-maintained branch per method, so a newly registered smoother is reachable here without editing this function.

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

  • column_value (str) – Column holding the values.

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

  • method (str) – A registered smoother name, or 'auto'.

  • derivative_order (int) – Which derivative to estimate.

  • se (bool) – Whether to compute standard errors.

  • **kwargs (Any) – Split between the smoother’s constructor and the uncertainty options of estimate().

Returns:

The input frame plus the estimate columns.

Raises:
  • ValueError – If method names no registered smoother.

  • TypeError – If a keyword matches neither the smoother’s constructor nor the uncertainty options.

Return type:

pd.DataFrame