8000 fix biclustering API (#9053) · AishwaryaRK/scikit-learn@7c11977 · GitHub
[go: up one dir, main page]

Skip to content

Commit 7c11977

Browse files
amuellerAishwaryaRK
authored andcommitted
fix biclustering API (scikit-learn#9053)
don't mention returning self in whatsnew as that's already fixed in master
1 parent 22ef2e0 commit 7c11977

File tree

3 files changed

+6
-7
lines changed

3 files changed

+6
-7
lines changed

doc/whats_new.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -419,6 +419,10 @@ API changes summary
419419
has been renamed to ``n_components`` and will be removed in version 0.21.
420420
:issue:`8922` by :user:Attractadore
421421

422+
- :class:`cluster.bicluster.SpectralCoClustering` and
423+
:class:`cluster.bicluster.SpectralBiclustering` now accept ``y`` in fit.
424+
:issue:`6126` by `Andreas Müller`_.
425+
422426
- SciPy >= 0.13.3 and NumPy >= 1.8.2 are now the minimum supported versions
423427
for scikit-learn. The following backported functions in ``sklearn.utils``
424428
have been removed or deprecated accordingly.

sklearn/cluster/bicluster.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ def _check_parameters(self):
110110
" one of {1}.".format(self.svd_method,
111111
legal_svd_methods))
112112

113-
def fit(self, X):
113+
def fit(self, X, y=None):
114114
"""Creates a biclustering for X.
115115
116116
Parameters

sklearn/utils/estimator_checks.py

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -470,12 +470,7 @@ def check_dict_unchanged(name, Estimator):
470470

471471
set_random_state(estimator, 1)
472472

473-
# should be just `estimator.fit(X, y)`
474-
# after merging #6141
475-
if name in ['SpectralBiclustering']:
476-
estimator.fit(X)
477-
else:
478-
estimator.fit(X, y)
473+
estimator.fit(X, y)
479474
for method in ["predict", "transform", "decision_function",
480475
"predict_proba"]:
481476
if hasattr(estimator, method):

0 commit comments

Comments
 (0)
0