Skip to main content

Autonomous data acquisition

Project description

gpCAM

PyPI Documentation Status gpCAM CI Codecov PyPI - License DOI

gpCAM (gpcam.lbl.gov) is an API and software designed to make advanced Gaussian Process function approximation and autonomous data acquisition/Bayesian Optimization for experiments and simulations more accurate, faster, simpler, and more widely available. The tool is based on a flexible and powerful Gaussian process regression at the core. The flexibility stems from the modular design of gpCAM which allows the user to implement and import their own Python functions to customize and control almost every aspect of the software. That makes it possible to easily tune the algorithm to account for various kinds of physics and other domain knowledge and to identify and find interesting features, in Euclidean and non-Euclidean spaces. A specialized function optimizer in gpCAM can take advantage of HPC architectures for fast analysis time and reactive autonomous data acquisition. gpCAM broke a 2019 record for the largest exact GP ever run! Below you can see a simple example of how to set up an autonomous experimentation loop.

Usage

The following demonstrates a simple usage of the gpCAM API (see interactive demo).

!pip install gpcam

from gpcam.autonomous_experimenter import AutonomousExperimenterGP
import numpy as np

def instrument(data):
    for entry in data:
        entry["y_data"] = np.sin(np.linalg.norm(entry["x_data"]))
        entry["noise variance"] = 0.01
    return data

##set up your parameter space
parameters = np.array([[3.0,45.8],
                       [4.0,47.0]])

##set up some hyperparameters, if you have no idea, set them to 1 and make the training bounds large
init_hyperparameters = np.array([1,1,1])
hyperparameter_bounds =  np.array([[0.01,100],[0.01,100.0],[0.01,100]])

##let's initialize the autonomous experimenter ...
my_ae = AutonomousExperimenterGP(parameters, init_hyperparameters,
                                 hyperparameter_bounds,instrument_function = instrument,  
                                 init_dataset_size=10, info=False)
#...train...
my_ae.train()

#...and run. That's it. You successfully executed an autonomous experiment.
my_ae.go(N = 100)

Credits

Main Developer: Marcus Noack (MarcusNoack@lbl.gov) Many people from across the DOE national labs (especially BNL) have given insights that led to the code in it's current form. See AUTHORS for more details on that.

Project details


Download files

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

Source Distribution

gpcam-8.1.5.tar.gz (57.5 kB view details)

Uploaded Source

Built Distribution

gpcam-8.1.5-py3-none-any.whl (59.1 kB view details)

Uploaded Python 3

File details

Details for the file gpcam-8.1.5.tar.gz.

File metadata

  • Download URL: gpcam-8.1.5.tar.gz
  • Upload date:
  • Size: 57.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.0 CPython/3.12.5

File hashes

Hashes for gpcam-8.1.5.tar.gz
Algorithm Hash digest
SHA256 b234b45e58d8486280397f154f054f1cbb4bc8ad10e2adeb7ccc00413f1254bc
MD5 a6d7580cee2e57c7fb28cfb9f87fced1
BLAKE2b-256 63fd64dae4ecc1f3f255915e2fcc0b6fbf6cefbb3dcdbdbb75cc3e8730ca7c58

See more details on using hashes here.

Provenance

File details

Details for the file gpcam-8.1.5-py3-none-any.whl.

File metadata

  • Download URL: gpcam-8.1.5-py3-none-any.whl
  • Upload date:
  • Size: 59.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.0 CPython/3.12.5

File hashes

Hashes for gpcam-8.1.5-py3-none-any.whl
Algorithm Hash digest
SHA256 e262e0b503915ecb72a1877acfc3f33cdc85ac540958fc1881118fb6eb8ec3e0
MD5 6bc6f7b32acb271acaabc2edd7af0e59
BLAKE2b-256 2bcc43899047c01e338e1f9169fa20ad81bbe2a893684ccedabf7893ff42b9d5

See more details on using hashes here.

Provenance

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