(forecast: Forecast, target: Target)
return 200 * np.abs(forecast - target) / denom
sMAPE loss as defined in https://robjhyndman.com/hyndsight/smape/ (Makridakis 1993)

    :param forecast: Forecast values. Shape: batch, time
    :param target: Target values. Shape: batch, time
    :return: Same shape array with sMAPE calculated for each time step of each timeseries.
sMAPE loss as defined in https://robjhyndman.com/hyndsight/smape/ (Makridakis 1993)
sMAPE loss as defined in https : // robjhyndman . com / hyndsight / smape / ( Makridakis 1993 )
def smape_2(forecast: Forecast, target: Target) -> np.ndarray:
    """
    sMAPE loss as defined in https://robjhyndman.com/hyndsight/smape/ (Makridakis 1993)

    :param forecast: Forecast values. Shape: batch, time
    :param target: Target values. Shape: batch, time
    :return: Same shape array with sMAPE calculated for each time step of each timeseries.
    """
    denom = np.abs(target) + np.abs(forecast)
    # divide by 1.0 instead of 0.0, in case when denom is zero the enumerator will be 0.0 anyway.
    denom[denom == 0.0] = 1.0
    return 200 * np.abs(forecast - target) / denom
def smape_2 ( forecast : Forecast , target : Target ) -> np . ndarray : denom = np . abs ( target ) + np . abs ( forecast ) # divide by 1.0 instead of 0.0, in case when denom is zero the enumerator will be 0.0 anyway. denom [ denom == 0.0 ] = 1.0 return 200 * np . abs ( forecast - target ) / denom