def __init__(self, distribution, n=200, kernel=GaussianKernel(3), nu2=0.1, \ gamma=0.1, ell=15, nXs=100, nYs=100): self.kernel = kernel self.distribution = distribution self.nu2 = nu2 self.gamma = gamma self.ell = ell # fix some samples self.Z = self.distribution.sample(n).samples # evaluate and center kernel and scale self.K = self.kernel.kernel(self.Z, None) self.K = Kernel.center_kernel_matrix(self.K) # sample beta self.rkhs_gaussian = Gaussian(mu=zeros(len(self.Z)), Sigma=self.K, is_cholesky=False, \ ell=self.ell) self.beta = self.rkhs_gaussian.sample().samples # plotting resolution [(xmin, xmax), (ymin, ymax)] = self.distribution.get_plotting_bounds() self.Xs = linspace(xmin, xmax, nXs) self.Ys = linspace(ymin, ymax, nYs)