File tree Expand file tree Collapse file tree 2 files changed +12
-3
lines changed Expand file tree Collapse file tree 2 files changed +12
-3
lines changed Original file line number Diff line number Diff line change @@ -61,9 +61,10 @@ Changelog
61
61
:mod: `sklearn.naive_bayes `
62
62
..........................
63
63
64
- - |Fix | removed abstract method `_check_X ` from :class: `naive_bayes.BaseNB `
65
- that could break downstream projects inheriting from this deprecated
66
- public base class. :pr: `15996 ` by :user: `Brigitta Sipőcz <bsipocz> `.
64
+ - |Fix | Removed `abstractmethod ` decorator for the method `_check_X ` in
65
+ :class: `naive_bayes.BaseNB ` that could break downstream projects inheriting
66
+ from this deprecated public base class. :pr: `15996 ` by
67
+ :user: `Brigitta Sipőcz <bsipocz> `.
67
68
68
69
:mod: `sklearn.semi_supervised `
69
70
..............................
Original file line number Diff line number Diff line change @@ -51,6 +51,14 @@ def _joint_log_likelihood(self, X):
51
51
predict_proba and predict_log_proba.
52
52
"""
53
53
54
+ def _check_X (self , X ):
55
+ """To be overridden in subclasses with the actual checks."""
56
+ # Note that this is not marked @abstractmethod as long as the
57
+ # deprecated public alias sklearn.naive_bayes.BayesNB exists
58
+ # (until 0.24) to preserve backward compat for 3rd party projects
59
+ # with existing derived classes.
60
+ return X
61
+
54
62
def predict (self , X ):
55
63
"""
56
64
Perform classification on an array of test vectors X.
You can’t perform that action at this time.
0 commit comments