Adaptive multi-index stochastic collocation (surrogates) for metamodeling of multidisciplinary systems
Project description
Efficient framework for building surrogates of multidisciplinary systems. Uses the adaptive multi-index stochastic collocation (AMISC) technique.
Installation
We highly recommend using pdm:
pip install --user pdm
pdm add amisc
However, you can also install normally:
pip install amisc
To install from an editable local directory (e.g. for development), first fork the repo and then:
git clone https://github.com/<your-username>/amisc.git
pdm add -e ./amisc --dev # or..
pip install -e ./amisc # similarly
This way you can make changes to amisc
locally while working on some other project for example.
You can also quickly set up a dev environment with:
git clone https://github.com/<your-username>/amisc.git
cd amisc
pdm sync # reads pdm.lock and sets up an identical venv
Quickstart
from amisc.surrogates import SystemSurrogate
from amisc.utils import UniformRV
import numpy as np
def fun1(x):
return x ** 2
def fun2(y):
return np.sin(y) * np.exp(y)
x, y, z = UniformRV(0, 1, 'x'), UniformRV(0, 1, 'y'), UniformRV(0, 1, 'z')
model1 = {'name': 'model1', 'model': fun1, 'exo_in': ['x'], 'coupling_out': ['y']}
model2 = {'name': 'model2', 'model': fun2, 'coupling_in': ['y'], 'coupling_out': ['z']}
system = SystemSurrogate([model1, model2], [x], [y, z])
system.fit()
xtest = system.sample_inputs(10)
ytest = system.predict(xtest)
Contributing
See the contribution guidelines.
Reference
AMISC paper [1].
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
amisc-0.0.7.tar.gz
(27.8 kB
view hashes)
Built Distribution
amisc-0.0.7-py3-none-any.whl
(27.4 kB
view hashes)