scikit-learn/scikit-learn — pull request #3107 by eickenberg (2014-04-24 20:50:15+00:00)
Title: Feature or Bug? Whitened PCA does not inverse_transform properly and is even document that way

The `PCA.inverse_transform` docstring even explicitly states that the inverse transform after whitening is inexact, because the necessary rescaling to fall back into the right space is not done. Is there a specific reason for this? One would think that the expected behaviour of an `inverse_transform` should be that it maps to the closest possible point in input space given the incurred information loss. Since with (full rank) PCA one can keep all the information, the inverse transform should be the true inverse.

Any opinions on this?

My main concern for changing this is that this behaviour is documented and thus possibly expected by some users.
Making the `PCA` object do a true inverse is as easy as adding 2 lines to the `inverse_transform` as visible in the diff.