-
Notifications
You must be signed in to change notification settings - Fork 36
Add Piecewise Polynomial Kernel #76
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
Add Piecewise Polynomial Kernel #76
Conversation
Co-Authored-By: David Widmann <[email protected]>
Co-Authored-By: David Widmann <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This review purely addresses style, in particular: 92 char lim on line length, consistent spacing between function arguments / operator arguments, and the use of semicolons to denote keyword arguments.
This quite possibly comes across as very pedantic, but it would be good to start getting this right. (Someone needs to go through the entire code base at some point, and to start enforcing this. We really need a linter that helps out our adhering to the Invenia style guide ).
Co-Authored-By: willtebbutt <[email protected]>
@sharanry Note that if you use Juno, you can automatically format your code as @willtebbutt by using the shortcut ctrl+J -> ctrl+F |
@theogf Thanks for the suggestion! I unfortunately use emacs or VS Code. I will check if there is any equivalent linter. |
I was not aware of this... do you know what it hooks into? |
@willtebbutt Yes it is based on https://github.com/domluna/JuliaFormatter.jl |
@theogf I guess we could format the whole of current codebase using this? julia> using JuliaFormatter
# Recursively formats all Julia files in the current directory
julia> format(".") |
Hmmm yeah, I'm wary of doing that without first understanding the style guide that it's implicitly imposing. I'm a big fan of Invenia's BlueStyle, and it's what I try to follow in my own packages and would like us to follow here. |
Moreover that would break all the version history of the files at once... |
Haha true. It's something that we can do incrementally in any case. We should definitely start being strict about style now that there are quite a few of us working on this though. |
@sharanry are you happy with this now? I'm happy to merge if you are. |
@willtebbutt LGTM Thanks! |
Issue #44
Piecewise Polynomial Kernel
Piecewise Polynomial covariance function with compact support, v = 0,1,2,3.
The kernel functions are 2v times continuously differentiable and the corresponding
processes are hence v times mean-square differentiable. The kernel function is:
where r is the Mahalanobis distance sqrt(maha(x,z)).
References
https://github.com/alshedivat/gpml/blob/master/cov/covPP.m
www.gaussianprocess.org/gpml/code/matlab/doc/manual.pdf pg44
Issues
Currently the dimension
D
of the inputs x and y is not being taken properly to calculatej
.