gpcam


Namegpcam JSON
Version 8.1.2 PyPI version JSON
download
home_pageNone
SummaryAutonomous data acquisition
upload_time2024-06-25 21:51:30
maintainerNone
docs_urlNone
authorNone
requires_python>=3.9
license*** License Agreement *** GPL v3 License gpCAM Copyright (c) 2024, The Regents of the University of California, through Lawrence Berkeley National Laboratory (subject to receipt of any required approvals from the U.S. Dept. of Energy). All rights reserved. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see <https://www.gnu.org/licenses/>. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
keywords adaptive autonomous gui qt self driving
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # gpCAM

[![PyPI](https://img.shields.io/pypi/v/gpCAM)](https://pypi.org/project/gpcam/)
[![Documentation Status](https://readthedocs.org/projects/gpcam/badge/?version=latest)](https://gpcam.readthedocs.io/en/latest/?badge=latest)
[![gpCAM CI](https://github.com/lbl-camera/gpCAM/actions/workflows/gpCAM-CI.yml/badge.svg)](https://github.com/lbl-camera/gpCAM/actions/workflows/gpCAM-CI.yml)
[![Codecov](https://img.shields.io/codecov/c/github/lbl-camera/gpCAM)](https://app.codecov.io/gh/lbl-camera/gpCAM)
[![PyPI - License](https://img.shields.io/badge/license-GPL%20v3-lightgrey)](https://pypi.org/project/gpcam/)
[<img src="https://img.shields.io/badge/slack-@gpCAM-purple.svg?logo=slack">](https://gpCAM.slack.com/)
[![DOI](https://zenodo.org/badge/434768487.svg)](https://zenodo.org/badge/latestdoi/434768487)

[comment]: <> ([![Maintainability]&#40;https://api.codeclimate.com/v1/badges/29b04c3f69e2b515dac6/maintainability&#41;]&#40;https://codeclimate.com/github/lbl-camera/gpCAM/maintainability&#41;)
[comment]: <> (Hiding maintainibility score while starting to address issues)


gpCAM [(gpcam.lbl.gov)](https://gpcam.lbl.gov/home) 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](https://colab.research.google.com/drive/1FU4iKW626XiLqluDXQH-gzPYHyCf9N76?usp=sharing)). 

```python
!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](mailto: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](AUTHORS.rst) for more details on that.



            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "gpcam",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.9",
    "maintainer_email": "Marcus Michael Noack <MarcusNoack@lbl.gov>, \"Ronald J. Pandolfi\" <ronpandolfi@lbl.gov>",
    "keywords": "adaptive, autonomous, gui, qt, self driving",
    "author": null,
    "author_email": "Marcus Michael Noack <MarcusNoack@lbl.gov>, \"Ronald J. Pandolfi\" <ronpandolfi@lbl.gov>",
    "download_url": "https://files.pythonhosted.org/packages/72/e4/fd6fb1b7739146c5f01596b1e8909c55cf53ddaefd9b5420050113a1edfa/gpcam-8.1.2.tar.gz",
    "platform": null,
    "description": "# gpCAM\n\n[![PyPI](https://img.shields.io/pypi/v/gpCAM)](https://pypi.org/project/gpcam/)\n[![Documentation Status](https://readthedocs.org/projects/gpcam/badge/?version=latest)](https://gpcam.readthedocs.io/en/latest/?badge=latest)\n[![gpCAM CI](https://github.com/lbl-camera/gpCAM/actions/workflows/gpCAM-CI.yml/badge.svg)](https://github.com/lbl-camera/gpCAM/actions/workflows/gpCAM-CI.yml)\n[![Codecov](https://img.shields.io/codecov/c/github/lbl-camera/gpCAM)](https://app.codecov.io/gh/lbl-camera/gpCAM)\n[![PyPI - License](https://img.shields.io/badge/license-GPL%20v3-lightgrey)](https://pypi.org/project/gpcam/)\n[<img src=\"https://img.shields.io/badge/slack-@gpCAM-purple.svg?logo=slack\">](https://gpCAM.slack.com/)\n[![DOI](https://zenodo.org/badge/434768487.svg)](https://zenodo.org/badge/latestdoi/434768487)\n\n[comment]: <> ([![Maintainability]&#40;https://api.codeclimate.com/v1/badges/29b04c3f69e2b515dac6/maintainability&#41;]&#40;https://codeclimate.com/github/lbl-camera/gpCAM/maintainability&#41;)\n[comment]: <> (Hiding maintainibility score while starting to address issues)\n\n\ngpCAM [(gpcam.lbl.gov)](https://gpcam.lbl.gov/home) 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.\n\n\n## Usage\n\nThe following demonstrates a simple usage of the gpCAM API (see [interactive demo](https://colab.research.google.com/drive/1FU4iKW626XiLqluDXQH-gzPYHyCf9N76?usp=sharing)). \n\n```python\n!pip install gpcam\n\nfrom gpcam.autonomous_experimenter import AutonomousExperimenterGP\nimport numpy as np\n\ndef instrument(data):\n    for entry in data:\n        entry[\"y_data\"] = np.sin(np.linalg.norm(entry[\"x_data\"]))\n        entry[\"noise variance\"] = 0.01\n    return data\n\n##set up your parameter space\nparameters = np.array([[3.0,45.8],\n                       [4.0,47.0]])\n\n##set up some hyperparameters, if you have no idea, set them to 1 and make the training bounds large\ninit_hyperparameters = np.array([1,1,1])\nhyperparameter_bounds =  np.array([[0.01,100],[0.01,100.0],[0.01,100]])\n\n##let's initialize the autonomous experimenter ...\nmy_ae = AutonomousExperimenterGP(parameters, init_hyperparameters,\n                                 hyperparameter_bounds,instrument_function = instrument,  \n                                 init_dataset_size=10, info=False)\n#...train...\nmy_ae.train()\n\n#...and run. That's it. You successfully executed an autonomous experiment.\nmy_ae.go(N = 100)\n```\n\n\n## Credits\n\nMain Developer: Marcus Noack ([MarcusNoack@lbl.gov](mailto:MarcusNoack@lbl.gov))\nMany people from across the DOE national labs (especially BNL) have given insights\nthat led to the code in it's current form.\nSee [AUTHORS](AUTHORS.rst) for more details on that.\n\n\n",
    "bugtrack_url": null,
    "license": "*** License Agreement ***  GPL v3 License  gpCAM Copyright (c) 2024, The Regents of the University of California, through Lawrence Berkeley National Laboratory (subject to receipt of any required approvals from the U.S. Dept. of Energy). All rights reserved.  This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.  This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more details.  You should have received a copy of the GNU General Public License along with this program.  If not, see <https://www.gnu.org/licenses/>.  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.",
    "summary": "Autonomous data acquisition",
    "version": "8.1.2",
    "project_urls": {
        "Bug Tracker": "https://github.com/lbl-camera/gpcam/issues",
        "Changelog": "https://github.com/lbl-camera/gpcam/commits/master/",
        "Documentation": "https://gpcam.readthedocs.io/",
        "Homepage": "https://gpcam.lbl.gov",
        "Repository": "https://github.com/lbl-camera/gpcam.git"
    },
    "split_keywords": [
        "adaptive",
        " autonomous",
        " gui",
        " qt",
        " self driving"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "0153e8c41e5ed7a86afd05c0730752a80753b6cc008d5769131725a87f05660b",
                "md5": "cf414af8e9740ddd3870b36eb0de2482",
                "sha256": "815b91890e327175aa3d0691347599e199b8169b8b99aecad793535445672348"
            },
            "downloads": -1,
            "filename": "gpcam-8.1.2-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "cf414af8e9740ddd3870b36eb0de2482",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.9",
            "size": 55200,
            "upload_time": "2024-06-25T21:51:28",
            "upload_time_iso_8601": "2024-06-25T21:51:28.011947Z",
            "url": "https://files.pythonhosted.org/packages/01/53/e8c41e5ed7a86afd05c0730752a80753b6cc008d5769131725a87f05660b/gpcam-8.1.2-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "72e4fd6fb1b7739146c5f01596b1e8909c55cf53ddaefd9b5420050113a1edfa",
                "md5": "96e97f4d36d9cd39470dc95bd10c20e9",
                "sha256": "73438083f60c63fa26ff271e774944e2635396625437f58aed4ae2c7fc028647"
            },
            "downloads": -1,
            "filename": "gpcam-8.1.2.tar.gz",
            "has_sig": false,
            "md5_digest": "96e97f4d36d9cd39470dc95bd10c20e9",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.9",
            "size": 53854,
            "upload_time": "2024-06-25T21:51:30",
            "upload_time_iso_8601": "2024-06-25T21:51:30.342022Z",
            "url": "https://files.pythonhosted.org/packages/72/e4/fd6fb1b7739146c5f01596b1e8909c55cf53ddaefd9b5420050113a1edfa/gpcam-8.1.2.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-06-25 21:51:30",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "lbl-camera",
    "github_project": "gpcam",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "requirements": [],
    "tox": true,
    "lcname": "gpcam"
}
        
Elapsed time: 0.28018s