Closed
Description
When passing whiten=True
to PCA()
, component-wise variances are not 'unit' as is claimed.
Unless I'm missing something, this is a regression presumably caused by #9105 (which appeared in v0.19)?
Example:
from sklearn.datasets import make_classification
from sklearn.decomposition import PCA
X, _ = make_classification(n_samples=1000, n_features=4, n_informative=3, n_redundant=0,
n_repeated=0, n_classes=2, random_state=10, shift=10., scale=10.)
print(1 - PCA(whiten=True).fit_transform(X).var(axis=0))
Under v0.18.2
, this outputs
[ -4.44089210e-16 0.00000000e+00 1.11022302e-16 6.66133815e-16]
Under v0.19.0
, this outputs
[ 0.001 0.001 0.001 0.001]
Metadata
Metadata
Assignees
Labels
No labels