@@ -33,28 +33,28 @@ def scoring_log_likelihood(labels: LABELS_VALUE_TYPE, scores: SCORES_VALUE_TYPE,
3333 r"""
3434 Supports multiclass and multilabel cases.
3535
36- Multiclass case
36+ Multiclass case:
3737 Mean negative cross-entropy for each utterance classification result:
3838
3939 .. math::
4040
4141 \frac{1}{\ell}\sum_{i=1}^{\ell}\log(s[y[i]])
4242
43- where ``s[y[i]]`` is a predicted score of ``i``th utterance having ground truth label
43+ where ``s[y[i]]`` is the predicted score of the ``i``- th utterance having the ground truth label.
4444
45- Multilabel case
45+ Multilabel case:
4646 Mean negative binary cross-entropy:
4747
4848 .. math::
4949
5050 \frac{1}{\ell}\sum_{i=1}^\ell\sum_{c=1}^C\Big[y[i,c]\cdot\log(s[i,c])+(1-y[i,c])\cdot\log(1-s[i,c])\Big]
5151
52- where ``s[i,c]`` is a predicted score of ``i``' th utterance having ground truth label ``c``
52+ where ``s[i,c]`` is the predicted score of the ``i``- th utterance having the ground truth label ``c``.
5353
54- :param labels: ground truth labels for each utterance
55- :param scores: for each utterance, this list contains scores for each of `n_classes` classes
56- :param eps: small value to avoid division by zero
57- :return: Score of the scoring metric
54+ :param labels: Ground truth labels for each utterance.
55+ :param scores: For each utterance, a list containing scores for each of `n_classes` classes.
56+ :param eps: A small value to avoid division by zero.
57+ :return: Score of the scoring metric.
5858 """
5959 labels_array , scores_array = transform (labels , scores )
6060 scores_array [scores_array == 0 ] = eps
0 commit comments