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
6161:mod: `sklearn.naive_bayes `
6262..........................
6363
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> `.
6768
6869:mod: `sklearn.semi_supervised `
6970..............................
Original file line number Diff line number Diff line change @@ -51,6 +51,14 @@ def _joint_log_likelihood(self, X):
5151 predict_proba and predict_log_proba.
5252 """
5353
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+
5462 def predict (self , X ):
5563 """
5664 Perform classification on an array of test vectors X.
You can’t perform that action at this time.
0 commit comments