gtime.metrics.max_error

gtime.metrics.max_error(y_true: Union[pandas.core.frame.DataFrame, List, numpy.ndarray], y_pred: Union[pandas.core.frame.DataFrame, List, numpy.ndarray]) → float

Compute the maximum error between two vectors.

Parameters:
y_true : array-like, shape (length, 1), required

The first vector.

y_pred : array-like, shape (length, 1), required

The second vector.

Returns:
error : float

The maximum error between the two vectors.

Examples

>>> from gtime.metrics import max_error
>>> y_true = [0, 1, 2, 3, 4, 5]
>>> y_pred = [1.1, 2.3, 0.4, 3.9, 3.1, 4.6]
>>> max_error(y_true, y_pred)
1.6