def squared_error(y, t, scale=0.5):
    """Return the scaled squared error. Note that the error is not averaged,
    i.e. it does not compute the mean squared error.

    Args:
        y (list): Actual outputs. 1 dimensional.
        t (list): Target outputs. Same dimensions as `y`.

    Returns:
        list: Scaled squared error of the two given lists.
    """
    assert len(y) == len(t)

    return scale * sum((y_i - t_i) ** 2 for y_i, t_i in zip(y, t))