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
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
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
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
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
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