JuliaGaussianProcesses / Stheno.jl

Probabilistic Programming with Gaussian processes in Julia
Other
338 stars 26 forks source link

Supplying a distance matrix #236

Closed EvoArt closed 2 years ago

EvoArt commented 2 years ago

Sorry if I've missed something obvious. Is there a way to supply a distance matrix to Stheno instead of a vector or array of points in Euclidean space?

willtebbutt commented 2 years ago

Hmmm no, I'm afraid not. It's worth noting that the points don't have to be in Euclidean space though. If you wanted to work with a pre-computed kernel matrix, I think I would just suggest implementing a new Kernel which contains the pre-computed kernel matrix, and then indexing into it via inputs. Something like

k = MyKernel(kernel_matrix)
f = GP(k)
x = 1:10
f(x)

and implementing KernelFunctions.kernelmatrix etc such that this works properly.

EvoArt commented 2 years ago

Thank you! I'll give that a go.