mirror of
https://github.com/SheffieldML/GPy.git
synced 2026-05-13 05:52:38 +02:00
Added rbf_inv.py kernel which is parametrised with the variances
This commit is contained in:
parent
98318a3fdd
commit
ea4599f1d0
2 changed files with 18 additions and 0 deletions
|
|
@ -5,6 +5,23 @@ import numpy as np
|
||||||
from kern import kern
|
from kern import kern
|
||||||
import parts
|
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):
|
def rbf(input_dim,variance=1., lengthscale=None,ARD=False):
|
||||||
"""
|
"""
|
||||||
Construct an RBF kernel
|
Construct an RBF kernel
|
||||||
|
|
|
||||||
|
|
@ -20,3 +20,4 @@ import spline
|
||||||
import symmetric
|
import symmetric
|
||||||
import white
|
import white
|
||||||
import hierarchical
|
import hierarchical
|
||||||
|
import rbf_inv
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue