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

PCA memory improvements, inplace dot product #518

merged 8 commits into from Dec 2, 2014


None yet
2 participants

jabooth commented Nov 27, 2014

  • PCAModel has grown support for construction from an iterator rather than a list of vectorizable items. In this case we need to be able to instruct PCAModel on how big to allocate it's data matrix - we do this with the new (completely optional) n_samples kwarg. If you don't provide this, things are as they used to be.
  • menpo.math gets two new functions - dot_inplace_left(a, b) and dot_inplace_right(a, b). These methods iterate over either the left or right item in the dot product incrementally replacing this input array with the output. This allows us to essentially compute large dot products inplace.
  • principal_component_decomposition now uses these inplace dot methods if you provide the (pre-existing) inplace=True kwarg.
  • tests have been added for all new behaviour.

@jabooth jabooth added the in progress label Nov 27, 2014


This comment has been minimized.


patricksnape commented Dec 1, 2014

I haven't tested this, but if you are happy that it works, then I am too.

jabooth added a commit that referenced this pull request Dec 2, 2014

Merge pull request #518 from jabooth/pca_generator
PCA memory improvements, inplace dot product

@jabooth jabooth merged commit ae85a26 into menpo:master Dec 2, 2014

2 checks passed

continuous-integration/appveyor AppVeyor build succeeded
continuous-integration/travis-ci The Travis CI build passed

@jabooth jabooth deleted the jabooth:pca_generator branch Dec 2, 2014

@jabooth jabooth removed the in progress label Dec 2, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment