mirror of
https://github.com/SheffieldML/GPy.git
synced 2026-05-09 12:02:38 +02:00
added fixed effect kernel
This commit is contained in:
parent
e812368a87
commit
6da0feb7fc
4 changed files with 68 additions and 1 deletions
|
|
@ -12,6 +12,7 @@ from exponential import exponential as exponentialpart
|
|||
from Matern32 import Matern32 as Matern32part
|
||||
from Matern52 import Matern52 as Matern52part
|
||||
from bias import bias as biaspart
|
||||
from fixed import fixed as fixedpart
|
||||
from finite_dimensional import finite_dimensional as finite_dimensionalpart
|
||||
from spline import spline as splinepart
|
||||
from Brownian import Brownian as Brownianpart
|
||||
|
|
@ -296,3 +297,16 @@ def rational_quadratic(D,variance=1., lengthscale=1., power=1.):
|
|||
"""
|
||||
part = rational_quadraticpart(D,variance, lengthscale, power)
|
||||
return kern(D, [part])
|
||||
|
||||
def fixed(D, K, variance=1.):
|
||||
"""
|
||||
Construct a fixed effect kernel.
|
||||
|
||||
Arguments
|
||||
---------
|
||||
D (int), obligatory
|
||||
K (np.array), obligatory
|
||||
variance (float)
|
||||
"""
|
||||
part = fixedpart(D, K, variance)
|
||||
return kern(D, [part])
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue