Skip to content

Commit 8f68e54

Browse files
committed
Merge pull request scikit-learn#3445 from arjoly/flatten-metrics
[MRG+1] MAINT flatten metrics module and avoid nested bicluster module
2 parents fa26f64 + 58feda0 commit 8f68e54

File tree

6 files changed

+5
-8
lines changed

6 files changed

+5
-8
lines changed

sklearn/cluster/bicluster/tests/test_spectral.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
from sklearn.cluster.bicluster.spectral import _bistochastic_normalize
1919
from sklearn.cluster.bicluster.spectral import _log_normalize
2020

21-
from sklearn.metrics.cluster.bicluster import consensus_score
21+
from sklearn.metrics import consensus_score
2222

2323
from sklearn.datasets import make_biclusters, make_checkerboard
2424

sklearn/metrics/cluster/bicluster/bicluster_metrics.py renamed to sklearn/metrics/cluster/bicluster.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
from sklearn.utils.linear_assignment_ import linear_assignment
66
from sklearn.utils.validation import check_arrays
77

8+
__all__ = ["consensus_score"]
9+
810

911
def _check_rows_and_columns(a, b):
1012
"""Unpacks the row and column arrays and checks their shape."""

sklearn/metrics/cluster/bicluster/__init__.py

Lines changed: 0 additions & 3 deletions
This file was deleted.

sklearn/metrics/cluster/bicluster/tests/__init__.py

Whitespace-only changes.

sklearn/metrics/cluster/bicluster/tests/test_bicluster_metrics.py renamed to sklearn/metrics/cluster/tests/test_bicluster.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44

55
from sklearn.utils.testing import assert_equal
66

7-
from ..bicluster_metrics import _jaccard
8-
from ..bicluster_metrics import consensus_score
7+
from sklearn.metrics.cluster.bicluster import _jaccard
8+
from sklearn.metrics import consensus_score
99

1010

1111
def test_jaccard():

sklearn/setup.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,6 @@ def configuration(parent_package='', top_path=None):
5151
config.add_subpackage('metrics/tests')
5252
config.add_subpackage('metrics/cluster')
5353
config.add_subpackage('metrics/cluster/tests')
54-
config.add_subpackage('metrics/cluster/bicluster')
55-
config.add_subpackage('metrics/cluster/bicluster/tests')
5654

5755
# add cython extension module for hmm
5856
config.add_extension(

0 commit comments

Comments
 (0)