-
Notifications
You must be signed in to change notification settings - Fork 47
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This PR is adding more kernel choices. There are some notable points to consider below: **Bugfix arithmetic Kernels** These used to apply operators like `mul(*a_list)` but since the operators are defined as 2-input only this failed for a 3-composite kernel test I added. It was fixed via rephrasing it to `reduce(mul, a_list)` **Removed Prior Iteration Tests** These have become obsolete as the kernels are tested with many priors. I've also reduced the prior used with the scale kernel in iteration tests to one choice, otherwise the list of kernels just got too large. **RQKernel alpha** Even though this kernel has an attribute called `alpha` (also visible in the equation [here](https://docs.gpytorch.ai/en/stable/kernels.html#rqkernel)) it does not seem to accept priors for it. Hence, I have ignored `alpha`, both regarding prior and initial value in our corresponding kernel **CosineKernel** I was not able to find prior settings that work with this kernel in the iteration tests. The error I get seem purely computational (a la could not fit any reasonable model etc). I have thus not included it in this PR
- Loading branch information
Showing
7 changed files
with
311 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,31 @@ | ||
"""Kernels for Gaussian process surrogate models.""" | ||
"""Kernels for Gaussian process surrogate models. | ||
from baybe.kernels.basic import MaternKernel | ||
The kernel classes mimic classes from GPyTorch. For details on specification and | ||
arguments see https://docs.gpytorch.ai/en/stable/kernels.html. | ||
""" | ||
|
||
from baybe.kernels.basic import ( | ||
LinearKernel, | ||
MaternKernel, | ||
PeriodicKernel, | ||
PiecewisePolynomialKernel, | ||
PolynomialKernel, | ||
RBFKernel, | ||
RFFKernel, | ||
RQKernel, | ||
) | ||
from baybe.kernels.composite import AdditiveKernel, ProductKernel, ScaleKernel | ||
|
||
__all__ = [ | ||
"AdditiveKernel", | ||
"LinearKernel", | ||
"MaternKernel", | ||
"PeriodicKernel", | ||
"PiecewisePolynomialKernel", | ||
"PolynomialKernel", | ||
"ProductKernel", | ||
"RBFKernel", | ||
"RFFKernel", | ||
"RQKernel", | ||
"ScaleKernel", | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.