orion.primitives.timeseries_errors.reconstruction_errors

orion.primitives.timeseries_errors.reconstruction_errors(y, y_hat, step_size=1, score_window=10, smoothing_window=0.01, smooth=True, rec_error_type='point')[source]

Compute an array of reconstruction errors.

Compute the discrepancies between the expected and the predicted values according to the reconstruction error type.

Parameters
  • y (ndarray) – Ground truth.

  • y_hat (ndarray) – Predicted values. Each timestamp has multiple predictions.

  • step_size (int) – Optional. Indicating the number of steps between windows in the predicted values. If not given, 1 is used.

  • score_window (int) – Optional. Size of the window over which the scores are calculated. If not given, 10 is used.

  • smoothing_window (float or int) – Optional. Size of the smoothing window, when float it is expressed as a proportion of the total length of y. If not given, 0.01 is used.

  • smooth (bool) – Optional. Indicates whether the returned errors should be smoothed. If not given, True is used.

  • rec_error_type (str) – Optional. Reconstruction error types ["point", "area", "dtw"]. If not given, “point” is used.

Returns

Array of reconstruction errors.

Return type

ndarray