Skip to content
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

Consider advanced libraries for GPFA #33

Open
mdenker opened this issue Jul 7, 2017 · 5 comments
Open

Consider advanced libraries for GPFA #33

mdenker opened this issue Jul 7, 2017 · 5 comments
Assignees

Comments

@mdenker
Copy link
Member

mdenker commented Jul 7, 2017

Test if advanced libraries can be used instead of home-brew implementations of certain algorithms (or keep them as fall-back)

@alperyeg
Copy link

alperyeg commented Jul 7, 2017

E.g. check if scikit-learn's FA is exchangeable or compatible with the existing code.
We should make a list here which functions we could exchange in that case.

@Junji110
Copy link

Junji110 commented Jul 7, 2017

fastfa() used in gpfaEngine.py can be replaced by sklearn.decomposition.FactorAnalysis(), which is faster than fastfa().
I've confirmed that the final result of GPFA is essentially not affected by this change.

@alperyeg
Copy link

alperyeg commented Jul 8, 2017

Thanks @Junji110. That sounds very promising, then we should have a version with sklearn and as a fallback a version with the native implementation. For the latter we can split the code in a new module and call it if sklearn is not installed (the usual if HAVE_SKLEARN: do FactorAnalysis else: do fastfa().

@Junji110
Copy link

Junji110 commented Jul 8, 2017

I've also found that minimize() in learnGPparams.py can be replaced by scipy.optimize.minimize(), which is slightly faster than the home-brew minimize().
This replacement has another merit in addition to the speed-up, because the home-brew minimize() was not written by Byron but he adopted a code written by somebody else (Carl Edward Rasmussen, seems to be a professor in Cambridge) under an original licence (see the comment in minimize.py).
Replacing this with the scipy version would prevent us from possible copyright problems.

@Junji110
Copy link

I've applied the suggested changes to the codes under gpfa_elephant.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants