def useInference(self, newInf): if newInf == "Laplace": self.inffunc = inf.FITC_Laplace() elif newInf == "EP": self.inffunc = inf.FITC_EP() else: raise Exception('Possible inf values are "Laplace", "EP".')
def __init__(self): super(GPC_FITC, self).__init__() self.meanfunc = mean.Zero() # default prior mean self.covfunc = cov.RBF() # default prior covariance self.likfunc = lik.Erf() # erf liklihood self.inffunc = inf.FITC_EP() # default inference method self.optimizer = opt.Minimize(self) # default optimizer self.u = None # no default inducing points
def useLikelihood(self, newLik): ''' Use another inference techinique other than default Gaussian likelihood. :param str newLik: 'Laplace' ''' if newLik == "Laplace": self.likfunc = lik.Laplace() self.inffunc = inf.FITC_EP() else: raise Exception('Possible lik values are "Laplace".')
def useInference(self, newInf): ''' Use another inference techinique other than default exact inference. :param str newInf: 'Laplace' or 'EP' ''' if newInf == "Laplace": self.inffunc = inf.FITC_Laplace() elif newInf == "EP": self.inffunc = inf.FITC_EP() else: raise Exception('Possible inf values are "Laplace", "EP".')
def useLikelihood(self, newLik): if newLik == "Laplace": self.likfunc = lik.Laplace() self.inffunc = inf.FITC_EP() else: raise Exception('Possible lik values are "Laplace".')