Gaussian process emulator for creating synthetic model data across high dimensional parameter spaces, initially developed for use with the SWIFT simulation code.
Project description
SWIFT Emulator
The SWIFT emulator (henceforth 'the emulator') was initially designed for SWIFT outputs, and includes utilities to read and write SWIFT data.
The emulator can be used used to predict
outputs of simulations without having to run them, by employing Gaussian Process
Regression with george
and sensitivity analysis with SALib
.
Dcumentation is available at ReadTheDocs.
Predicting Simulations
The emulator can predict a given scaling relation (the relationship between two output variables in a simulation, for instance the masses of galaxies and their size) when varying the underlying physical model simulated in a continuous way.
As an example from cosmological simulations, imagine varing the energy that supernovae
release when they explode as a parameter x
. This affects both the sizes and masses of galaxies.
The emulator, using a few 'base' simulations, performed with the real code,
at various values of x
spaced evenly throughout the viable region, can predict
what the shape of the relationship between mass and size would be at other values
of x
, given that it has been trained on the base simulation outputs.
Why SWIFT Emulator?
The emulator works at a much higher level than other Gaussian Process Regression
libraries, such as george
(which it is built on).
Working with base machine learning libraries can be tricky, as it typically requries knowledge of how to structure input arrays in a specific way (both for training and prediction). They also rarely also include model design routines. Additionally, validation and visualisation routines are typically missing.
The SWIFT Emulator package provides a one-stop solution, with a consistent API, for developing a model design, running it (if using SWIFT), reading in data ( again if using SWIFT), building an emulation model, validating said model, comparing the model against ground-truth data across parameter space (e.g. observations), and visualising the results.
Installation
The package can be installed easily from PyPI under the name swiftemulator
,
so:
pip3 install swiftemulator
This will install all necessary dependencies.
The package can be installed from source, by cloning the repository and
then using pip install -e .
for development purposes.
Requirements
The package requires a number of numerical and experimental design packages.
These have been tested (and are continuously tested) using GitHub actions CI
to use the latest versions available on PyPI. See requirements.txt
for
details for the packages required to develop SWIFT Emulator. The packages
will be installed automatically by pip
when installing from PyPI.
Authors
- Roi Kugel (@Moyoxkit)
- Josh Borrow (@jborrow)
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
Built Distribution
Hashes for swiftemulator-1.0.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7d6a398d66bf175f6e9e9ef5a5ec3dc069ca27d37b7a965b43a0af843ef58f8a |
|
MD5 | fec1101354c03b5f0a086bb21c8d6a70 |
|
BLAKE2b-256 | 2dd4bbba11980b02b795e0ddbd5e2847723ffc3e773009034794bdb8d252041f |