def forecast_error(y, y_predicted):
    """Calculate the forecast error in a regression model.

    Parameters
    ----------
    y : array-like of shape = number_of_outputs
        Represent the target values.
    y_predicted : array-like of shape = number_of_outputs
        Target values predicted by the model.

    Returns
    -------
    loss : ndarray of floats
        The difference between the true target values and the predicted
        or forecast value in regression or any other phenomenon.

    References
    ----------
    [1] `Wikipedia entry on the Forecast error
        <https://en.wikipedia.org/wiki/Forecast_error>`_

    Examples
    --------
    >>> y = [3, -0.5, 2, 7]
    >>> y_predicted = [2.5, 0.0, 2, 8]
    >>> forecast_error(y, y_predicted)
    [0.5, -0.5, 0, -1]

    """
    return y - y_predicted