Skip to content

Commit

Permalink
Miscellaneous doc fixes (#125)
Browse files Browse the repository at this point in the history
* fix: mace aggregator docs mathematical symbols

* fix: consistency metric docstring
  • Loading branch information
taharallouche authored Oct 29, 2024
1 parent 227fd78 commit 8ff3640
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions crowdkit/aggregation/classification/mace.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ class MACE(BaseClassificationAggregator):
The marginal data likelihood is maximized with the Expectation-Maximization algorithm:
1. **E-step**. Performs `n_restarts` random restarts, and keeps the model with the best marginal data likelihood.
2. **M-step**. Smooths parameters by adding a fixed value `smoothing` to the fractional counts before normalizing.
3. **Variational M-step**. Employs Variational-Bayes (VB) training with symmetric Beta priors on $\theta_j$ and symmetric Dirichlet priors on the strategy parameters $\xi_j.
3. **Variational M-step**. Employs Variational-Bayes (VB) training with symmetric Beta priors on $\theta_j$ and symmetric Dirichlet priors on the strategy parameters $\xi_j$.
D. Hovy, T. Berg-Kirkpatrick, A. Vaswani and E. Hovy. Learning Whom to Trust with MACE.
In *Proceedings of NAACL-HLT*, Atlanta, GA, USA (2013), 1120–1130.
Expand Down Expand Up @@ -122,10 +122,10 @@ class MACE(BaseClassificationAggregator):
"""The default noise parameter for the initialization."""

alpha: float = attr.ib(default=0.5)
"""The prior parameter for the Beta distribution on $\theta_j$."""
r"""The prior parameter for the Beta distribution on $\theta_j$."""

beta: float = attr.ib(default=0.5)
"""The prior parameter for the Beta distribution on $\theta_j$."""
r"""The prior parameter for the Beta distribution on $\theta_j$."""

random_state: int = attr.ib(default=0)
"""The state of the random number generator."""
Expand Down
2 changes: 1 addition & 1 deletion crowdkit/metrics/data/_classification.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ def consistency(
) -> Union[float, "pd.Series[Any]"]:
"""
Consistency metric: posterior probability of aggregated label given workers skills
calculated using the standard Dawid-Skene model.
calculated using the specified aggregator.
Args:
answers (pandas.DataFrame): A data frame containing `task`, `worker` and `label` columns.
Expand Down

0 comments on commit 8ff3640

Please sign in to comment.