(forecast: Forecast, target: Target)
return np.mean(np.abs(target - forecast)) / np.mean(np.abs(target))
Normalized deviation as defined in https://www.cs.utexas.edu/~rofuyu/papers/tr-mf-nips.pdf

    :param forecast: Forecast values. Shape: batch, time
    :param target: Target values. Shape: batch, time
    :return: Error value
Normalized deviation as defined in https://www.cs.utexas.edu/~rofuyu/papers/tr-mf-nips.pdf
Normalized deviation as defined in https : // www . cs . utexas . edu / ~rofuyu / papers / tr - mf - nips . pdf
def nd(forecast: Forecast, target: Target) -> float:
    """
    Normalized deviation as defined in https://www.cs.utexas.edu/~rofuyu/papers/tr-mf-nips.pdf

    :param forecast: Forecast values. Shape: batch, time
    :param target: Target values. Shape: batch, time
    :return: Error value
    """
    return np.mean(np.abs(target - forecast)) / np.mean(np.abs(target))
def nd ( forecast : Forecast , target : Target ) -> float : return np . mean ( np . abs ( target - forecast ) ) / np . mean ( np . abs ( target ) )