Arby
Arby is a fully data-driven Python module to construct surrogate models, reduced bases and empirical interpolants from training data.
This package implements a type of Reduced Order Modeling technique for reducing the computational complexity of mathematical models in numerical simulations. This is done by building a surrogate model for the underlying model using only a training set of samples.
Install
From PyPI repo
pip install arby
For the latest version, clone this repo locally and from inside do
pip install -e .
or instead
pip install -e git+https://github.com/aaronuv/arby
Quick Usage
Suppose we have a set of real functions parametrized by a real number λ. This set, the training set, represents an underlying parametrized model fλ(x) with continuous dependency in λ. Without a complete knowledge about fλ(x), we'd like to produce an accurate approximation to the ground truth only through access to the training set.
With Arby we can do this by building a surrogate model. For simplicity,
suppose a discretization of the parameter domain [par_min, par_max] with Ntrain samples
indexing the training set
params = np.linspace(par_min, par_max, Ntrain)
and a discretization of the x domain [a,b] in Nsamples points
x_samples = np.linspace(a, b, Nsamples)
Next, we build a training set
training_set = [f(par, x_samples) for par in params]
that has shape (Ntrain,Nsamples).
Finally, we build the surrogate model by executing:
from arby import ReducedOrderModel as ROM
f_model = ROM(training_set=training_set,
physical_points=x_samples,
parameter_points=params)
With f_model we get function samples for any parameter par in the
interval [par_min, par_max] simply by calling it:
f_model_at_par = f_model.surrogate(par)
plt.plot(x_samples, f_model_at_par)
plt.show()
Documentation
For more details and examples check the read the docs.
License
MIT
Contact Us
(c) 2020 Aarón Villanueva
Metadata
Release files for arby 1.0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| arby-1.0.2.tar.gz | 13.5 kB | Without provenance | Details for arby-1.0.2.tar.gz |
Release files / arby-1.0.2.tar.gz
| Download URL | arby-1.0.2.tar.gz |
|---|---|
| Size | 13.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
01326da2951d167b136a7200c0d58f1bc2b8c9a549c635716f063d06ac28b8f8
|
|
BLAKE2b-256 checksum How to use checksums |
db5c38c218ee9b01175a4207d86de1ac5353fbe7937d0ceac07b31372d270893
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.7.1 importlib_metadata/4.8.2 pkginfo/1.8.2 requests/2.24.0 requests-toolbelt/0.9.1 tqdm/4.52.0 CPython/3.8.0
|
Security for arby 1.0.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.