linear_prediction

tenpy.tools.prediction.linear_prediction(x, *args, axis=0, **kwargs)[source]

Apply linear prediction to a multidimensional time series along an axis.

The results are the predictions appended to the original array.

Parameters:
  • x (ndarray) – (multi dim) time series data

  • axis (int) – default 0, axis along which to apply the prediction

  • *args – arguments to simple_linear_prediction()

  • **kwargs – keyword-arguments to simple_linear_prediction()

Returns:

Predictions along the given axis (default 0), concatenated with the original input

Return type:

np.ndarray