def CRPS(label, pred):
    """ Custom evaluation metric on CRPS.
    """
    for i in range(pred.shape[0]):
        for j in range(pred.shape[1] - 1):
            if pred[i, j] > pred[i, j + 1]:
                pred[i, j + 1] = pred[i, j]
    return np.sum(np.square(label - pred)) / label.size
def CRPS ( label , pred ) : for i in range ( pred . shape [ 0 ] ) : for j in range ( pred . shape [ 1 ] - 1 ) : if pred [ i , j ] > pred [ i , j + 1 ] : pred [ i , j + 1 ] = pred [ i , j ] return np . sum ( np . square ( label - pred ) ) / label . size
Custom evaluation metric on CRPS.