Description:
        Calculates the Mean Squared Error (MSE) of an
        estimator of a mixture of 2 Plackett-Luce models,
        on flat numpy ndarrays, where the first element is
        the mixing proportion of the first model defined
        as the minimum MSE over the inverse permutations of
        the estimator.
    Parameters:
        mean:      actual value (numpy ndarray)
        estimator: estimated value of the mean (numpy ndarray)
        m:         number of alternatives in each of the two models

def mix2PL_mse(mean, estimator, m):
    """
    Description:
        Calculates the Mean Squared Error (MSE) of an
        estimator of a mixture of 2 Plackett-Luce models,
        on flat numpy ndarrays, where the first element is
        the mixing proportion of the first model defined
        as the minimum MSE over the inverse permutations of
        the estimator.
    Parameters:
        mean:      actual value (numpy ndarray)
        estimator: estimated value of the mean (numpy ndarray)
        m:         number of alternatives in each of the two models
    """
    mse1 = mse(mean, estimator)
    estimator = np.hstack((1 - estimator[0], estimator[m+1:], estimator[1:m+1]))
    mse2 = mse(mean, estimator)
    return min(mse1, mse2)