Metadata-Version: 2.4
Name: pytuq
Version: 1.0.0
Summary: Python-only set of tools for uncertainty quantification.
Author: Khachik Sargsyan, Bert Debusschere
Maintainer: Emilie Grace Baillo
License: BSD 3-Clause License
        
        Copyright 2025 National Technology & Engineering Solutions of Sandia, LLC (NTESS).
        Under the terms of Contract DE-NA0003525 with NTESS, the U.S. Government retains
        certain rights in this software.
        
        Redistribution and use in source and binary forms, with or without
        modification, are permitted provided that the following conditions are met:
        
        1. Redistributions of source code must retain the above copyright notice, this
           list of conditions and the following disclaimer.
        
        2. Redistributions in binary form must reproduce the above copyright notice,
           this list of conditions and the following disclaimer in the documentation
           and/or other materials provided with the distribution.
        
        3. Neither the name of the copyright holder nor the names of its
           contributors may be used to endorse or promote products derived from
           this software without specific prior written permission.
        
        THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
        AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
        IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
        DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
        FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
        DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
        SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
        CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
        OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
        OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
        
Project-URL: Homepage, https://sandialabs.github.io/pytuq/
Project-URL: Repository, https://github.com/sandialabs/pytuq
Project-URL: Documentation, https://sandialabs.github.io/pytuq/
Keywords: uncertainty quantification
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Intended Audience :: Science/Research
Classifier: Topic :: Scientific/Engineering :: Mathematics
Classifier: Natural Language :: English
Classifier: Operating System :: Unix
Classifier: Operating System :: MacOS
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENSE.txt
Requires-Dist: numpy
Requires-Dist: scipy
Requires-Dist: matplotlib
Provides-Extra: dev
Requires-Dist: pytest>=7.0; extra == "dev"
Requires-Dist: pytest-cov; extra == "dev"
Provides-Extra: nn
Requires-Dist: torch; extra == "nn"
Requires-Dist: uqinn; extra == "nn"
Provides-Extra: optim
Requires-Dist: pyswarms; extra == "optim"
Provides-Extra: all
Requires-Dist: torch; extra == "all"
Requires-Dist: uqinn; extra == "all"
Requires-Dist: pyswarms; extra == "all"
Dynamic: license-file

# Python Toolkit for Uncertainty Quantification (PyTUQ)

#### Khachik Sargsyan, Bert Debusschere, Emilie Grace Baillo


[![Deploy to GitHub Pages](https://github.com/sandialabs/pytuq/actions/workflows/documentation.yml/badge.svg)](https://github.com/sandialabs/pytuq/actions/workflows/documentation.yml)
[![Run Tests](https://github.com/sandialabs/pytuq/actions/workflows/python-test.yml/badge.svg)](https://github.com/sandialabs/pytuq/actions/workflows/python-test.yml)
[![Coverage Status](https://coveralls.io/repos/github/sandialabs/pytuq/badge.svg?branch=main)](https://coveralls.io/github/sandialabs/pytuq?branch=main)



## Overview

The Python Toolkit for Uncertainty Quantification (PyTUQ) is a Python-only collection of libraries and tools designed for quantifying uncertainty in computational models. PyTUQ offers a range of UQ functionalities, including Bayesian inference and linear regression methods, polynomial chaos expansions, and global sensitivity analysis methods. PyTUQ features advanced techniques for dimensionality reduction, such as SVD and Karhunen-Loeve expansions, along with various MCMC methods for calibration and inference. The toolkit also includes robust classes for multivariate random variables and integration techniques, making it a versatile resource for researchers and practitioners seeking to quantify uncertainty in their numerical predictions. To explore the PyTUQ documentation and learn more, visit our website [here](https://sandialabs.github.io/pytuq/).

## Dependencies
PyTUQ requires:
* numpy
* scipy
* matplotlib

Optional dependencies include:
* pytorch (NN surrogates)
* QUiNN (Quantification of Uncertainties in Neural Networks)
* pyswarms (Particle Swarm Optimization)

## Installation

### Basic Installation
Install PyTUQ with core dependencies:
```bash
$ pip install pytuq
```

#### Optional Features

Install additional features as needed:
* Neural network surrogates
```bash
$ pip install pytuq[nn]
```

* Particle swarm optimization
```bash
$ pip install pytuq[optim]
```

* All optional features
```bash
pip install pytuq[all]
```

* Development tools
```bash 
pip install pytuq[dev]
```

### Installation from Source
1. To install PyTUQ from source, start up a Python virtual environment and clone the repository:
```bash
    $ source <PYTHON_VENV_DIR>/bin/activate
    $ git clone git@github.com:sandialabs/pytuq.git
    $ cd pytuq
```
2. (Optional) To take advantage of the neural network surrogate model capabilites in PyTUQ, use the following command to install PyTUQ's optional dependencies:
```
    $ pip install -r requirements.txt
```
3. Install primary PyTUQ dependencies and PyTUQ:
```
    $ pip install .
```

## License
Distributed under BSD 3-Clause License. See `LICENSE.txt` for more information.

## Acknowledgements
This work is supported by the Scientific Discovery through Advanced Computing (SciDAC) Program under the Office of Science at the U.S. Department of Energy. 

Sandia National Laboratories is a multimission laboratory managed and operated by National Technology & Engineering Solutions of Sandia, LLC, a wholly owned subsidiary of Honeywell International Inc., for the U.S. Department of Energy’s National Nuclear Security Administration under contract DE-NA0003525.
