crowdkit.aggregation.classification.dawid_skene.OneCoinDawidSkene | Source code
OneCoinDawidSkene(self,n_iter: int = 100,tol: float = 1e-05)
One-coin Dawid-Skene aggregation model.
This model works exactly like original Dawid-Skene model based on EM Algorithm except for workers' error calculation on M-step of the algorithm.
First the workers' skills are calculated as their accuracy in accordance with labels probability.
Let be a worker's confusion (error) matrix of size in case of class classification,be a vector of prior classes probabilities, be a true task's label, and be a worker's answer for the task . Let be a worker's skill (accuracy).
Then the error
The number of EM iterations.
Tasks' labels. A pandas.Series indexed by
Tasks' label probability distributions. A pandas.DataFrame indexed by
A prior label distribution. A pandas.Series indexed by labels and holding corresponding label's probability of occurrence. Each probability is between 0 and 1, all probabilities should sum up to 1
Workers' error matrices. A pandas.DataFrame indexed by
workers' skills. A pandas.Series index by workers and holding corresponding worker's skill
from crowdkit.aggregation import OneCoinDawidSkenefrom crowdkit.datasets import load_datasetdf, gt = load_dataset('relevance-2')hds = OneCoinDawidSkene(100)result = hds.fit_predict(df)
|fit||Fit the model through the EM-algorithm.|