Skip to content

Commit 23c74e9

Browse files
j3nnn1glemaitre
andauthored
DOC Ensures that CategoricalNB passes numpydoc validation (#20445)
Co-authored-by: Guillaume Lemaitre <g.lemaitre58@gmail.com>
1 parent adb7ced commit 23c74e9

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

maint_tools/test_docstrings.py

-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
"Birch",
1818
"CCA",
1919
"CalibratedClassifierCV",
20-
"CategoricalNB",
2120
"ClassifierChain",
2221
"ColumnTransformer",
2322
"ComplementNB",

sklearn/naive_bayes.py

+7-1
Original file line numberDiff line numberDiff line change
@@ -1142,7 +1142,7 @@ def _joint_log_likelihood(self, X):
11421142

11431143

11441144
class CategoricalNB(_BaseDiscreteNB):
1145-
"""Naive Bayes classifier for categorical features
1145+
"""Naive Bayes classifier for categorical features.
11461146
11471147
The categorical Naive Bayes classifier is suitable for classification with
11481148
discrete features that are categorically distributed. The categories of
@@ -1216,6 +1216,12 @@ class CategoricalNB(_BaseDiscreteNB):
12161216
12171217
.. versionadded:: 0.24
12181218
1219+
See Also
1220+
--------
1221+
ComplementNB : Complement Naive Bayes classifier.
1222+
GaussianNB : Gaussian Naive Bayes.
1223+
MultinomialNB : Naive Bayes classifier for multinomial models.
1224+
12191225
Examples
12201226
--------
12211227
>>> import numpy as np

0 commit comments

Comments
 (0)