Re: [Scikit-learn-general] sklearn.test() weirdness

2012-01-04 Thread Gael Varoquaux
On Wed, Jan 04, 2012 at 03:38:41PM -0800, Jacob VanderPlas wrote: > Importing sklearn from within the scikit-learn source directory produces > no such error. Perhaps this would be a good fix +1 -- Ridiculously easy VDI.

Re: [Scikit-learn-general] sklearn.test() weirdness

2012-01-04 Thread Jacob VanderPlas
I have noticed in the past that if you try to `import scipy` from within the scipy directory, it raises the following: ImportError: Error importing scipy: you cannot import scipy while being in scipy source directory; please exit the scipy source tree first, and relaunch your python intepr

Re: [Scikit-learn-general] Removal of 'decode' from GMM

2012-01-04 Thread bthirion
On 01/04/2012 05:23 PM, Olivier Grisel wrote: > 2012/1/4 Jacob VanderPlas: >> Hi all, >> I just ran some old mixture model code using the latest master version >> of scikit-learn, and it broke because `GMM.decode` was removed during >> the recent refactoring of the mixture module. I think this sho

Re: [Scikit-learn-general] sklearn.test() weirdness

2012-01-04 Thread Satrajit Ghosh
hey andy, can you do make test-code in your sklearn directory? that builds and runs tests inplace. however, this is different from loading the module and doing sk.test(). perhaps this can be clarified. cheers, satra On Wed, Jan 4, 2012 at 4:49 PM, Andreas wrote: > ** > On 01/04/2012 10:39 PM

[Scikit-learn-general] Fwd: Re: Other distance metrics for kNN

2012-01-04 Thread Emanuele Olivetti
[re-sending due to mail server problems] On 01/04/2012 04:22 PM, Mathias Verbeke wrote: > Dear all, > > I just started working with Scikit Learn and I'm currently using the Nearest > Neighbors > module. In the documentation is stated that it currently only supports the > Euclidean > distance

Re: [Scikit-learn-general] sklearn.test() weirdness

2012-01-04 Thread Robert Layton
On 5 January 2012 08:49, Andreas wrote: > ** > On 01/04/2012 10:39 PM, Robert Layton wrote: > > On 5 January 2012 08:36, Andreas wrote: > >> Hi everybody. >> Today I could finally reproduce a weird behavior of sklearn.test() that >> I observed >> at the sprint. >> If you do import sklearn; sklea

Re: [Scikit-learn-general] sklearn.test() weirdness

2012-01-04 Thread Andreas
On 01/04/2012 10:39 PM, Robert Layton wrote: On 5 January 2012 08:36, Andreas > wrote: Hi everybody. Today I could finally reproduce a weird behavior of sklearn.test() that I observed at the sprint. If you do import sklearn; sklearn.test()

Re: [Scikit-learn-general] sklearn.test() weirdness

2012-01-04 Thread Robert Layton
On 5 January 2012 08:36, Andreas wrote: > Hi everybody. > Today I could finally reproduce a weird behavior of sklearn.test() that > I observed > at the sprint. > If you do import sklearn; sklearn.test() > in IPython in the folder that contains sklearn (for me the scikit-learn > folder > I checked

[Scikit-learn-general] sklearn.test() weirdness

2012-01-04 Thread Andreas
Hi everybody. Today I could finally reproduce a weird behavior of sklearn.test() that I observed at the sprint. If you do import sklearn; sklearn.test() in IPython in the folder that contains sklearn (for me the scikit-learn folder I checked out), it gives tons of error messages. If I do the same

Re: [Scikit-learn-general] Other distance metrics for kNN

2012-01-04 Thread Jacob VanderPlas
Emanuele, This is exciting! I've played with Cover Trees in the past, and found similar to you that the insertion time is very slow, and query time is comparable to that of Ball Tree. From my reading and brief experimentation on the subject, it seems that cover trees seem to be nice in that y

Re: [Scikit-learn-general] Other distance metrics for kNN

2012-01-04 Thread Emanuele Olivetti
On 01/04/2012 04:22 PM, Mathias Verbeke wrote: > Dear all, > > I just started working with Scikit Learn and I'm currently using the Nearest > Neighbors > module. In the documentation is stated that it currently only supports the > Euclidean > distance metric, and I was wondering if it would be ea

Re: [Scikit-learn-general] Other distance metrics for kNN

2012-01-04 Thread Jacob VanderPlas
Gael Varoquaux wrote: > On Wed, Jan 04, 2012 at 07:59:04AM -0800, Jacob VanderPlas wrote: > >> If someone has a good idea about how one could specify these distance >> metrics from python code, with optional ancillary parameters, and >> convert these specifications into code for fast distance

Re: [Scikit-learn-general] Other distance metrics for kNN

2012-01-04 Thread Gael Varoquaux
On Wed, Jan 04, 2012 at 07:59:04AM -0800, Jacob VanderPlas wrote: > If someone has a good idea about how one could specify these distance > metrics from python code, with optional ancillary parameters, and > convert these specifications into code for fast distance computation > within cython, H

Re: [Scikit-learn-general] Other distance metrics for kNN

2012-01-04 Thread Olivier Grisel
It should be possible to define a cython struct with a function pointer: http://docs.cython.org/src/reference/language_basics.html#function-pointers I have no experience with that kind of cython constructs though. Alternatively that could be the right opportunity to introduce the cython templa

Re: [Scikit-learn-general] Other distance metrics for kNN

2012-01-04 Thread Jacob VanderPlas
It would be very straightforward to extend neighbors to use any minkowski distance (see https://github.com/scikit-learn/scikit-learn/issues/351 ). BallTree does not yet work for arbitrary distance metrics, but this is not due to any inherent limitation: it will work for any metric which satisfi

Re: [Scikit-learn-general] Removal of 'decode' from GMM

2012-01-04 Thread Olivier Grisel
2012/1/4 Jacob VanderPlas : > Hi all, > I just ran some old mixture model code using the latest master version > of scikit-learn, and it broke because `GMM.decode` was removed during > the recent refactoring of the mixture module.  I think this should > probably have a depreciation warning for the

[Scikit-learn-general] GMM

2012-01-04 Thread Jacob VanderPlas
Sorry, my mistake: the removal of `decode` wasn't in master. It was in the GMM pull request. I'll make the comment there Jake -- Ridiculously easy VDI. With Citrix VDI-in-a-Box, you don't need a complex infrastructure

[Scikit-learn-general] Removal of 'decode' from GMM

2012-01-04 Thread Jacob VanderPlas
Hi all, I just ran some old mixture model code using the latest master version of scikit-learn, and it broke because `GMM.decode` was removed during the recent refactoring of the mixture module. I think this should probably have a depreciation warning for the time being. Thoughts? Jake

Re: [Scikit-learn-general] Other distance metrics for kNN

2012-01-04 Thread Lars Buitinck
2012/1/4 Mathias Verbeke : > I just started working with Scikit Learn and I'm currently using the Nearest > Neighbors module. In the documentation is stated that it currently only > supports the Euclidean distance metric, and I was wondering if it would be > easy to extend it with other distance me

Re: [Scikit-learn-general] Other distance metrics for kNN

2012-01-04 Thread Olivier Grisel
2012/1/4 Mathias Verbeke : > Dear all, > > I just started working with Scikit Learn and I'm currently using the Nearest > Neighbors module. In the documentation is stated that it currently only > supports the Euclidean distance metric, and I was wondering if it would be > easy to extend it with oth

[Scikit-learn-general] Other distance metrics for kNN

2012-01-04 Thread Mathias Verbeke
Dear all, I just started working with Scikit Learn and I'm currently using the Nearest Neighbors module. In the documentation is stated that it currently only supports the Euclidean distance metric, and I was wondering if it would be easy to extend it with other distance metrics? Since it uses the