def toy_poisson_rbf_1d_laplace(optimize=True, plot=True):
optimizer='<STR_LIT>'<EOL>x_len = <NUM_LIT:100><EOL>X = np.linspace(<NUM_LIT:0>, <NUM_LIT:10>, x_len)[:, None]<EOL>f_true = np.random.multivariate_normal(np.zeros(x_len), GPy.kern.RBF(<NUM_LIT:1>).K(X))<EOL>Y = np.array([np.random.poisson(np.exp(f)) for f in f_true])[:,None]<EOL>kern = GPy.kern.RBF(<NUM_LIT:1>)<EOL>poisson_lik = GPy.likelihoods.Poisson()<EOL>laplace_inf = GPy.inference.latent_function_inference.Laplace()<EOL>m = GPy.core.GP(X, Y, kernel=kern, likelihood=poisson_lik, inference_method=laplace_inf)<EOL>if optimize:<EOL><INDENT>m.optimize(optimizer)<EOL><DEDENT>if plot:<EOL><INDENT>m.plot()<EOL>pb.plot(X, np.exp(f_true), '<STR_LIT>', linewidth=<NUM_LIT:2>)<EOL><DEDENT>return m<EOL>
Run a simple demonstration of a standard Gaussian process fitting it to data sampled from an RBF covariance.