code
stringlengths
3
6.57k
__repr__(self)
str(type(self)
setData(self, x, y)
shape (n,D)
shape (n,1)
np.reshape(x, (x.shape[0],1)
np.reshape(y, (y.shape[0],1)
np.mean(y)
mean.Const(c)
plotData_1d(self, axisvals=None)
plt.figure()
plt.plot(self.x, self.y, ls='None', marker='+', color=DATACOLOR, ms=12, mew=2)
plt.axis(axisvals)
plt.grid()
plt.xlabel('input x')
plt.ylabel('target y')
plt.show()
plotData_2d(self,x1,x2,t1,t2,p1,p2,axisvals=None)
plt.contour(t1, t2, p2/(p1+p2)
are (only)
plt.figure()
plt.plot(x1[:,0], x1[:,1], 'b+', markersize = 12)
plt.plot(x2[:,0], x2[:,1], 'r+', markersize = 12)
plt.contour(t1, t2, np.reshape(old_div(p2,(p1+p2)
fig.colorbar(pc)
plt.grid()
plt.axis(axisvals)
plt.show()
setPrior(self, mean=None, kernel=None)
class. (e.g. mean.Linear()
class. (e.g. cov.RBF()
isinstance(mean, pyGPs.mean.Mean)
isinstance(kernel, pyGPs.cov.Kernel)
type(kernel)
setOptimizer(self, method, num_restarts=None, min_threshold=None, meanRange=None, covRange=None, likRange=None)
Rasmussen (python implementation of "minimize" in GPML)
Shanno (BFGS)
gradient (faster than CG)
range (low, high)
range. (-5,5)
optimize40(self, x=None, y=None, numIterations=40)
shape (n,D)
shape (n,1)
np.reshape(x, (x.shape[0],1)
np.reshape(y, (y.shape[0],1)
np.mean(y)
mean.Const(c)
self.optimizer.findMin(self.x, self.y, numIters = numIterations)
self.optimizer._apply_in_objects(optimalHyp)
self.getPosterior()
optimize(self, x=None, y=None, numIterations=1000)
shape (n,D)
shape (n,1)
np.reshape(x, (x.shape[0],1)
np.reshape(y, (y.shape[0],1)
np.mean(y)
mean.Const(c)
self.optimizer.findMin(self.x, self.y, numIters = numIterations)
self.optimizer._apply_in_objects(optimalHyp)
self.getPosterior()
getPosterior(self, x=None, y=None, der=True)
likelihood(nlZ)
hyperparameter(dnlZ)
the (approximate)
posterior(post)
getPosterior(x, y, der=True)
getPosterior(x, y, der=False )
shape (n,D)
shape (n,1)
likelihood (nlZ)
nlZ (dnlZ)
structure(post)
np.reshape(x, (x.shape[0],1)
np.reshape(y, (y.shape[0],1)
np.mean(y)
mean.Const(c)
isinstance(self.likfunc, lik.Erf)
instance(self.likfunc, lik.Logistic)
unique(self.y)
any( uy[ind] != -1)
Exception('You attempt classification using labels different from {+1,-1}')
self.inffunc.evaluate(self.meanfunc, self.covfunc, self.likfunc, self.x, self.y, 2)
deepcopy(post)
self.inffunc.evaluate(self.meanfunc, self.covfunc, self.likfunc, self.x, self.y, 3)
deepcopy(dnlZ)
deepcopy(post)
predict(self, xs, ys=None)
points (given by xs)
means(ym)
variances(ys2)
means(fm)
variances(fs2)
probabilities(lp)
property. (e.g. model.ym)
target(optional)
np.reshape(xs, (xs.shape[0],1)
np.reshape(ys, (ys.shape[0],1)
self.getPosterior()
list(range(len(alpha[:,0])
len(L)