Re: [Scikit-learn-general] RBF kernel with ball tree

2012-01-22 Thread Alexandre Gramfort
I am not sure it is what you want but you could use: K = radius_neighbors_graph(X, radius, mode='distance') K.data **= 2 K.data *= -gamma np.exp(K.data, out=K.data) no? Alex On Sun, Jan 22, 2012 at 9:34 PM, Andreas wrote: > Hi everybody. > While reviewing the label propagation PR, I thought ab

Re: [Scikit-learn-general] RBF kernel with ball tree

2012-01-22 Thread Jacob VanderPlas
I don't think this would work out-of-the-box. The classic ball tree implementation depends on the metric satisfying the triangle inequality. You may be able to cleverly modify the algorithm to work in other cases, but I'm not aware of any examples of that. I think that approximate nearest ne

Re: [Scikit-learn-general] Bug in master

2012-01-22 Thread Gael Varoquaux
On Sat, Jan 21, 2012 at 03:49:24PM +0100, Lars Buitinck wrote: > This is very strange; I get no such error. I have numpy 2 (dev). The rules for strides in array creation have changed. Gael -- Try before you buy = See our

Re: [Scikit-learn-general] RBF kernel with ball tree

2012-01-22 Thread Mathieu Blondel
On Mon, Jan 23, 2012 at 5:34 AM, Andreas wrote: > Hi everybody. > While reviewing the label propagation PR, I thought about the pairwise > rbf functions. > Would it be possible to compute an sparse, approximate RBF kernel matrix > using ball trees? > The idea would be that if the distance between

Re: [Scikit-learn-general] RBF kernel with ball tree

2012-01-22 Thread josef . pktd
On Sun, Jan 22, 2012 at 3:34 PM, Andreas wrote: > Hi everybody. > While reviewing the label propagation PR, I thought about the pairwise > rbf functions. > Would it be possible to compute an sparse, approximate RBF kernel matrix > using ball trees? > The idea would be that if the distance between

[Scikit-learn-general] RBF kernel with ball tree

2012-01-22 Thread Andreas
Hi everybody. While reviewing the label propagation PR, I thought about the pairwise rbf functions. Would it be possible to compute an sparse, approximate RBF kernel matrix using ball trees? The idea would be that if the distance between two points is some "large" multiple of gamma, the kernel c