(labels, weight=None)
return most_votes[0][1], most_votes[0][0]
Perform majority vote to determine the true label from
    multiple noisy oracles.

    Parameters
    ----------
    labels: list
        A list with length=k, which contains the labels provided by
        k noisy oracles.

    weight: list, optional (default=None)
        The weights of each oracle. It should have the same length with
        labels.

    Returns
    -------
    vote_count: int
        The number of votes.

    vote_result: object
        The label of the selected_instance, produced by majority voting
        of the selected oracles.
Perform majority vote to determine the true label from
    multiple noisy oracles.
Perform majority vote to determine the true label from multiple noisy oracles .
def majority_vote(labels, weight=None):
    """Perform majority vote to determine the true label from
    multiple noisy oracles.

    Parameters
    ----------
    labels: list
        A list with length=k, which contains the labels provided by
        k noisy oracles.

    weight: list, optional (default=None)
        The weights of each oracle. It should have the same length with
        labels.

    Returns
    -------
    vote_count: int
        The number of votes.

    vote_result: object
        The label of the selected_instance, produced by majority voting
        of the selected oracles.
    """
    oracle_weight = np.ones(len(labels)) if weight is None else weight
    assert len(labels) == len(oracle_weight)

    vote_result = collections.Counter(labels)
    most_votes = vote_result.most_common(n=1)
    return most_votes[0][1], most_votes[0][0]
def majority_vote ( labels , weight = None ) : oracle_weight = np . ones ( len ( labels ) ) if weight is None else weight assert len ( labels ) == len ( oracle_weight ) vote_result = collections . Counter ( labels ) most_votes = vote_result . most_common ( n = 1 ) return most_votes [ 0 ] [ 1 ] , most_votes [ 0 ] [ 0 ]