Skip to main content

Copula, multivariate and univariate distribution fitting using JAX in python.

Project description

CopulAX

Python 3.10, 3.11, 3.12   MIT license   build   coverage   maintained

mac os windows

CopulAX is an open-source software for probability distribution fitting written in JAX, with an emphasis on low-dimensional optimization. The spirital successor to the eariler SklarPy project, this JAX implementation provides improved standardization and optimization performance across distribution objects, in addition to inbuilt automatic differentiation capabilities and greater speed via JIT compilation for both CPUs and GPUs.

We foresee this library having many different possible use cases, ranging from machine learning to finance.

Table of contents

Installation

CopulAX is available on PyPI and can be installed by running:

pip install copulax

Low-Dimensional Optimization

In many fields data remains limited, which can be one of the main motivators for using probabilistic software which can allow the generaton of additional data points with similar statistical properties. However, when dealing with multivariate data, even this can become challenging, due the shape / covariance / correlation matrix arguments of many multivariate and copula distributions resulting in the number of parameters required to be estimated to be O($d^2$). CopulAX aims to work around this constraint where possible, by using analytical relationships between the mean and covariance matrices and other parameters; Estimating the mean and covariance using techniques robust to low sample sizes, then allows for distribution fitting in such settings by removing a large number of the estimated parameters from the numerical optimization loop.

Development Status

As CopulAX is still in its early stages, we have so far only released a limited number of continuous univariate and multivariate distributions and their copulas, however in the near future we aim to implement the following:

  • Many more univariate distributions, including for discrete variables.
  • Incorporating goodness of fit tests into univariate_fitter.
  • More multivariate distributions. Namely, the special and limiting cases of the generalized hyperbolic.
  • Copulas based on each of the aformentioned multivariate distributions.
  • Cdf functions for multivariate and copula distributions. This will depend upon the progress of third party jax-based numerical integration libraries such as quadax.
  • Archimedean copulas.
  • Empirical distributions, with different fitting methods (smoothing splines vs 'as is'/ non-smoothed).

CopulAX is currently under active development and so bugs are to be expected. However we have extensive tests for each distribution and function, so we are aiming to limit there number.

Implemented Distributions

A list of all implemented distributions can be found here:

Examples

We have provided jupyter notebooks containing example code for using univariate, multivariate and copula distribution objects.

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

copulax-1.0.0.tar.gz (221.8 kB view details)

Uploaded Source

Built Distribution

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

copulax-1.0.0-py3-none-any.whl (85.6 kB view details)

Uploaded Python 3

File details

Details for the file copulax-1.0.0.tar.gz.

File metadata

  • Download URL: copulax-1.0.0.tar.gz
  • Upload date:
  • Size: 221.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.7

File hashes

Hashes for copulax-1.0.0.tar.gz
Algorithm Hash digest
SHA256 e40fad58e61accda7d5da1b2bc1ec153373d1c23bcbde7ea443e8a9229490c0d
MD5 b25974002a9dbbaafd0dd2a3d27153fb
BLAKE2b-256 c149498d8293494c468e8f27c8390c6fcae203996f29417b3322585330b250a7

See more details on using hashes here.

File details

Details for the file copulax-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: copulax-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 85.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.7

File hashes

Hashes for copulax-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 1d2b416e04242a71345f62264e7273d4bad2278d5df458448050c21e1e4ec7b6
MD5 6ad6d009be2c55195b9426843ed39a05
BLAKE2b-256 3218f6681edb4f641ee6944976500b326aaa0360abcb0608007a3fed055da134

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