Skip to content

Commit

Permalink
DOC Clarified variation in confusion_matrix axes (scikit-learn#11334)
Browse files Browse the repository at this point in the history
  • Loading branch information
maxcopeland authored and jnothman committed Jun 26, 2018
1 parent a7e1711 commit 8083ea4
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 6 deletions.
10 changes: 5 additions & 5 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ sudo: false

language: python

cache:
apt: true
directories:
- $HOME/.cache/pip
- $HOME/.ccache
# cache:
# apt: true
# directories:
# - $HOME/.cache/pip
# - $HOME/.ccache

dist: trusty

Expand Down
5 changes: 4 additions & 1 deletion doc/modules/model_evaluation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -523,8 +523,11 @@ Confusion matrix
----------------

The :func:`confusion_matrix` function evaluates
classification accuracy by computing the `confusion matrix
classification accuracy by computing the confusion matrix
with each row corresponding to the true class
<https://en.wikipedia.org/wiki/Confusion_matrix>`_.
(Wikipedia and other references may use different convention for axes.)


By definition, entry :math:`i, j` in a confusion matrix is
the number of observations actually in group :math:`i`, but
Expand Down
2 changes: 2 additions & 0 deletions sklearn/metrics/classification.py
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,8 @@ def confusion_matrix(y_true, y_pred, labels=None, sample_weight=None):
----------
.. [1] `Wikipedia entry for the Confusion matrix
<https://en.wikipedia.org/wiki/Confusion_matrix>`_
(Wikipedia and other references may use a different
convention for axes)
Examples
--------
Expand Down

0 comments on commit 8083ea4

Please sign in to comment.