Skip to content

Commit c0033ba

Browse files
SabriDWglemaitre
authored andcommitted
DOC Fixed sklearn.random_projection.johnson_lindenstrauss_min_dim docstring (#24003)
1 parent 13b597e commit c0033ba

File tree

2 files changed

+9
-11
lines changed

2 files changed

+9
-11
lines changed

sklearn/random_projection.py

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,15 @@ def johnson_lindenstrauss_min_dim(n_samples, *, eps=0.1):
9494
The minimal number of components to guarantee with good probability
9595
an eps-embedding with n_samples.
9696
97+
References
98+
----------
99+
100+
.. [1] https://en.wikipedia.org/wiki/Johnson%E2%80%93Lindenstrauss_lemma
101+
102+
.. [2] Sanjoy Dasgupta and Anupam Gupta, 1999,
103+
"An elementary proof of the Johnson-Lindenstrauss Lemma."
104+
http://citeseer.ist.psu.edu/viewdoc/summary?doi=10.1.1.45.3654
105+
97106
Examples
98107
--------
99108
>>> from sklearn.random_projection import johnson_lindenstrauss_min_dim
@@ -105,16 +114,6 @@ def johnson_lindenstrauss_min_dim(n_samples, *, eps=0.1):
105114
106115
>>> johnson_lindenstrauss_min_dim([1e4, 1e5, 1e6], eps=0.1)
107116
array([ 7894, 9868, 11841])
108-
109-
References
110-
----------
111-
112-
.. [1] https://en.wikipedia.org/wiki/Johnson%E2%80%93Lindenstrauss_lemma
113-
114-
.. [2] Sanjoy Dasgupta and Anupam Gupta, 1999,
115-
"An elementary proof of the Johnson-Lindenstrauss Lemma."
116-
http://citeseer.ist.psu.edu/viewdoc/summary?doi=10.1.1.45.3654
117-
118117
"""
119118
eps = np.asarray(eps)
120119
n_samples = np.asarray(n_samples)

sklearn/tests/test_docstrings.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,6 @@
4848
"sklearn.preprocessing._data.maxabs_scale",
4949
"sklearn.preprocessing._data.scale",
5050
"sklearn.preprocessing._label.label_binarize",
51-
"sklearn.random_projection.johnson_lindenstrauss_min_dim",
5251
"sklearn.svm._bounds.l1_min_c",
5352
"sklearn.tree._export.plot_tree",
5453
"sklearn.utils.axis0_safe_slice",

0 commit comments

Comments
 (0)