8000
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b0ee936 commit 31a7302Copy full SHA for 31a7302
sklearn/decomposition/pca.py
@@ -5,6 +5,7 @@
5
# Olivier Grisel <olivier.grisel@ensta.org>
6
# Mathieu Blondel <mathieu@mblondel.org>
7
# Denis A. Engemann <d.engemann@fz-juelich.de>
8
+# Michael Eickenberg <michael.eickenberg@inria.fr>
9
#
10
# License: BSD 3 clause
11
@@ -353,8 +354,6 @@ def get_precision(self):
353
354
# Get precision using matrix inversion lemma
355
components_ = self.components_
356
exp_var = self.explained_variance_
- # if self.whiten:
357
- # components_ = components_ * np.sqrt(exp_var[:, np.newaxis])
358
exp_var_diff = np.maximum(exp_var - self.noise_variance_, 0.)
359
precision = np.dot(components_, components_.T) / self.noise_variance_
360
precision.flat[::len(precision) + 1] += 1. / exp_var_diff
0 commit comments