As seen here:
the Matern kernel is not implemented (as marked by TODO). What is the best route for one to take to add this kernel to scikit's library so the GP can use it?
Definition of Matern kernel:
Perhaps a good starting point:
EDIT: To clarify, it is something I'd like to add, and I'm wondering the best way to start such that it would be accepted.
Thanks for your interest.
The best way would to make a pull request that adds test, documentation and the new features.
Then it would be reviewed by 2 people and merged.
I was asking for more specific feedback about where the code should be and what the API should be in terms of inputs and outputs.
In other words what's the desired spec?
We are having serious discussions about this right now. The easiest way forward would be to make a simple function that takes parameters for properly constructing matern kernels, and a few tests to verify the function is correct. If you have the right function, refactoring it to a proper API after a decision is made in #3388 or another upcoming should be easy. That said, I think there will (and should) be some significant changes in the GP module in the very near future.
I am pushing hard for dumb kernels, because I think they are more general and useful.
def matern(x1, x2, param1, param2, param3):
return correlation_matrix (shape x1.shape by x2.shape)
This is simple enough to be useful for anything, including other models that may use the same type of processing. The caller should be responsible for providing two identical matrices if they want autocorrelation in my opinion.
The mattern kernel should be put in the pairwise module.
Closing. The new implementation of gaussian processes (see #4270) now includes the Matern kernel.
See also #3885 for another implementation in the pairwise module.