@@ -64,7 +64,7 @@ class TruncatedSVD(TransformerMixin, BaseEstimator):
64
64
multiple function calls.
65
65
See :term:`Glossary <random_state>`.
66
66
67
- tol : float, default=0.
67
+ tol : float, default=0.0
68
68
Tolerance for ARPACK. 0 means machine precision. Ignored by randomized
69
69
SVD solver.
70
70
@@ -96,6 +96,29 @@ class TruncatedSVD(TransformerMixin, BaseEstimator):
96
96
97
97
.. versionadded:: 1.0
98
98
99
+ See Also
100
+ --------
101
+ DictionaryLearning : Find a dictionary that sparsely encodes data.
102
+ FactorAnalysis : A simple linear generative model with
103
+ Gaussian latent variables.
104
+ IncrementalPCA : Incremental principal components analysis.
105
+ KernelPCA : Kernel Principal component analysis.
106
+ NMF : Non-Negative Matrix Factorization.
107
+ PCA : Principal component analysis.
108
+
109
+ Notes
110
+ -----
111
+ SVD suffers from a problem called "sign indeterminacy", which means the
112
+ sign of the ``components_`` and the output from transform depend on the
113
+ algorithm and random state. To work around this, fit instances of this
114
+ class to data once, then keep the instance around to do transformations.
115
+
116
+ References
117
+ ----------
118
+ Finding structure with randomness: Stochastic algorithms for constructing
119
+ approximate matrix decompositions
120
+ Halko, et al., 2009 (arXiv:909) https://arxiv.org/pdf/0909.4061.pdf
121
+
99
122
Examples
100
123
--------
101
124
>>> from sklearn.decomposition import TruncatedSVD
@@ -114,23 +137,6 @@ class TruncatedSVD(TransformerMixin, BaseEstimator):
114
137
0.2102...
115
138
>>> print(svd.singular_values_)
116
139
[35.2410... 4.5981... 4.5420... 4.4486... 4.3288...]
117
-
118
- See Also
119
- --------
120
- PCA
121
-
122
- References
123
- ----------
124
- Finding structure with randomness: Stochastic algorithms for constructing
125
- approximate matrix decompositions
126
- Halko, et al., 2009 (arXiv:909) https://arxiv.org/pdf/0909.4061.pdf
127
-
128
- Notes
129
- -----
130
- SVD suffers from a problem called "sign indeterminacy", which means the
131
- sign of the ``components_`` and the output from transform depend on the
132
- algorithm and random state. To work around this, fit instances of this
133
- class to data once, then keep the instance around to do transformations.
134
140
"""
135
141
136
142
def __init__ (
@@ -157,6 +163,7 @@ def fit(self, X, y=None):
157
163
Training data.
158
164
159
165
y : Ignored
166
+ Not used, present here for API consistency by convention.
160
167
161
168
Returns
162
169
-------
@@ -175,6 +182,7 @@ def fit_transform(self, X, y=None):
175
182
Training data.
176
183
177
184
y : Ignored
185
+ Not used, present here for API consistency by convention.
178
186
179
187
Returns
180
188
-------
0 commit comments