JuliaGaussianProcesses / KernelFunctions.jl

Julia package for kernel functions for machine learning
https://juliagaussianprocesses.github.io/KernelFunctions.jl/stable/
MIT License
266 stars 32 forks source link

Basic regression example #407

Closed Cyberface closed 2 years ago

Cyberface commented 2 years ago

Hi all, I'm a little confused how exactly to use this package.

For example if I wanted to just do a simple regression example how would I do that with KernelFunctions? The most relevant example is examples/deep-kernel-learning.

I should be able to remove the neural network stuff and just use a Squared-exponential kernel there. Is it still recommended to use Flux to optimise the parameters in this case?

Can these kernels be using in other GP Julia packages, for example GaussianProcesses.jl ?

Thanks!

st-- commented 2 years ago

Hi @Cyberface, KernelFunctions.jl is trying to stick to one job - define kernel functions and how to evaluate them - which is used to construct the kernel matrices required in GPs e.g. by AbstractGPs.jl and the other packages around https://github.com/JuliaGaussianProcesses/. You can also use KernelFunctions.jl on its own, for example this notebook demonstrates kernel ridge regression (it's almost a one-liner).

We would love for KernelFunctions.jl to catch on, but for now there are a bunch of other GP packages such as GaussianProcesses.jl that rely on their own implementations. There might be some differences in parametrisations (e.g. the kernels of GaussianProcesses.jl tend to be parametrised in terms of log-signal scale, log-lengthscale instead of signal variance and lengthscale directly (or its inverse) as here), so you should always check the documentation (or code implementation if needed) to make sure you're actually getting what you expect!

st-- commented 2 years ago

This question is more something for "discussions" (side note: should we open the GitHub discussion feature ?), but to bring it back to a more concrete "issue" (bug/feature): is this a lack of documentation, what about the docs would have helped you not having to ask this question here? (Are the notebooks not prominent enough? Do they not link to AbstractGPs & co sufficiently? Are the docs themselves not prominent enough and we need to improve the README? ...)

st-- commented 2 years ago

Deep kernel learning notebook is now moved to AbstractGPs, and #446 adds more links to other packages. If anyone has any further concrete ideas what to improve about our docs around this, please feel free to reopen!