regression errorsΒΆ

path orion.primitives.timeseries_errors.regression_errors

description this primitive computes an array of absolute errors comparing predictions and expected output. Optionally smooth them using EWMA.

see json.

argument

type

description

parameters

y

numpy.ndarray

ground truth

y_hat

numpy.ndarray

predicted values

hyperparameters

smooth

bool

indicates whether the returned errors should be smoothed with EWMA

smoothing_window

float

size of the smoothing window, expressed as a proportion of the total

mask

bool

indicates whether the returned errors should be masked with the minimum error value

masking_window

float

size of the masking window, expressed as a proportion of the total

output

errors

numpy.ndarray

array of errors

In [1]: import numpy as np

In [2]: from mlstars import load_primitive

In [3]: primitive = load_primitive('orion.primitives.timeseries_errors.regression_errors')

In [4]: y = np.array([[1]] * 100)

In [5]: y_hat = np.array([[.99]] * 100)

In [6]: errors = primitive.produce(y=y, y_hat=y_hat)

In [7]: print("average error value: {:.2f}".format(errors.mean()))
average error value: 0.01