Simulations of physical systems are often slow and need lots of compute, which makes them unpractical for applications like digital twins, or when they have to run thousands of times to do uncertainty quantification or sensitivity analyses. The goal of AutoEmulate
is to make it easy to replace simulations with fast, accurate emulators. To do this, AutoEmulate
automatically fits and compares lots of models, like Radial Basis Functions, Gaussian Processes or Neural Networks to find the best emulator for a simulation.
The project is in early development.
development version from GitHub:
pip install git+https://github.com/alan-turing-institute/autoemulate.git
or for contributors using Poetry:
git clone https://github.com/alan-turing-institute/autoemulate.git
cd autoemulate
poetry install
poetry shell
import numpy as np
from autoemulate.compare import AutoEmulate
from autoemulate.experimental_design import LatinHypercube
from autoemulate.simulations.projectile import simulate_projectile
# sample from a simulation
lhd = LatinHypercube([(-5., 1.), (0., 1000.)])
X = lhd.sample(100)
y = np.array([simulate_projectile(x) for x in X])
# compare emulator models
ae = AutoEmulate()
ae.setup(X, y)
best_model = ae.compare()
# training set cross-validation results
ae.print_results()
# test set results for the best model
ae.evaluate_model(best_model)
# refit on full data
best_emulator = ae.refit_model(best_model)
# emulate
best_emulator.predict(X)
You can find tutorials, FAQs and the API reference here. The documentation is still work in progress.
Kalle Westerling 📖 💻 🖋 |
Bryan M. Li 💻 |
martin 💻 🤔 📖 🚧 🔬 👀 |
Eric Daub 🤔 📆 👀 💻 |
steven niederer 🤔 🖋 📆 |