-
-
Notifications
You must be signed in to change notification settings - Fork 25.9k
PCA(whiten=True): unit variances != 1 (regression in 0.19) #11001
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
are you sure it's with the same machine? 0.999 may actually be 1 - eps so
numerically == 1
|
Absolutely sure, same box, same environment, just different sklearn versions. |
I’ll check the difference and report back, but I think it was something like 1e-7. |
@agramfort I've updated the issue description. It's |
Looks like, more generally, the resulting component variance is now equal to |
Thanks @aldanor for the issue. I think it depends on how we define the covariance matrix. Previously, we defined it as |
Ok, gotcha. I guess the docstring / the docs might be a bit more clear then, underlining the fact that it's normalized wrt to ddof=1 variance. |
PR to improve docstring is always welcome, but it might be better to wait for the outcome of #10137 |
When passing
whiten=True
toPCA()
, 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:
Under
v0.18.2
, this outputsUnder
v0.19.0
, this outputsThe text was updated successfully, but these errors were encountered: