Code Monkey home page Code Monkey logo

surgroup / uqpy Goto Github PK

View Code? Open in Web Editor NEW
267.0 17.0 77.0 111.23 MB

UQpy (Uncertainty Quantification with python) is a general purpose Python toolbox for modeling uncertainty in physical and mathematical systems.

License: MIT License

Python 99.97% Dockerfile 0.03%
uncertainty-quantification uncertainty-propagation uncertainty-sampling probability probabilistic stochastic stochastic-process monte-carlo monte-carlo-simulation latin-hypercube

uqpy's Introduction

AzureDevops PyPIdownloads PyPI CondaPlatforms GithubRelease Docs bear-ified

Uncertainty Quantification with python (UQpy)

logo


Product Owner: Michael D. Shields
Lead Developers: Dimitris Giovanis, Audrey Olivier, Dimitris Tsapetis
Development Team:

Aakash Bangalore Satish, Mohit Singh Chauhan, Lohit Vandanapu,

Ketson RM dos Santos, Katiana Kontolati, Dimitris Loukrezis,

Promit Chakroborty, Lukáš Novák, Andrew Solanto, Connor Krill

Contributors: Michael Gardner, Prateek Bhustali, Julius Schultz, Ulrich Römer

Contact

To engage in conversations about uncertainty quantification, or ask question about UQpy usage and functionality refer to the UQpy's discussions tab:

Discussions

Description

UQpy (Uncertainty Quantification with python) is a general purpose Python toolbox for modeling uncertainty in physical and mathematical systems.

Documentation

Website:
https://uqpyproject.readthedocs.io

Dependencies

  • Python >= 3.9
    Git >= 2.13.1
    

License

UQpy is distributed under the MIT license

Copyright (C) <2018> <Michael D. Shields>

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Installation

From PyPI

  • pip install UQpy
    

Using Conda

  • conda install -c conda-forge uqpy
    

Clone your fork of the UQpy repo from your GitHub account to your local disk (to get the latest version):

  • git clone https://github.com/SURGroup/UQpy.git
    cd UQpy/
    python setup.py {version} install  (user installation)
    python setup.py {version} develop (developer installation)
    

You will need to replace {version} with the latest version.

Referencing UQpy

If you are using this software in a work that will be published, please cite this paper:

Olivier, A., Giovanis, D.G., Aakash, B.S., Chauhan, M., Vandanapu, L., and Shields, M.D. (2020). "UQpy: A general purpose Python package and development environment for uncertainty quantification". Journal of Computational Science, DOI: 10.1016/j.jocs.2020.101204.

Help and Support

For assistance with the UQpy software package, please raise an issue on the Github Issues page. Please use the appropriate labels to indicate which module you are specifically inquiring about.

uqpy's People

Contributors

aa-kash avatar aakashbs avatar audolivier avatar bsaakash avatar connor-krill avatar dgiovanis avatar dimtsap avatar jxzhangjhu avatar katiana22 avatar ketsonroberto avatar lohitv96 avatar mds2120 avatar mohitcek avatar novaklbut avatar omniscientoctopus avatar promitchakroborty avatar shellshocked2003 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

uqpy's Issues

Toggle Text Output

  • Make the default to write minimal text, but allow functions to output some information text if requested.

Move Diagnostics to Utilities

  • Move the 'Diagnostics' to the Utilities module

  • Document and push to Development

  • Add Documentation to Users Guide

  • Modify setup.py to include matplotlib

GE-RSS

  • Modify refinement criteria to incorporate uncertainty in Jacobian

  • Code GE-RSS with Voronoi cells

  • Add error checks

  • Doc string

  • Push to the development branch

  • Modify user manual

Can MCS take a copula?

[ ] At this point, I thought MCS only sampled independent RVs. But, there is now an option to input a copula. Does this work?

  • There is a comment "# ne need to do other checks as they will be done within Distributions.py" Should read "No need..."?

Importance Sampling

  • Add Importance Sampling class to SampleMethods

  • Create documentation for the class

Documentation

@bsaakash

  • Convert .tex to .rst if possible
  • Host the documentation on a separate branch
  • Resolve issues of building the documentation

Restructuring RunModel

  • Modify the RunModel module itself to interface with a single Python script

  • Build template Python script

  • Matlab model currently in the examples

  • Abaqus model

  • Users Guide needs to be updated to reflect the changes

  • Pushed to the master

Maximum Likelihood

  • Resolve differences in Maximum Likelihood estimation

  • Place it in the appropriate module (Inference or Utilities?)

  • Document and submit to Development

  • Update Users Guide.

Kriging

  • Include gradient of the objective function to estimate hyperparameters

  • Add error checks

  • Doc string

  • Finalize four additional correlation models

  • Push to the development branch

  • Modify user manual

UQpy Parser

  • Extract all code from the development branch that relates to terminal processing.
  • Consolidate all of this code into a single module on Dev_Dimitris
  • From this, build UQpy_Parser module for V1.1 or V1.2

Final Release Check

  • MCS

  • RunModel

  • Distributions

  • LHS

  • Correlate

  • Decorrelate

  • Nataf

  • InvNataf

  • SRM

  • BSRM

  • KLE

  • Translation

  • InverseTranslation

Add Theory to Users Manual / Docstrings

Each section of the Users Manual should have a small discussion of theory behind the method. This should be just enough to understand the inputs and outputs, without derivations (typically no more than one page, see e.g. Nataf). If the theory is complex and requires elaborate discussion, references should be provided that give adequate background to the user.

  • MCS

  • LHS

  • STS

  • MCMC

  • Correlate

  • Decorrelate

  • Nataf

  • InvNataf

  • SROM

  • Kriging

  • SubsetSimulation

  • TaylorSeries

  • SRM

  • BSRM

  • KLE

  • Translation

  • InverseTranslation

  • BayesModelSelection

  • InfoModelSelection

  • BayesParameterEstimation

SROM Examples

  • Update SROM examples to include the eigenvalue problem with RunModel

  • Push to development

  • Modify Users Manual to reflect the new example

  • Add a short "Theory" section

TaylorSeries

  • Complete the TaylorSeries for FORM/SORM analyses.

  • Complete documentation for TaylorSeries

Inference Class

@zhangjiaxin2012

  • Full implementation of Bayesian and information-theoretic multimodel inference
  • Optimal importance sampling estimator and importance sampling in SampleMethods
  • Documentation and comments
  • Full documentation in UsersGuide

Update UsersGuide

  • Update the introductory sections of the UsersGuide including installation, methods of operation, etc.
  • Installation section
  • Adding functionality to UQpy
  • Structure of the code
  • Modes of operation

Kriging

  • Include gradient of the objective function to estimate hyperparameters

  • Add error checks

  • Doc string

  • Push to the development branch

  • Modify user manual

Autotest

  • Figure out exactly how to do autotesting for each class.

  • How much extra work is it to implement this in our development?

Cluster Computing

  • MPI interface for communication between nodes. Do we need to use that?

  • SLURM - Generate SLURM compatible files directly

AKMCS

  • Pass kriging as an object.

  • Make self.lf a function itself. That way, it can be passed in or it can be assigned to one of the internal functions based on the keyword lf.

  • Allow the code to add more than one point in a give iteration.

  • Rewrite the code so that each learning function is called directly as a function through self.lf.

  • Complete the jupyter script examples.

tools needs to be removed

  • 'tools' is a redundant module and needs to be removed. Anything that is not already moved, should be moved to 'Utilities'

Finalize SROM

@mohitcek

  • Make sure SROM is fully consistent with other classes (e.g. MCMC) and modules (RunModel)
  • Fully comment the code (both for documentation and throughout the code)
  • Build documentation in UsersGuide
  • Build representative Jupyter script examples

Kriging surrogate object cannot be pickled

I can successfully create and use a Kriging surrogate model in UQPy, but I can't save it to a pickle file. When I try, I get the following error message:

Traceback (most recent call last):
  File "./mk_gp_uqpy_fail_to_pickle.py", line 17, in <module>
    pickle.dump(gp, pkl_file)
AttributeError: Can't pickle local object 'Krig.init_krig.<locals>.regress.<locals>.r'

A workaround for this is to use the third-party module dill instead of the standard module pickle, but it would be nice to not need to do that.

Latin hypercube

@lohitv96

  • - Make sure LHS is fully consistent with other classes (e.g. MCMC) and modules (RunModel)
  • - Fully comment the code (both for documentation and throughout the code)
  • - Build documentation in UsersGuide
  • - Build representative Jupyter script examples.

run_lhs() method erroneously treats the Distribution class as if it had a "params" attribute

(FYI, this is a follow-up to a problem I had e-mailed mds2120 about directly.)

In the method run_lhs() defined in UQpy/SampleMethods.py, line 203 reads as follows:

 samples_u_to_x[:, j] = i_cdf(samples[:, j], self.distribution[j].params)

However, this is wrong, and running run_lhs() leads to an exception with the error message: AttributeError: 'Distribution' object has no attribute 'params'.

The fix for this is straightforward. Change the line to read as follows:

 samples_u_to_x[:, j] = i_cdf(samples[:, j], self.dist_params[j])

Then, run_lhs() should work as intended.

Resolve dimension (n,) issue...

  • Recall the reason we need to explicitly state dimension - was it only because of ambiguity in reading text file.

  • Resolve this so we don't need to explicitly state dimension

  • Put error checks into classes requiring matrix reshaping.

BayesModelSelection

  • Resolve the evidence calculation

  • Build BayesModelSelection class in Inference

  • Document code and push to Development

  • Update Users Guide

PYPI

  • Figure out how to put the code on PYPI and install using pip.

Improve Evidence Calculation

  • Better evidence calculation methods in Inference Module

  • Externalize evidence into its own class.

  • Will require modifications to MCMC class.

Distributions module

  • Build pdfs, cdfs, inverse cdfs, etc. as needed for the code
  • Change pdf_type, pdf_params, etc. to dist_type, dist_params, etc throughout the code

Distributions Class

  • Structure distributions by treating each family using SubDistributions

  • Create product distributions using SubDistributions

  • Create joint distributions from copula

  • Push to development

  • [ ]

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.