pyhctsa.operations.model_fit.local_simple

pyhctsa.operations.model_fit.local_simple(y, forecast_meth='mean', train_length=3)

Simple local time-series forecasting.

Simple predictors using the past trainLength values of the time series to predict its next value.

Parameters:
y : array-like

The input time series

forecast_meth : str, optional

The forecasting method:

  • ’mean’: local mean prediction using the past trainLength time-series values

  • ’median’: local median prediction using the past trainLength time-series values

  • ’lfit’: local linear prediction using the past trainLength time-series values

Default is ‘mean’

train_length : int or str, optional

The number of time-series values to use to forecast the next value. If ‘ac’, uses first zero-crossing of autocorrelation function. Default is 1

Returns:

Dictionary containing output statistics on the residuals of the simple fortecasting method.

Return type:

dict