Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 0d2c8c1

Browse filesBrowse files
committed
DOC improve biclustering docstrings
I had to figure out by experimentation what the methods were doing.
1 parent 56c0631 commit 0d2c8c1
Copy full SHA for 0d2c8c1

File tree

Expand file treeCollapse file tree

1 file changed

+21
-5
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+21
-5
lines changed

‎sklearn/base.py

Copy file name to clipboardExpand all lines: sklearn/base.py
+21-5Lines changed: 21 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -352,28 +352,44 @@ class BiclusterMixin(object):
352352

353353
@property
354354
def biclusters_(self):
355-
"""Convenient way to get row and column indicators together."""
355+
"""Convenient way to get row and column indicators together.
356+
357+
Returns the ``rows_`` and ``columns_`` members.
358+
"""
356359
return self.rows_, self.columns_
357360

358361
def get_indices(self, i):
359-
"""Returns the row and column indices of bicluster `i`.
362+
"""Row and column indices of the i'th bicluster.
363+
364+
Only works if ``rows_`` and ``columns_`` attributes exist.
360365
361-
Only works if ``rows_`` and ``columns`` attributes exist.
366+
Returns
367+
-------
368+
row_ind : np.array, dtype=np.intp
369+
Indices of rows in the dataset that belong to the bicluster.
370+
col_ind : np.array, dtype=np.intp
371+
Indices of columns in the dataset that belong to the bicluster.
362372
363373
"""
364374
from .cluster.bicluster.utils import get_indices
365375
return get_indices(self.rows_[i], self.columns_[i])
366376

367377
def get_shape(self, i):
368-
"""Returns shape of bicluster `i`."""
378+
"""Shape of the i'th bicluster.
379+
380+
Returns
381+
-------
382+
shape : (int, int)
383+
Number of rows and columns (resp.) in the bicluster.
384+
"""
369385
from .cluster.bicluster.utils import get_shape
370386
return get_shape(self.rows_[i], self.columns_[i])
371387

372388
def get_submatrix(self, i, data):
373389
"""Returns the submatrix corresponding to bicluster `i`.
374390
375391
Works with sparse matrices. Only works if ``rows_`` and
376-
``columns`` attributes exist.
392+
``columns_`` attributes exist.
377393
378394
"""
379395
from .cluster.bicluster.utils import get_submatrix

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.