336f8e11c48bb4e749b9f389907c450e44f02786,GPy/examples/regression.py,,toy_poisson_rbf_1d_laplace,#Any#Any#,294

Before Change


    Run a simple demonstration of a standard Gaussian process fitting it to data sampled from an RBF covariance.
    X = np.linspace(0,10)[:, None]
    F = np.round(X*3-4)
    F = np.where(F > 0, F, 0)
    eps = np.random.randint(0,4, F.shape[0])[:, None]
    Y = F + eps

    noise_model = GPy.likelihoods.poisson()
    likelihood = GPy.likelihoods.Laplace(Y,noise_model)

After Change



def toy_poisson_rbf_1d_laplace(optimizer="bfgs", max_nb_eval_optim=100):
    Run a simple demonstration of a standard Gaussian process fitting it to data sampled from an RBF covariance.
    x_len = 30
    X = np.linspace(0, 10, x_len)[:, None]
    f_true = np.random.multivariate_normal(np.zeros(x_len), GPy.kern.rbf(1).K(X))
    Y = np.array([np.random.poisson(np.exp(f)) for f in f_true])[:,None]

    noise_model = GPy.likelihoods.poisson()
    likelihood = GPy.likelihoods.Laplace(Y,noise_model)

    // create simple GP Model
    m = GPy.models.GPRegression(X, Y, likelihood=likelihood)

    // optimize
    m.optimize(optimizer, max_f_eval=max_nb_eval_optim)
    // plot
    m.plot()
    // plot the real underlying rate function
    pb.plot(X, np.exp(f_true), "--k", linewidth=2)
    print(m)
    return m
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

Non-data size: 6

Instances


Project Name: SheffieldML/GPy
Commit Name: 336f8e11c48bb4e749b9f389907c450e44f02786
Time: 2013-10-28
Author: alan.daniel.saul@gmail.com
File Name: GPy/examples/regression.py
Class Name:
Method Name: toy_poisson_rbf_1d_laplace


Project Name: SheffieldML/GPy
Commit Name: 0c248e752052e18d2467d0e95f07046a666ae817
Time: 2017-03-22
Author: morepabl@amazon.com
File Name: GPy/likelihoods/bernoulli.py
Class Name: Bernoulli
Method Name: moments_match_ep


Project Name: SheffieldML/GPy
Commit Name: 336f8e11c48bb4e749b9f389907c450e44f02786
Time: 2013-10-28
Author: alan.daniel.saul@gmail.com
File Name: GPy/examples/regression.py
Class Name:
Method Name: toy_poisson_rbf_1d


Project Name: SheffieldML/GPy
Commit Name: 63751de9127ab46ab0374507338e89cd3a1be78f
Time: 2017-06-01
Author: morepabl@amazon.com
File Name: GPy/likelihoods/bernoulli.py
Class Name: Bernoulli
Method Name: moments_match_ep