Metadata-Version: 2.1
Name: ref-gsd
Version: 0.0.2
Summary: Reference implementation of generalised score distribution in python
License: Apache-2.0
Keywords: jax,distribution,QoE,test
Author: Krzysztof Rusek
Author-email: krusek@agh.edu.pl
Requires-Python: >=3.9,<4.0
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Financial and Insurance Industry
Classifier: Intended Audience :: Information Technology
Classifier: Intended Audience :: Science/Research
Classifier: Intended Audience :: Telecommunications Industry
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Natural Language :: English
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Topic :: Scientific/Engineering :: Information Analysis
Classifier: Topic :: Scientific/Engineering :: Mathematics
Requires-Dist: jax (>=0.4.6,<0.5.0)
Description-Content-Type: text/markdown

# gsd
Reference implementation of generalised score distribution in python

This library provides a reference implementation of gsd probabilities for correctness and efficient implementation of samples and log_probabilities in `jax`. 

### Citations

Theoretical derivation of GSD is described in the following paper.

Ćmiel, B., Nawała, J., Janowski, L. et al. Generalised score distribution: underdispersed continuation of the beta-binomial distribution. Stat Papers (2023). https://doi.org/10.1007/s00362-023-01398-0

If you decide to apply the concepts presented or base on the provided code, please do refer our related paper.

### Fancy math

In order to keep the reference implementation as close to the math as possible we define some utilities with unicode symbols.
E.g.  `𝚷(i for i in ℤ[1,3])` is a valid python code for $$\prod_{i=1}^{3} i$$




## Installation

You can install gsd via `pip`:

```bash
$ pip install ref_gsd
```



## Development

To develop and modify gsd, you need to install
[`poetry`](https://python-poetry.org/), a tool for Python packaging and
dependency management.

To install the development dependencies of gsd, you can run

```bash
$ poetry install
```

and to enter a virtual environment for testing or debugging, you can run:

```bash
$ poetry shell
```

### Running tests

Gsd uses [Pytest](https://pytest.org/) for testing. To run the tests, use the following command:

```
$ poetry run pytest tests
```

