Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[MRG+1] fix biclustering API #9053

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 8, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions doc/whats_new.rst
Original file line number Diff line number Diff line change
Expand Up @@ -405,6 +405,10 @@ API changes summary
has been renamed to ``n_components`` and will be removed in version 0.21.
:issue:`8922` by :user:Attractadore

- :class:`cluster.bicluster.SpectralCoClustering` and
:class:`cluster.bicluster.SpectralBiclustering` now accept ``y`` in fit.
:issue:`6126` by `Andreas Müller`_.

- SciPy >= 0.13.3 and NumPy >= 1.8.2 are now the minimum supported versions
for scikit-learn. The following backported functions in ``sklearn.utils``
have been removed or deprecated accordingly.
Expand Down
2 changes: 1 addition & 1 deletion sklearn/cluster/bicluster.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ def _check_parameters(self):
" one of {1}.".format(self.svd_method,
legal_svd_methods))

def fit(self, X):
def fit(self, X, y=None):
"""Creates a biclustering for X.

Parameters
Expand Down
7 changes: 1 addition & 6 deletions sklearn/utils/estimator_checks.py
Original file line number Diff line number Diff line change
Expand Up @@ -470,12 +470,7 @@ def check_dict_unchanged(name, Estimator):

set_random_state(estimator, 1)

# should be just `estimator.fit(X, y)`
# after merging #6141
if name in ['SpectralBiclustering']:
estimator.fit(X)
else:
estimator.fit(X, y)
estimator.fit(X, y)
for method in ["predict", "transform", "decision_function",
"predict_proba"]:
if hasattr(estimator, method):
Expand Down