Skip to main content

EvoCov

GPlib extension to learn the kernel function.

Setup evocov

  • Create and activate venv

    python3 -m venv .env
    
    source .env/bin/activate
    
  • Upgrade pip

    python -m pip install --upgrade pip
    
  • Install EvoCov package

    python -m pip install evocov
    

Use EvoCov

  • Import EvoCov and GPlib to use it in your python script.

    import gplib
    import evocov
    
  • Configure the fitting method.

    lml = gplib.me.LML()
    bic = gplib.me.BIC()
    
    fitting_method = evocov.fit.EvoCov(
        obj_fun=bic.fold_measure,
        max_fun_call=25000,
        nested_fit_method=gplib.fit.MultiStart(
            obj_fun=lml.fold_measure,
            max_fun_call=250,
            nested_fit_method=gplib.fit.LocalSearch(
                obj_fun=lml.fold_measure,
                method="Powell",
                max_fun_call=100
            )
        )
    )
    
  • Initialize the GP with None covariance function.

    gp = gplib.GP(
        mean_function=gplib.mea.Fixed(),
        covariance_function=fitting_method.get_random_kernel()
    )
    
  • Generate some random data.

    import numpy as np
    data = {
      'X': np.arange(3, 8, 1.)[:, None],
      'Y': np.random.uniform(0, 2, 5)[:, None]
    }
    
  • Fit the kernel and the hyperparameters to the training set.

    validation = gplib.vm.Full()
    
    log = fitting_method.fit(gp, validation.get_folds(
        data
    ))
    
  • Finally plot the posterior GP.

    posterior_gp = gp.get_posterior(data)
    gplib.plot.gp_1d(posterior_gp, data, n_samples=10)
    
  • There are more examples in examples/ directory. Check them out!

Develop EvoCov

  • Update API documentation

    source ./.env/bin/activate
    pip install Sphinx
    cd docs/
    sphinx-apidoc -f -o ./ ../evocov
    

Metadata

Release files for evocov 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for evocov 0.2.0
File Size Uploaded Provenance Actions
evocov-0.2.0.tar.gz 38.0 kB Without provenance Details for evocov-0.2.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for evocov 0.2.0
File Interpreter ABI Platform Actions
evocov-0.2.0-py3-none-any.whl Python 3 none any Details for evocov-0.2.0-py3-none-any.whl

Total release size: 89.9 kB

Release files / evocov-0.2.0.tar.gz

Download URL evocov-0.2.0.tar.gz
Size 38.0 kB
Tags Source
SHA-256 checksum
How to use checksums
29367388b99de56cfe9da30c4c18ae5267ccc2f91465fa7b6aaf4b257ed97e9a
BLAKE2b-256 checksum
How to use checksums
5c909f69b9ddc11d23f9567f193485f4f7e1a0d167768143c2645c22780450a4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.5

Release files / evocov-0.2.0-py3-none-any.whl

Download URL evocov-0.2.0-py3-none-any.whl
Size 52.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
3aebb651cf5878056b4bed8b939122905edd50acfca1aa63b15fcfc9aef00189
BLAKE2b-256 checksum
How to use checksums
d71f0239aff7cea4def1a8453409010e037fbc3cc0d29deaa55c45f5ab1415a8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.5

Security for evocov 0.2.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page