8000 DOC Ensures that GaussianRandomProjection passes numpydoc validation … · scikit-learn/scikit-learn@3aab975 · GitHub
[go: up one dir, main page]

Skip to content

Commit 3aab975

Browse files
DOC Ensures that GaussianRandomProjection passes numpydoc validation (#20982)
Co-authored-by: Guillaume Lemaitre <g.lemaitre58@gmail.com>
1 parent 0b782bc commit 3aab975

File tree

2 files changed

+10
-11
lines changed

2 files changed

+10
-11
lines changed

maint_tools/test_docstrings.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99

1010
# List of modules ignored when checking for numpydoc validation.
1111
DOCSTRING_IGNORE_LIST = [
12-
"GaussianRandomProjection",
1312
"GridSearchCV",
1413
"HalvingGridSearchCV",
1514
"HalvingRandomSearchCV",

sklearn/random_projection.py

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -336,13 +336,13 @@ def fit(self, X, y=None):
336336
matrix dimensions based on the theory referenced in the
337337
afore mentioned papers.
338338
339-
y
340-
Ignored
339+
y : Ignored
340+
Not used, present here for API consistency by convention.
341341
342342
Returns
343343
-------
344-
self
345-
344+
self : object
345+
BaseRandomProjection class instance.
346346
"""
347347
X = self._validate_data(X, accept_sparse=["csr", "csc"])
348348

@@ -395,7 +395,7 @@ def fit(self, X, y=None):
395395
return self
396396

397397
def transform(self, X):
398-
"""Project the data by using matrix product with the random matrix
398+
"""Project the data by using matrix product with the random matrix.
399399
400400
Parameters
401401
----------
@@ -477,6 +477,11 @@ class GaussianRandomProjection(BaseRandomProjection):
477477
478478
.. versionadded:: 1.0
479479
480+
See Also
481+
--------
482+
SparseRandomProjection : Reduce dimensionality through sparse
483+
random projection.
484+
480485
Examples
481486
--------
482487
>>> import numpy as np
@@ -487,11 +492,6 @@ class GaussianRandomProjection(BaseRandomProjection):
487492
>>> X_new = transformer.fit_transform(X)
488493
>>> X_new.shape
489494
(100, 3947)
490-
491-
See Also
492-
--------
493-
SparseRandomProjection
494-
495495
"""
496496

497497
def __init__(self, n_components="auto", *, eps=0.1, random_state=None):

0 commit comments

Comments
 (0)
0