STOR-i / GaussianProcesses.jl

A Julia package for Gaussian Processes
https://stor-i.github.io/GaussianProcesses.jl/latest/
Other
308 stars 53 forks source link

Compute kernel matrix explicitly #208

Closed clarazen closed 3 years ago

clarazen commented 3 years ago

Hello, is there a way to compute the kernel matrix explicitly? I see that you overwrite the function cov to compute it internally, but that function is not exported for the user to use, right? I would appreciate the help! Thank you!! :)

maximerischard commented 3 years ago

Hi @cmmenzen. Even though the function is not exported, you can absolutely still use it. The fact that it's not exported just means that the documentation may not be as complete and user-friendly, and there's less of a commitment not to change the API abruptly in future versions. If you're new to julia, the syntax for using a non-exported function is:

using GaussianProcesses: cov
cov(kernel, X1, X2)
# or alternatively
import GaussianProcesses
GaussianProcesses.cov(kernel, X1, X2)