mirror of
https://github.com/SheffieldML/GPy.git
synced 2026-05-02 08:12:39 +02:00
minor fixes in kerns
This commit is contained in:
parent
931a3525bc
commit
61a6086af6
3 changed files with 3 additions and 2 deletions
|
|
@ -2,9 +2,9 @@ from _src.rbf import RBF
|
||||||
from _src.white import White
|
from _src.white import White
|
||||||
from _src.kern import Kern
|
from _src.kern import Kern
|
||||||
from _src.linear import Linear
|
from _src.linear import Linear
|
||||||
|
from _src.bias import Bias
|
||||||
from _src.brownian import Brownian
|
from _src.brownian import Brownian
|
||||||
from _src.stationary import Exponential, Matern32, Matern52, ExpQuad
|
from _src.stationary import Exponential, Matern32, Matern52, ExpQuad
|
||||||
#from _src.bias import Bias
|
|
||||||
#import coregionalize
|
#import coregionalize
|
||||||
#import exponential
|
#import exponential
|
||||||
#import eq_ode1
|
#import eq_ode1
|
||||||
|
|
|
||||||
|
|
@ -5,6 +5,7 @@
|
||||||
from kern import Kern
|
from kern import Kern
|
||||||
from ...core.parameterization import Param
|
from ...core.parameterization import Param
|
||||||
from ...core.parameterization.transformations import Logexp
|
from ...core.parameterization.transformations import Logexp
|
||||||
|
import numpy as np
|
||||||
|
|
||||||
class Bias(Kern):
|
class Bias(Kern):
|
||||||
def __init__(self,input_dim,variance=1.,name=None):
|
def __init__(self,input_dim,variance=1.,name=None):
|
||||||
|
|
|
||||||
|
|
@ -18,7 +18,7 @@ class Stationary(Kern):
|
||||||
lengthscale = np.ones(1)
|
lengthscale = np.ones(1)
|
||||||
else:
|
else:
|
||||||
lengthscale = np.asarray(lengthscale)
|
lengthscale = np.asarray(lengthscale)
|
||||||
assert lengthscale.size == 1 "Only lengthscale needed for non-ARD kernel"
|
assert lengthscale.size == 1, "Only lengthscale needed for non-ARD kernel"
|
||||||
else:
|
else:
|
||||||
if lengthscale is not None:
|
if lengthscale is not None:
|
||||||
lengthscale = np.asarray(lengthscale)
|
lengthscale = np.asarray(lengthscale)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue