orion.primitives.timeseries_errors.regression_errors

orion.primitives.timeseries_errors.regression_errors(y, y_hat, smoothing_window=0.01, smooth=True, masking_window=0.01, mask=False)[source]

Compute an array of absolute errors comparing predictions and expected output.

If smooth is True, apply EWMA to the resulting array of errors.

Parameters
  • y (ndarray) – Ground truth.

  • y_hat (ndarray) – Predicted values.

  • smoothing_window (float) – Optional. Size of the smoothing window, 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 with EWMA. If not given, True is used.

  • masking_window (float) – Optional. Size of the masking window, expressed as a proportion of the total length of y. If not given, 0.01 is used.

  • mask (bool) – Optional. Mask the start of anomaly scores. If not given, False is used.

Returns

Array of errors.

Return type

ndarray