def smse(y_true, y_pred):
    """
    Standardised mean squared error.

    Parameters
    ----------
    y_true: ndarray
        vector of true targets
    y_pred: ndarray
        vector of predicted targets

    Returns
    -------
    float:
        SMSE of predictions vs truth (scalar)

    Example
    -------
    >>> y_true = np.random.randn(100)
    >>> smse(y_true, y_true)
    0.0
    >>> smse(y_true, np.random.randn(100)) >= 1.0
    True
    """
    N = y_true.shape[0]
    return ((y_true - y_pred) ** 2).sum() / (N * y_true.var())
