-
Notifications
You must be signed in to change notification settings - Fork 32
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Quick question #555
Comments
Hi Max, thanks for opening the issue. There are two different notions of metric in the this kernel:
Concretely, KernelFunctions.jl's definition of the exponentiated quadratic kernel is I'm still on the fence about this design choice because a) you can't just change Does this explain what's going on? |
Hi Will, I think I get it. The efficiency comes here, where, if you were to take the It is a bit confusing, but the complication is hidden behind the convention of not directly accessing struct fields, so makes sense. Thanks! |
Hi All,
Thanks for the wonderful package.
I'm just starting to explore the source code. I was curious about a very small decision.
If I do:
then
k.metric
is an instance ofDistances.Euclidean
, but if I dometric(k)
, it returns an instance ofDistances.SqEuclidean
.See: https://github.com/JuliaGaussianProcesses/KernelFunctions.jl/blob/master/src/basekernels/exponential.jl#L21-L27
Just wondering why the struct stores a different metric than it invokes, if I do, say:
k(x1, x2)
, which callsmetric(k)(x1, x2)
? Why not just make the default metricSqEuclidean
?Thanks for the help, and the package.
Cheers,
Max
The text was updated successfully, but these errors were encountered: