Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/kecnry/distl
Simplified and Condensed Distributions
https://github.com/kecnry/distl
distributions numpy python
Last synced: about 1 month ago
JSON representation
Simplified and Condensed Distributions
- Host: GitHub
- URL: https://github.com/kecnry/distl
- Owner: kecnry
- License: gpl-3.0
- Created: 2019-02-04T21:30:22.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2021-06-04T01:32:27.000Z (over 3 years ago)
- Last Synced: 2024-10-01T16:16:46.290Z (about 1 month ago)
- Topics: distributions, numpy, python
- Language: Python
- Homepage: https://distl.readthedocs.io
- Size: 12.8 MB
- Stars: 5
- Watchers: 5
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
simplified and condensed distributions
pip install distl[![badge](https://img.shields.io/badge/github-kecnry%2Fdistl-blue.svg)](https://github.com/kecnry/distl)
[![badge](https://img.shields.io/badge/pip-distl-lightgray.svg)](https://pypi.org/project/distl/)
![badge](https://img.shields.io/badge/python-2.7+%20%7C%203.6+-blue.svg)
[![badge](https://img.shields.io/badge/license-GPL3-blue.svg)](https://github.com/kecnry/distl/blob/master/LICENSE)
[![badge](https://travis-ci.com/kecnry/distl.svg?branch=master)](https://travis-ci.com/kecnry/distl)
[![badge](https://img.shields.io/codecov/c/github/kecnry/distl)](https://codecov.io/gh/kecnry/distl)
[![badge](https://readthedocs.org/projects/distl/badge/?version=latest)](https://distl.readthedocs.io/en/latest/?badge=latest)**IMPORTANT**: **distl** is currently still under development, is not yet well-tested, and is subject to significant API changes. Please keep posted until an official release is ready.
Read the [latest documentation on readthedocs](https://distl.readthedocs.io) or [browse the current documentation](./docs/index.md).
**distl** provides a python object-interface on top of several distribution (random variable) functions in [scipy.stats](https://docs.scipy.org/doc/scipy/reference/stats.html) and allows for:
- serialization of distributions (so they can be saved to disk or pickled and sent to processors within MPI)
- support for units and wrapping
- conversion between different types of distributions
- math between distributions, handling covariances from multivariate distributions wherever possible
- plotting convenience functions## Getting Started
### Dependencies
**distl** requires the following dependencies:
- python 2.7+ or 3.6+
- scipy 1.0+
- numpy 1.10+and the following optional dependencies:
- matplotlib 2.2+ (required for plotting distributions)
- [corner](https://corner.readthedocs.io) (required for plotting multivariate distributions and distribution collections)
- astropy 1.0+ (required for units support)
- dill (required for saving/loading Function distributions)You can see the [Travis testing matrix](https://travis-ci.com/kecnry/distl) for
details on what exact versions have been tested and ensured to work. If you run
into any issues with dependencies, please [submit an issue](https://github.com/kecnry/distl/issues/new).### Installation
To install the latest release via pip:
```sh
pip install distl
```To install from source locally for a single user:
```sh
python setup.py build
python setup.py install --user
```Or to install globally:
```sh
python setup.py build
sudo python setup.py install
```### Import
Now from within python we can import the `distl` package:
```py
import distl
```and then create, sample from, and plot our first distribution:
```py
g = distl.gaussian(10, 1)
print(g.sample())
print(g.sample(10))
g.plot(show=True)
```## Documentation and API Docs
Read the [latest documentation on readthedocs](https://distl.readthedocs.io) or [browse the current documentation](./docs/index.md).
## Contributors
[Kyle Conroy](https://github.com/kecnry)
Contributions are welcome! Feel free to file an issue or fork and create a pull-request.