Actually for the chi2 kernel 2xy/(x+y) you can do a prolongation by
continuity at 0:
lim_(x->0) chi2(x,0) = 0
And you should also do it for the feature map so phi(0) = 0.
so a simple test for (x==0) will keep the feature map
correct and keep the sparsity
2012/5/30 Andreas Mueller
> Hi Philipp.
Could you try comparing against a precomputed exact kernel matrix?
There is an easy but very inefficient example of computing the kernel in
tests/test_kernel_approximation.py
If that doesn't work with you data, you can still try for-loops.
Cheers,
Andy
Am 01.06.2012 19:00, schrieb Philipp Singer
In terms of accuracy. Runtime is not the problem.
Philipp
Am 01.06.2012 18:58, schrieb Andreas Mueller:
> Hi Philipp.
> Do you mean it performs worse in terms of accuracy or in terms of runtime?
> Cheers,
> Andy
>
> Am 01.06.2012 18:57, schrieb Philipp Singer:
>> Hey!
>>
>> So I havew tried it ad
Hi Philipp.
Do you mean it performs worse in terms of accuracy or in terms of runtime?
Cheers,
Andy
Am 01.06.2012 18:57, schrieb Philipp Singer:
> Hey!
>
> So I havew tried it adding epsilon to my entries. My first intuition was
> that it performs pretty similar to my old dense version.
> But appa
Hey!
So I havew tried it adding epsilon to my entries. My first intuition was
that it performs pretty similar to my old dense version.
But apparently I jsut hopped into cases where this method performs much
worse :(
Any hints on that?
Regards,
Philipp
Am 30.05.2012 15:52, schrieb Andreas Muel
Hey!
Yeah sure, you are right. Well I will try the thing with epsilon tomorrow.
I keep you updated how it works. Thanks again for the tip.
Philipp
Am 30.05.2012 15:52, schrieb Andreas Mueller:
> Hi Philipp.
> The problem with using sparse matrices is that adding an epsilon
> would make them den
Hi Philipp.
The problem with using sparse matrices is that adding an epsilon
would make them dense. I haven't really looked at it but I think
it should somehow be possible to use this approximation also
on sparse matrices.
Cheers,
Andy
Am 30.05.2012 15:45, schrieb Philipp Singer:
> Hey Andy!
>
> Y
Hey Andy!
Yep I am using it successfully ;)
The idea with adding epsilon sounds legit. I will try it definitely out.
I think it would be nice if you could add it to your code. Would make it
also easier to work with sparse matrix.
Regards,
Philipp
> Hi Philipp.
> Great to hear that someone is
Hi Philipp.
Great to hear that someone is using that :)
The problem is that the approximation uses a "log".
Afaik even the exact kernel is not defined if two features are compared
that are both exactly zeros.
Usually I just work around that by adding an epsilon.
I was considering adding that to th