crowdkit.aggregation.classification.dawid_skene.OneCoinDawidSkene | Source code
OneCoinDawidSkene(self,n_iter: int = 100,tol: float = 1e-05)
The one-coin Dawid-Skene aggregation model works exactly the same as the original Dawid-Skene model based on the EM algorithm, except for calculating the workers' errors at the M-step of the algorithm.
For the one-coin model, a worker confusion (error) matrix is parameterized by a single parameter :
where is a worker confusion (error) matrix of size in case of the class classification, be a true task label, is a worker response to the task , and is a worker skill (accuracy).
In other words, the worker uses a single coin flip to decide their assignment. No matter what the true label is, the worker has the probability to assign the correct label, and has the probability to randomly assign an incorrect label. For the one-coin model, it suffices to estimate for every worker and estimate for every task . Because of its simplicity, the one-coin model is easier to estimate and enjoys better convergence properties.
Parameters , , and latent variables are optimized with the Expectation-Maximization algorithm:
Y. Zhang, X. Chen, D. Zhou, and M. I. Jordan. Spectral methods meet EM: A provably optimal algorithm for crowdsourcing.
Journal of Machine Learning Research. Vol. 17, (2016), 1-44.
The maximum number of EM iterations.
The tolerance stopping criterion for iterative methods with a variable number of steps. The algorithm converges when the loss change is less than the
The task labels. The
The probability distributions of task labels. The
The prior label distribution. The
The workers' error matrices. The
The workers' skills. The
A list of loss values during training.
from crowdkit.aggregation import OneCoinDawidSkenefrom crowdkit.datasets import load_datasetdf, gt = load_dataset('relevance-2')hds = OneCoinDawidSkene(100)result = hds.fit_predict(df)
|fit||Fits the model to the training data with the EM algorithm.|
Last updated: March 31, 2023