-
Notifications
You must be signed in to change notification settings - Fork 33
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
Does it allow to add a new custom kernel by the user? #558
Comments
Yes. Please take a look at the "Custom Kernels" section of the docs for info on how to go about this. Please do ask for more info if something is not clear. |
Ahh I see. We should figure out why that is happening -- I don't know why juliahub is grabbing an old version of the docs. |
Hi, @willtebbutt ! May I ask you some questions on the custom kernel? Q1. I'm planning to define a custom kernel function depending on a metric that seems not to be listed here. Now should I define the metric first and then define the kernel as a Q2. Is there more information on the trainable kernel? There are some parameters in the kernel I plan to construct that had better to be specified depending on the information from the training data. Will this be a trainable kernel? Do I need to use Q3. How should I define a argument check within the kernel struct of my kernel? Looking forward to your reply at your convenience. |
Either of these should be fine -- I would just go with whichever is most convenient for you. Do note that you may need to define methods of
If the parameters in your kernels are a fixed function of your training data (i.e. you're not optimising them), then there is really nothing to worry about here. My advice for if you have parameters that you're planning to optimise (say, using Optim.jl or Optimisers.jl) is to make use of ParameterHandling.jl to make it easy to create your kernel. See e.g. https://github.com/JuliaGaussianProcesses/ParameterHandling.jl for more info. Note that when using ParameterHandling.jl, you don't need to modify your kernel at all to accomodate its use.
I would advise using our checkargs macro. See e.g.
Please do let me know if you have any more questions, or if any of this is unclear! |
I can't thank you more for you kind help!!! 🤝🤝🤝 |
I just have a small question here. In what situation should I define methods for Do you mean parallel computing or something related? |
If the default elementwise approach is working well for you, then there is no need to implement anything else. It is often the case, however, that it is possible to take advantage of e.g. matrix-matrix multiplications to perform much of the work involving in constructing a kernel matrix. Since things like matrix-matrix multiplications are highly optimised, this can offer much improved performance in some situations. For example, if you look at our implementation of the Whether or not these kinds of optimisations would be useful in your case of course depend on your particular kernel! |
I see! Thank you very much! |
Thanks for this useful package first!
Now I want to add a customized new kernel, can I? And how? Is there any guide for that?
Thank you in advance!
The text was updated successfully, but these errors were encountered: