remove white kernel in new GPR

This commit is contained in:
bohanjason 2019-11-29 20:21:11 -05:00 committed by Dana Van Aken
parent 5654d23637
commit fd7f111c26
1 changed files with 4 additions and 12 deletions

View File

@ -98,10 +98,7 @@ class BasicGP(BaseModel):
[
'GPRC/kern/kernels/0/variance',
'GPRC/kern/kernels/0/lengthscales',
],
[
'GPRC/kern/kernels/1/variance',
],
]
]
def _get_kernel_kwargs(self, **kwargs):
@ -110,19 +107,14 @@ class BasicGP(BaseModel):
{
'input_dim': X_dim,
'ARD': False
},
{
'input_dim': X_dim,
},
}
]
def _build_kernel(self, kernel_kwargs, **kwargs):
k0 = gpflow.kernels.Exponential(**kernel_kwargs[0])
k1 = gpflow.kernels.White(**kernel_kwargs[1])
k = gpflow.kernels.Exponential(**kernel_kwargs[0])
if kwargs.pop('optimize_hyperparameters'):
k0.lengthscales.transform = gpflow.transforms.Logistic(
k.lengthscales.transform = gpflow.transforms.Logistic(
*self._LENGTHSCALE_BOUNDS)
k = k0 + k1
return k