def pairwise_majority_voting(y):
    N = y.shape[0]
    y_pred = np.zeros((N, N))
    for i in range(N):
        for j in range(N):
            if i == j:
                continue

            y_pred[i, j] = (y[j] > y[i]).sum() > y.shape[1]/2

    return y_pred.sum(1)/y_pred.sum(1).max()
dataset/ETHPy150Open MicrosoftResearch/Azimuth/azimuth/models/ensembles.py/pairwise_majority_voting/swapped operands of `>`