MV

class MV(answers, n_classes=2, sparse=False, **kwargs)

Majority voting

Most answered label per task

__init__(answers, n_classes=2, sparse=False, **kwargs)

Majority voting strategy: most answered label

\[\mathrm{MV}(i, \mathcal{D}) = \underset{k\in[K]}{\mathrm{argmax}} \sum_{j\in\mathcal{A}(x_i)}\mathbf{1}(y_i^{(j)} = k)\]
Parameters:
  • answers (dict) –

    Dictionary of workers answers with format

    {
        task0: {worker0: label, worker1: label},
        task1: {worker1: label}
    }
    

  • sparse (bool, optional) – If the number of workers/tasks/label is large (\(>10^{6}\) for at least one), use sparse=True to run per task

  • n_classes (int, optional) – Number of possible classes, defaults to 2

compute_baseline()

Compute label frequency per task

get_answers()

Get labels obtained with majority voting aggregation

Returns:

Most answered labels per task

Return type:

numpy.ndarray

get_probas()

Get labels obtained with majority voting aggregation

Returns:

Most answered labels per task

Return type:

numpy.ndarray