Skip to main content

Library to facilitate simple Verification, Validation and Uncertainty Quantification of simulation codes

Project description

EasyVVUQ icon

EasyVVUQ

Language grade: Python Documentation Status Coverage Status CII Best Practices Binder

The aim of EasyVVUQ is to facilitate verification, validation and uncertainty quantification (VVUQ) for a wide variety of simulations. While very convenient for simple cases, EasyVVUQ is particularly well suited in situations where the simulations are computationally expensive, heterogeneous computing resources are necessary, the sampling space is very large or book-keeping is prohibitively complex. It coordinates execution using an efficient database, it is fault tolerant and all progress can be saved.

Here are some examples of questions EasyVVUQ can answer about your code:

  • Given the uncertainties in input parameters, what is the distribution of the output?
  • What percentage of the output variance each input parameter contributes?

It also lets you construct surrogate models that are cheaper to evaluate than the complete simulation.

The high-level overview of the library is available at our readthedocs.

Getting Started

For the quick start with EasyVVUQ we recommend to check our basic interactive tutorial available here.

Functionality

Available analysis and sampling methods:

  • Polynomial Chaos Expansion
  • Stochastic Collocation
  • Dimension-adaptive Stochastic Collocation for high-dimensional inputs (incl notebook in ./tutorials and theoretical tutorial)
  • Simplex Stochastic Collocation for irregular outputs (incl notebook in ./tutorials and article)
  • Monte Carlo Sensitivity Analysis
  • Markov-Chain Monte Carlo

EasyVVUQ also supports building surrogate models using:

  • Polynomial Chaos Expansion
  • Stochastic Collocation
  • Gaussian Processes

Supported computing resources:

  • Traditional clusters
  • Kubernetes clusters

The easiest way to get familiar with the provided functionality is to follow the tutorials (*.ipynb files) in our Binder.

Installation instructions

Requirements

To use the library you will need Python 3.7+.

Installation using pip

If you are unsure of the version of python your default pip works for type:

pip --version

If the output ends with (python 2.7) you should replace pip with pip3 in the following commands.

The following should fully install the library:

pip install easyvvuq

To upgrade the library use:

pip install easyvvuq --upgrade

Installation from the Repository via Bash Script (Recommended for Developers)

Alternatively, you can manually install EasyVVUQ. Note: As above, you need to be sure you are installing for Python3 - if necessary replace pip with pip3 and python with python3 in the commands below.

  1. Clone the Repository:
git clone https://github.com/UCL-CCS/EasyVVUQ.git
  1. Install with Bash Script:

The installation of dependencies and testing have been automated using bash script install_EasyVVUQ.sh included in the repository. To execute it:

cd EasyVVUQ/

Make bash script executable:

chmod +x install_EasyVVUQ.sh

Execute bash script:

bash install_EasyVVUQ.sh

Upon successful installation, the process will end with the following message:

EasyVVUQ installation and testing completed successfully!
  1. Set the PYTHONPATH Environment Variable After installation:

You may need to manually set the PYTHONPATH to ensure EasyVVUQ can be found by Python. This step is required if the library is installed locally within the repository using the provided venv.

While in EasyVVUQ directory, activate the virtual environment (Linux/macOS):

source venv/bin/activate

For Windows users, activate virtual environment using:

venv\Scripts\activate

Export PYTHONPATH:

export PYTHONPATH=$(pwd):$PYTHONPATH

Export PYTHONPATH site-packages according to your Python version (e.g., python3.10):

export PYTHONPATH=$(pwd)/venv/lib/python3.10/site-packages:$PYTHONPATH

Check PYTHONPATH:

python -c "import sys; print('\n'.join(sys.path))"

Manual Developer Installation From the Repository

  1. Clone the Repository:

    git clone https://github.com/UCL-CCS/EasyVVUQ.git
    
  2. Navigate to the EasyVVUQ directory:

    cd EasyVVUQ
    
  3. Create and Activate Virtual Environment:

    Using a virtual environment isolates EasyVVUQ's dependencies and prevents conflicts with other Python projects.

    You can create a Python Virtual Environment inside EasyVVUQ directory or outside it. Git is set to ignore venv

    python3 -m venv venv        
    

    Activate the virtual environment (Linux/macOS):

    source venv/bin/activate
    
  4. Install Required Packages using requirements.txt

    pip install -r requirements.txt
    
  5. Install EasyVVUQ in Editable Mode in Virtual Environment:

    pip install -e .
    

    The -e flag (editable mode) means any changes you make to the EasyVVUQ source code will be immediately reflected without needing to reinstall.

    To see easyvvuq in the list of the installed packages in the virtual environment:

    pip list
    
  6. Installation Verification:

    After installation, verify the installation:

    python -c "import easyvvuq; print('EasyVVUQ version:', easyvvuq.__version__)"
    

    Output:

    EasyVVUQ version: 1.2.3
    

API

You can find the EasyVVUQ API documentation on our GitHub Pages.

Citing EasyVVUQ

Richardson, R A, Wright, D W, Edeling, W, Jancauskas, V, Lakhlili, J and Coveney, P V. 2020 EasyVVUQ: A Library for Verification, Validation and Uncertainty Quantification in High Performance Computing. Journal of Open Research Software, 8: 11. DOI: 10.5334/jors.303.

Wright, D.W., Richardson, R.A., Edeling, W., Lakhlili, J., Sinclair, R.C., Jancauskas, V., Suleimenova, D., Bosak, B., Kulczewski, M., Piontek, T., Kopta, P., Chirca, I., Arabnejad, H., Luk, O.O., Hoenen, O., Weglarz, J., Crommelin, D., Groen, D. and Coveney, P.V. (2020), Building Confidence in Simulation: Applications of EasyVVUQ. Adv. Theory Simul., 3: 1900246. DOI: 10.1002/adts.201900246.

Acknowledgments

Development was funded by the EU Horizon 2020 project VECMA.

Project details


Download files

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

Source Distribution

easyvvuq-1.3.tar.gz (6.4 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

easyvvuq-1.3-py3-none-any.whl (174.2 kB view details)

Uploaded Python 3

File details

Details for the file easyvvuq-1.3.tar.gz.

File metadata

  • Download URL: easyvvuq-1.3.tar.gz
  • Upload date:
  • Size: 6.4 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.18

File hashes

Hashes for easyvvuq-1.3.tar.gz
Algorithm Hash digest
SHA256 ff5da1d27a98c8fb630089f2cbe62ad403ae48bcfaa4ea3da74d370100a57d47
MD5 3718076d7dc99cb73caafb42fc7ae9d1
BLAKE2b-256 333fff170d61e917c1fa1d7036bd80c906e0d967ae3b20f9b180121ce517501d

See more details on using hashes here.

File details

Details for the file easyvvuq-1.3-py3-none-any.whl.

File metadata

  • Download URL: easyvvuq-1.3-py3-none-any.whl
  • Upload date:
  • Size: 174.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.18

File hashes

Hashes for easyvvuq-1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 dab13ede49af1fee25c6629402755a1dcb124a444e26ef7bdf53f024ccf832ea
MD5 6570bc72e06a232619e7b4ed3d45ef73
BLAKE2b-256 c00cc656097ccfdcd6aa8efd592e61dbe81e3df652972a39147e0fd9270a63ec

See more details on using hashes here.

Supported by

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