Skip to main content

Construction of Reduced Models in Python

Project description

Scikit-ReducedModel

logo

https://github.com/leliel12/diseno_sci_sfw Python version Documentation Status

Scikit-ReducedModel CI

Scikit-ReduceModel is a Python package to construct reduced models. This code is an extension of the standard reduced-base framework and provides an efficient and accurate solution for model building. It implements the hp-greedy refinement strategy, an enhancement approach for reduced-base model building. The approach uses a parameter space partitioning, a local reduced basis and a binary tree as the resulting structure, all obtained automatically. The usability of this package is similar to that of the scikit-learn modules. For usage examples, see the documentation.

Motivation

Gravitational waves are generated by extremely complex physical systems where a large number of variables are involved in their modeling, which makes their study and analysis difficult. Reduced models allow simplifying the real physical system through approximations and simplifications, making it easier to analyze and study these systems. In addition, these reduced models also allow for faster and more accurate simulations and analysis of the gravitational waves generated by these systems. This is highly necessary to compare the gravitational wave signals obtained experimentally.

Installation

To install the latest stable version of ScikitReducedModel from PyPI:

pip install skreducedmodel

To install the developer version (may be unstable):

git clone https://github.com/francocerino/scikit-reducedmodel
cd scikit-reducedmodel
pip install .

Quick Usage

In order to construct a reduced model, we require knowledge of a training set (training_set). That is, we need to be familiar with a set of functions parameterized by a real number λ, denoted as :math:f_λ(x).

We need also a distretization of the :math:x (x_set) and of the :math:λ space (param).

Then, we can first built the reduced basis, in this case, we use the default parameters.

from skreducedmodel.reducedbasis import ReducedBasis

rb = ReducedBasis()
rb.fit(training_set = training_set,
       parameters = param
       physical_points = x_set)

The second step is built the empirical interpolator with the reduced basis generated

from skreducedmodel.empiricalinterpolation import EmpiricalInterpolation

eim = EmpiricalInterpolation(rb)
eim.fit()

Finally, we construct the reduced model from our eim object

   
from skreducedmodel.surrogate import Surrogate

model = Surrogate(eim)
model.fit()

In case we are interested in studying the ReducedBasis and EmpiricalInterpolation objects, the package has a function that automates the whole process.

from skreducedmodel.mksurrogate import mksurrogate

surrogate = mksurrogate(parameters = param,
                        training_set = training_set,
                        physical_points = x_set,
                        )

Contributions

We encourage users to contribute with ideas, code, or by reporting bugs. To report bugs or issues, users should create an issue in the project repository. To contribute with code, please submit a pull request. We suggest that you contact us at francocerino@gmail.com prior to undertaking any significant improvement that requires substantial effort to address technical and design aspects before beginning development.

Authors

Project details


Release history Release notifications | RSS feed

This version

1.0

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

Scikit-ReducedModel-1.0.tar.gz (31.6 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page