crowdkit.aggregation.classification.dawid_skene.DawidSkene
| Source code
DawidSkene( self, n_iter: int = 100, tol: float = 1e-05)
Dawid-Skene aggregation model.
Probabilistic model that parametrizes workers' level of expertise through confusion matrices.
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 . The relationships between these parameters are represented by the following latent label model.Here the prior true label probability is
,and the distribution on the worker's responses given the true label is represented by the corresponding column of the error matrix:
Parameters and and latent variables are optimized through the Expectation-Maximization algorithm.
A. Philip Dawid and Allan M. Skene. Maximum Likelihood Estimation of Observer Error-Rates Using the EM Algorithm. Journal of the Royal Statistical Society. Series C (Applied Statistics), Vol. 28, 1 (1979), 20–28.
https://doi.org/10.2307/2346806
Parameters | Type | Description |
---|---|---|
n_iter | int | The number of EM iterations. |
labels_ | Optional[Series] | Tasks' labels. A pandas.Series indexed by |
probas_ | Optional[DataFrame] | Tasks' label probability distributions. A pandas.DataFrame indexed by |
priors_ | Optional[Series] | 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 |
errors_ | Optional[DataFrame] | Workers' error matrices. A pandas.DataFrame indexed by |
Examples:
from crowdkit.aggregation import DawidSkenefrom crowdkit.datasets import load_datasetdf, gt = load_dataset('relevance-2')ds = DawidSkene(100)result = ds.fit_predict(df)
Method | Description |
---|---|
fit | Fit the model through the EM-algorithm. |
fit_predict | Fit the model and return aggregated results. |
fit_predict_proba | Fit the model and return probability distributions on labels for each task. |