Skip to content

Commit 4710045

Browse files
Making the results NaiveBayes example more explicit
1 parent 551625f commit 4710045

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

doc/modules/naive_bayes.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,8 +93,8 @@ are estimated using maximum likelihood.
9393
>>> from sklearn.naive_bayes import GaussianNB
9494
>>> gnb = GaussianNB()
9595
>>> y_pred = gnb.fit(iris.data, iris.target).predict(iris.data)
96-
>>> print("Number of mislabeled points : %d" % (iris.target != y_pred).sum())
97-
Number of mislabeled points : 6
96+
>>> print("Number of mislabeled points out of a total %d points : %d" % (iris.data.shape[0],(iris.target != y_pred).sum()))
97+
Number of mislabeled points out of a total 150 points : 6
9898

9999
.. _multinomial_naive_bayes:
100100

0 commit comments

Comments
 (0)