def __init__(self): super(GPR, self).__init__() self.meanfunc = mean.Zero() # default prior mean self.covfunc = cov.RBF() # default prior covariance self.likfunc = lik.Gauss() # likihood with default noise variance 0.1 self.inffunc = inf.Exact() # inference method self.optimizer = opt.Minimize(self) # default optimizer
def __init__(self, *data, **kwargs): super(GPR, self).__init__(*data, **kwargs) self.mean = kwargs.get('mean', mean.Const(self.samples.y.mean())) self.cov = kwargs.get('cov', cov.RBF()) self.lik = kwargs.get('lik', lik.Gauss()) self.inf = kwargs.get('inf', inf.Exact()) self.optimizer = kwargs.get('optimizer', opt.Minimize)(self)