Skip to content
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

Fix bug in Matern12 kernel #119

Merged
merged 5 commits into from
Oct 6, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions gpjax/kernels.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ def _set_kernels(self, kernels: Sequence[Kernel]) -> None:
kernels_list.append(k)
self.kernel_set = kernels_list

def _initialise_params(self, key: jnp.DeviceArray) -> Dict:
def _initialise_params(self, key: jnp.DeviceArray) -> List[Dict]:
"""A template dictionary of the kernel's parameter set."""
return [kernel._initialise_params(key) for kernel in self.kernel_set]

Expand Down Expand Up @@ -193,7 +193,7 @@ def __call__(
"""
x = self.slice_input(x) / params["lengthscale"]
y = self.slice_input(y) / params["lengthscale"]
K = params["variance"] * jnp.exp(-0.5 * euclidean_distance(x, y))
K = params["variance"] * jnp.exp(-euclidean_distance(x, y))
return K.squeeze()

def _initialise_params(self, key: jnp.DeviceArray) -> Dict:
Expand Down