crowdkit.aggregation.classification.zero_based_skill.ZeroBasedSkill
| Source code
ZeroBasedSkill( self, n_iter: int = 100, lr_init: float = 1.0, lr_steps_to_reduce: int = 20, lr_reduce_factor: float = 0.5, eps: float = 1e-05)
The Zero-Based Skill (ZBS) aggregation model performs weighted majority voting on tasks. After processing a pool of tasks,
it re-estimates the workers' skills with a gradient descend step to optimize the mean squared error of the current skills and the fraction of responses that are equal to the aggregated labels.
This process is repeated until the labels change or exceed the number of iterations.
It is necessary that all workers in the dataset that is sent to predict
exist in responses to
the dataset that was sent to fit
.
Parameters | Type | Description |
---|---|---|
n_iter | int | The maximum number of iterations. |
lr_init | float | The initial learning rate. |
lr_steps_to_reduce | int | The number of steps required to reduce the learning rate. |
lr_reduce_factor | float | The factor by which the learning rate will be multiplied every |
eps | float | The convergence threshold. |
skills_ | Optional[Series] | The workers' skills. The |
labels_ | Optional[Series] | The task labels. The |
probas_ | Optional[DataFrame] | The probability distributions of task labels. The |
Examples:
from crowdkit.aggregation import ZeroBasedSkillfrom crowdkit.datasets import load_datasetdf, gt = load_dataset('relevance-2')result = ZeroBasedSkill().fit_predict(df)
Method | Description |
---|---|
fit | Fits the model to the training data. |
fit_predict | Fits the model to the training data and returns the aggregated results. |
fit_predict_proba | Fits the model to the training data and returns the aggregated results. |
predict | Predicts the true labels of tasks when the model is fitted. |
predict_proba | Returns probability distributions of labels for each task when the model is fitted. |
Last updated: March 31, 2023