8000 Fix in documentation doc/modules/clustering.rst (#9243) · CoderPat/scikit-learn@eac1bc0 · GitHub
[go: up one dir, main page]

Skip to content

Commit eac1bc0

Browse files
midinasjmschrei
authored andcommitted
Fix in documentation doc/modules/clustering.rst (scikit-learn#9243)
Added missing minus sign in entropy formulas that explain mutual information scoring.
1 parent 51016d1 commit eac1bc0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

doc/modules/clustering.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1119,12 +1119,12 @@ Mathematical formulation
11191119
Assume two label assignments (of the same N objects), :math:`U` and :math:`V`.
11201120
Their entropy is the amount of uncertainty for a partition set, defined by:
11211121

1122-
.. math:: H(U) = \sum_{i=1}^{|U|}P(i)\log(P(i))
1122+
.. math:: H(U) = - \sum_{i=1}^{|U|}P(i)\log(P(i))
11231123

11241124
where :math:`P(i) = |U_i| / N` is the probability that an object picked at
11251125
random from :math:`U` falls into class :math:`U_i`. Likewise for :math:`V`:
11261126

1127-
.. math:: H(V) = \sum_{j=1}^{|V|}P'(j)\log(P'(j))
1127+
.. math:: H(V) = - \sum_{j=1}^{|V|}P'(j)\log(P'(j))
11281128

11291129
With :math:`P'(j) = |V_j| / N`. The mutual information (MI) between :math:`U`
11301130
and :math:`V` is calculated by:

0 commit comments

Comments
 (0)
0