Skip to content
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
1 change: 0 additions & 1 deletion sklearn/tests/test_docstrings.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
FUNCTION_DOCSTRING_IGNORE_LIST = [
"sklearn.utils.extmath.fast_logdet",
"sklearn.utils.extmath.randomized_svd",
"sklearn.utils.extmath.svd_flip",
"sklearn.utils.gen_batches",
"sklearn.utils.metaestimators.if_delegate_has_method",
]
Expand Down
10 changes: 6 additions & 4 deletions sklearn/utils/extmath.py
Original file line number Diff line number Diff line change
Expand Up @@ -740,12 +740,12 @@ def svd_flip(u, v, u_based_decision=True):
Parameters
----------
u : ndarray
u and v are the output of `linalg.svd` or
Parameters u and v are the output of `linalg.svd` or
:func:`~sklearn.utils.extmath.randomized_svd`, with matching inner
dimensions so one can compute `np.dot(u * s, v)`.
v : ndarray
u and v are the output of `linalg.svd` or
Parameters u and v are the output of `linalg.svd` or
:func:`~sklearn.utils.extmath.randomized_svd`, with matching inner
dimensions so one can compute `np.dot(u * s, v)`.
The input v should really be called vt to be consistent with scipy's
Expand All @@ -756,11 +756,13 @@ def svd_flip(u, v, u_based_decision=True):
Otherwise, use the rows of v. The choice of which variable to base the
decision on is generally algorithm dependent.
Returns
-------
u_adjusted, v_adjusted : arrays with the same dimensions as the input.
u_adjusted : ndarray
Array u with adjusted columns and the same dimensions as u.
v_adjusted : ndarray
Array v with adjusted rows and the same dimensions as v.
"""
if u_based_decision:
# columns of u, rows of v
Expand Down