autoemulate
Simulations of physical systems are often slow and need lots of compute, which makes them unpractical for applications like digital twins, or in situations where they have to run thousands of times, like 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 very early development.
setup
using Poetry:
git clone https://github.com/alan-turing-institute/autoemulate.git
cd autoemulate
poetry install
poetry shell
quick start
import numpy as np
from autoemulate.compare import AutoEmulate
from autoemulate.experimental_design import LatinHypercube
from autoemulate.demos.projectile import simulator
# sample from a simulation
lhd = LatinHypercube([(-5., 1.), (0., 1000.)])
X = lhd.sample(100)
y = np.array([simulator(x) for x in X])
# compare emulator models
ae = AutoEmulate()
ae.setup(X, y)
ae.compare()
# evaluate
ae.print_results()
# save & load best model
ae.save_model("best_model")
best_emulator = ae.load_model("best_model")
# emulate
best_emulator.predict(X)
Contributors
Kalle Westerling 📖 💻 🖋 |
Bryan M. Li 💻 |
martin 💻 🤔 📖 🚧 🔬 👀 |
Eric Daub 🤔 📆 👀 💻 |
steven niederer 🤔 🖋 📆 |