Autonomous data acquisition
Project description
gpCAM
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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file gpcam-8.1.9.tar.gz
.
File metadata
- Download URL: gpcam-8.1.9.tar.gz
- Upload date:
- Size: 57.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 504ff09ba6305bb719e1c549754e7f7f2e6eb492ccd8789b7baf650be7a42136 |
|
MD5 | d4ca4c2f2d4e4ff26156811fd596aa1c |
|
BLAKE2b-256 | eedb672966f77778678d510a2b0a905894102ed8b34a9e48ae282a70ff82dab7 |
File details
Details for the file gpcam-8.1.9-py3-none-any.whl
.
File metadata
- Download URL: gpcam-8.1.9-py3-none-any.whl
- Upload date:
- Size: 58.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 19f5d1fcddcb35f7ef90e7ed295238408c7b090d2e0b9faeb9d470c5672da226 |
|
MD5 | 369e6180693144b827ad171befcaaabc |
|
BLAKE2b-256 | 748fe600c9eb5833a095fa81ede0b69272376b679c380932bb11785954f928e8 |