jmetzen / gp_extras

Additional kernels that can be used with scikit-learn's Gaussian Process module
79 stars 21 forks source link

Building gp_extras with Sklearn 0.18.dev0 #2

Open finmod opened 8 years ago

finmod commented 8 years ago

Hello Jan,

Glad to discover by accident your gp_extras which appear to deal, based on sklearn, with the same issues as "Nested Variational Compression in Deep Gaussian Processes" by James Hensman and Neil Lawrence, all authors that you seem to know.

Setting up scikit-learn 0.18.dev0 was no problem although the following indications are best for me:

"Anaconda comes with the latest stable version of Scikit-learn (version 0.17 at this time of writing). However some features in the tutorial are only available in the developers version (0.18dev). Therefore you might want to download this latest version from github and install it:

git clone git://github.com/scikit-learn/scikit-learn.git

cd scikit-learn

python setup.py install

make

export PYTHONPATH="/DIRECTORY/WHERE/YOU/CLONED/GITREPO/scikit-learn:$PYTHONPATH" (or put this in your .bash_profile)

You can now test if this worked by doing the following, which should now say something like '0.18.dev0':

python

import sklearn

sklearn.version

However, install instructions for gp_extras are repeatedly producing:

ImportError: No module named gp_extras.kernels

I have tried various combinations of your instructions and the ones above for gp_extras without success.

The bright side of this is that all your other excellent python notebooks are running smoothly. gp_extras is the only one, the innovative one, crashing.

Thank you.

jmetzen commented 8 years ago

Hi Denis, not sure what the problem is; I was not able to reproduce it. But the whole setup.py configuration was somewhat odd before. I tried to clean it up; could you pull the changes and try again? Note that setup.py has been moved to the repository's main directory.

finmod commented 8 years ago

Hello Jan,

Success.

It was a combination of two things:


Installation

You will need the new Gaussian process implementation from the development version of scikit-learn. For this, install the current development version of scikit-learn 0.18.dev0 as follows:

git clone mailto:git@github.com:scikit-learn/scikit-learn.git git@github.com:scikit-learn/scikit-learn.git

cd scikit-learn

python setup.py install

make

export PYTHONPATH=”/DIRECTORY/OF/CLONED/GITREPO/scikit-learn:$PYTHONPATH”

Now, you can test if this has worked with:

          python

          import sklearn

sklearn.version

Next, you can install gp_extras as follows:

git clone mailto:git@github.com:jmetzen/gp_extras.git git@github.com:jmetzen/gp_extras.git

cd gp_extras

python setup.py install

export PYTHONPATH=”/DIRECTORY/OF/CLONED/GITREPO/gp_extras:$PYTHONPATH”

This is it. All of your notebooks are running fine.

Thank you for your prompt reply in this period of leave.

Have a nice weekend.

Denis

Denis Richard *


*

From: Jan Hendrik Metzen [mailto:notifications@github.com] Sent: Saturday, March 26, 2016 7:54 PM To: jmetzen/gp_extras gp_extras@noreply.github.com Cc: finmod denis.richard@dr.com Subject: Re: [gp_extras] Building gp_extras with Sklearn 0.18.dev0 (#2)

Hi Denis, not sure what the problem is; I was not able to reproduce it. But the whole setup.py configuration was somewhat odd before. I tried to clean it up; could you pull the changes and try again? Note that setup.py has been moved to the repository's main directory.

— You are receiving this because you authored the thread. Reply to this email directly or view it on GitHub https://github.com/jmetzen/gp_extras/issues/2#issuecomment-201911447 https://github.com/notifications/beacon/AMHyIh9BpyE2RSi-B9BQ4TFiWK4Iei2Bks5pxYCvgaJpZM4H5QOn.gif