Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 9e7da70

Browse filesBrowse files
authored
DOC Revise a math equation to incorporate text (scikit-learn#31421)
1 parent c219a6b commit 9e7da70
Copy full SHA for 9e7da70

File tree

Expand file treeCollapse file tree

1 file changed

+3
-3
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+3
-3
lines changed

‎doc/modules/model_evaluation.rst

Copy file name to clipboardExpand all lines: doc/modules/model_evaluation.rst
+3-3Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1880,7 +1880,7 @@ In multilabel classification, the :func:`zero_one_loss` scores a subset as
18801880
one if its labels strictly match the predictions, and as a zero if there
18811881
are any errors. By default, the function returns the percentage of imperfectly
18821882
predicted subsets. To get the count of such subsets instead, set
1883-
``normalize`` to ``False``
1883+
``normalize`` to ``False``.
18841884

18851885
If :math:`\hat{y}_i` is the predicted value of
18861886
the :math:`i`-th sample and :math:`y_i` is the corresponding true value,
@@ -1891,8 +1891,8 @@ then the 0-1 loss :math:`L_{0-1}` is defined as:
18911891
L_{0-1}(y, \hat{y}) = \frac{1}{n_\text{samples}} \sum_{i=0}^{n_\text{samples}-1} 1(\hat{y}_i \not= y_i)
18921892
18931893
where :math:`1(x)` is the `indicator function
1894-
<https://en.wikipedia.org/wiki/Indicator_function>`_. The zero one
1895-
loss can also be computed as :math:`zero-one loss = 1 - accuracy`.
1894+
<https://en.wikipedia.org/wiki/Indicator_function>`_. The zero-one
1895+
loss can also be computed as :math:`\text{zero-one loss} = 1 - \text{accuracy}`.
18961896

18971897

18981898
>>> from sklearn.metrics import zero_one_loss

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.