Implement periodic kernel (isotropic and ARD).

#7 Open

Bitbucket cannot automatically merge this request.

The commits that make up this pull request have been removed.

Bitbucket cannot automatically merge this request due to conflicts.

Review the conflicts on the Overview tab. You can then either decline the request or merge it manually on your local system using the following commands:

hg update default
hg pull -r default
hg merge 94c978de4652
hg commit -m 'Merged in kiudee/bayesopt (pull request #7)'
  1. kiudee

This is the first implementation of the periodic kernel proposed in issue #5:


Testing it with a few periodic test functions utilizing the mcmc sampler, the kernel fits them often perfectly after having observed a few (~15 in 1D) datapoints. But often the predicted function can vary wildly in the beginning. I would guess that this behaviour results from the low amount of samples the mcmc sampler collects.

I chose to provide the following parameters:

  • The periodicity p (ISO: params(1), ARD: params(0) to params(n_inputs - 1)) and
  • The length scale l (ISO: params(0), ARD: params(n_inputs) to params(2 * n_inputs - 1))

Let me know if you find something which could be improved.

  • Issues #5: Periodic Kernel closed

Comments (1)

  1. Ruben Martinez repo owner

    Thanks for the contribution!

    Looking at the literature, the most common way of periodic kernel is equation (4.31) of Rassmusen and Williams That's a totally different kernel. This one is stationary (although your implementation miss the norm part) and RW is non-stationary.

    Just a couple of details of implementation: - The order of parameters should be consistent. For 1D, ARD and ISO should be equivalent. For consistency with other kernels, the scale should go always first. - The parameter should be l, not l^2. - This is a header file. Put the constant pi in a local scope (e.g.: inside the operator) and never outside the namespace. - I haven't found a periodic kernel with ARD in any paper, but having a different "p" and "l" per dimension can be problematic. RW version is trivial to implement as ARD because it's a just modified SE kernel.