lisa-lab/pylearn2 — pull request #511 by SuperElectric (2014-01-17 14:48:52+00:00)
Title: ZCA efficiency improvements

ZCA.fit() used to compute only self.P_. Now it optionally computes self.inv_P_ as well. This inv_P_ member is required by ZCA_Database. Computing inv_P_ within ZCA.fit() ensures that it won't have to be needlessly recalculated later for each instantiation of ZCA_Database. Also, the inverse can be calculated efficiently within fit(), using a simple manipulation of the eigenvectors and eigenvalues already computed within that method.