Skip to main content

2D GP fitting using Kronecker product

Project description

gpkron

A simple and fast 2D gaussian process fitting using Kronecker product.

same shape

    from gpkron.gp2d import GP2D, RBF, Matern32
    import numpy as np
    Nx = 128; Ny = 256
    xgrid = np.linspace(0, Nx, Nx)
    ygrid = np.linspace(0, Ny, Ny)
    sigma = 0.2
    Dmat = np.sin(xgrid[:, np.newaxis]/20) * np.sin(ygrid[np.newaxis, :]/20) + \
        np.random.randn(Nx, Ny)*sigma
    Dprer = GP2D(Dmat, RBF, sigma, (20., 20.))
    Dprem = GP2D(Dmat, Matern32, sigma, (40., 40.))

sample

different shape

    from gpkron.gp2d import GP2D, RBF, Matern32
    import numpy as np
    Nx = 16; Ny = 32
    pshape=(64,128)

    xgrid = np.linspace(0, Nx, Nx)
    ygrid = np.linspace(0, Ny, Ny)
    sigma = 0.2
    Dmat = np.sin(xgrid[:, np.newaxis]/4) * np.sin(ygrid[np.newaxis, :]/4) + \
        np.random.randn(Nx, Ny)*sigma
    Dprer = GP2D(Dmat, RBF, sigma, (20., 20.), pshape=pshape)
    Dprem = GP2D(Dmat, Matern32, sigma, (40., 40.), pshape=pshape)

sample

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

gpkron-0.0.1-py3.8.egg (4.4 kB view hashes)

Uploaded Source

gpkron-0.0.1-py2.py3-none-any.whl (3.6 kB view hashes)

Uploaded Python 2 Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page