Metadata-Version: 2.2
Name: qp-prob
Version: 0.9.3
Author-email: "LSST Dark Energy Science Collaboration (DESC)" <later@later.com>
License: MIT License
        
        Copyright (c) 2023 LSST Dark Energy Science Collaboration (DESC)
        
        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.
        
Classifier: Development Status :: 4 - Beta
Classifier: License :: OSI Approved :: MIT License
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Science/Research
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: numpy
Requires-Dist: scipy
Requires-Dist: tables-io
Requires-Dist: deprecated
Provides-Extra: dev
Requires-Dist: tables-io[full]; extra == "dev"
Requires-Dist: matplotlib; extra == "dev"
Requires-Dist: scikit-learn; extra == "dev"
Requires-Dist: pytest; extra == "dev"
Requires-Dist: pytest-cov; extra == "dev"
Requires-Dist: pre-commit; extra == "dev"
Requires-Dist: pylint; extra == "dev"
Requires-Dist: packaging; extra == "dev"
Requires-Dist: pillow; extra == "dev"
Requires-Dist: cycler; extra == "dev"
Requires-Dist: pytdigest; extra == "dev"
Requires-Dist: python-dateutil; extra == "dev"
Requires-Dist: kiwisolver; extra == "dev"
Requires-Dist: joblib; extra == "dev"
Requires-Dist: threadpoolctl; extra == "dev"
Requires-Dist: pylint; extra == "dev"
Requires-Dist: mpi4py; extra == "dev"
Requires-Dist: coverage; extra == "dev"
Requires-Dist: ipyparallel; extra == "dev"
Provides-Extra: full
Requires-Dist: tables-io[full]; extra == "full"
Requires-Dist: pytdigest; extra == "full"
Requires-Dist: matplotlib; extra == "full"
Requires-Dist: scikit-learn; extra == "full"
Provides-Extra: all
Requires-Dist: tables-io[full]; extra == "all"
Requires-Dist: pytdigest; extra == "all"
Requires-Dist: matplotlib; extra == "all"
Requires-Dist: scikit-learn; extra == "all"
Provides-Extra: docs
Requires-Dist: nbsphinx; extra == "docs"
Requires-Dist: sphinx==6.1.3; extra == "docs"
Requires-Dist: sphinx_rtd_theme==1.2.0; extra == "docs"
Requires-Dist: sphinx-autoapi==2.0.1; extra == "docs"

# qp

Quantile parametrization for probability distribution functions.

![GitHub release (latest SemVer)](https://img.shields.io/github/v/release/LSSTDESC/qp)
![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/LSSTDESC/qp/python-package.yml)
![Read the Docs](https://img.shields.io/readthedocs/qp)

## Motivation

In a scientific inference we typically seek to characterize the posterior probability density function (PDF) for our parameter(s), which means we need to find a suitable, calculable approximation to it. Popular choices include an ensemble of samples, a histogram estimator based on those samples, or (in 1 dimensional problems) a tabulation of the PDF on a regular parameter grid. qp is a python package that supports these approximations, as well as the “quantile parameterization” from which the package gets its name.

The [scipy.stats](https://docs.scipy.org/doc/scipy/reference/stats.html) package provides an interface to many probability distributions for parameterized analytic forms (e.g., Gaussians, LogNormal Distributions, etc...)  `qp` extends that functionality to numerically-evaluated forms, such as the histograms and interpolated grids mentioned above.



## Examples

Here are some example notebooks to help new users explore `qp` functionality.

* **[Basic Demo](http://htmlpreview.github.io/?https://github.com/LSSTDESC/qp/blob/master/docs/demo.html)** [(raw notebook)](https://github.com/LSSTDESC/qp/blob/master/nb/demo.ipynb)

* **[Practical Example](http://htmlpreview.github.io/?https://github.com/LSSTDESC/qp/blob/master/docs/practical_example.html)** [(raw notebook)](https://github.com/LSSTDESC/qp/blob/master/nb/practical_example.ipynb)

* **[Using Metrics](http://htmlpreview.github.io/?https://github.com/LSSTDESC/qp/blob/master/docs/metrics_examples.html)** [(raw notebook)](https://github.com/LSSTDESC/qp/blob/master/nb/metrics_examples.ipynb)

* **[Using iterarors](http://htmlpreview.github.io/?https://github.com/LSSTDESC/qp/blob/master/docs/iterator_demo.html)** [(raw notebook)](https://github.com/LSSTDESC/qp/blob/master/nb/iterator_demo.ipynb)

* **[Quantile parameterization](http://htmlpreview.github.io/?https://github.com/LSSTDESC/qp/blob/master/docs/quantile_parameterization_demo.html)** [(raw notebook)](https://github.com/LSSTDESC/qp/blob/master/nb/quantile_parameterization_demo.ipynb)


Also the read the docs page has significantly more information:  [Read the Docs](http://qp.readthedocs.io/)


## People

* [Alex Malz](https://github.com/LSSTDESC/qp/issues/new?body=@aimalz) (NYU)
* [Phil Marshall](https://github.com/LSSTDESC/qp/issues/new?body=@drphilmarshall) (SLAC)
* [Eric Charles](https://github.com/LSSTDESC/qp/issues/new?body=@eacharles) (SLAC)
* [Sam Schmidt](https://github.com/LSSTDESC/qp/issues/new?body=@sschmidt) (UC Davis)

## License, Contributing etc

The code in this repo is available for re-use under the MIT license, which means that you can do whatever you like with it, just don't blame us. If you end up using any of the code or ideas you find here in your academic research, please cite us as `Malz et al, ApJ 156 1 35`. If you are interested in this project, please do drop us a line via the hyperlinked contact names above, or by [writing us an issue](https://github.com/aimalz/qp/issues/new). To get started contributing to the `qp` project, just fork the repo - pull requests are always welcome!





