Added rbf_inv.py kernel which is parametrised with the variances

This commit is contained in:
Andreas 2013-07-15 20:12:54 +01:00
parent 98318a3fdd
commit ea4599f1d0
2 changed files with 18 additions and 0 deletions

View file

@ -5,6 +5,23 @@ import numpy as np
from kern import kern
import parts
def rbf_inv(input_dim,variance=1., inv_lengthscale=None,ARD=False):
"""
Construct an RBF kernel
:param input_dim: dimensionality of the kernel, obligatory
:type input_dim: int
:param variance: the variance of the kernel
:type variance: float
:param lengthscale: the lengthscale of the kernel
:type lengthscale: float
:param ARD: Auto Relevance Determination (one lengthscale per dimension)
:type ARD: Boolean
"""
part = parts.rbf_inv.RBFInv(input_dim,variance,inv_lengthscale,ARD)
return kern(input_dim, [part])
def rbf(input_dim,variance=1., lengthscale=None,ARD=False):
"""
Construct an RBF kernel

View file

@ -20,3 +20,4 @@ import spline
import symmetric
import white
import hierarchical
import rbf_inv