incline.local_polynomial_trend¶
- incline.local_polynomial_trend(df, column_value='value', time_column=None, bandwidth=0.2, degree=2, kernel='gaussian', **kwargs)[source]¶
Estimate the trend by local polynomial regression.
Linear given the bandwidth, so standard errors are exact and come from the same weighted least squares solve that produces the estimate.
- Parameters:
df (pd.DataFrame) – Time series data.
column_value (str) – Column holding the values.
time_column (str | None) – Numeric time column.
bandwidth (float) – Kernel width as a fraction of the series span.
degree (int) – Degree of the local polynomial.
kernel (str) –
'gaussian','epanechnikov'or'uniform'.**kwargs (Any) – Uncertainty options; see
estimate().
- Returns:
The input frame plus the estimate columns.
- Return type:
pd.DataFrame