dfm / george

Fast and flexible Gaussian Process regression in Python
http://george.readthedocs.io
MIT License
450 stars 128 forks source link

Non logarithmic-only parameters #126

Closed stefanocovino closed 4 years ago

stefanocovino commented 4 years ago

Dear friends,

I am modelling a problem with the sum of two kernel functions, e.f. AK1 + BK2, and I would be interested to know the how far from zero B is. However, within George, B is just a constant kernel and the parameter is always logarithmic. Is there a way to avoid this behaviour?

Thanks for the attention.

Stefano

dfm commented 4 years ago

You'll need to implement this using a custom kernel: https://george.readthedocs.io/en/latest/tutorials/new-kernel/

Make sure that you can demonstrate that it's positive definite!

stefanocovino commented 4 years ago

Hello Dan,

Thanks a lot. For my specific problem is enough that B >= 0. So it should be a fair kernel. In general, running George, is there a warning or an error if the positive definite condition is not met?

Bye, Stefano

dfm commented 4 years ago

In that case, just make your lower bound log(1e-15) or something and it'll work just fine. 1e-15 is zero!

George will throw an error if there are numerical issues, but that isn't the same as using a valid positive definite kernel!

stefanocovino commented 4 years ago

Thanks, Stefano