Skip to main content

A python interface to vinecopulib

Project description

pyvinecopulib

Documentation License: MIT Build Status DOI

Introduction

What are vine copulas?

Vine copulas are a flexible class of dependence models consisting of bivariate building blocks (see e.g., Aas et al., 2009). You can find a comprehensive list of publications and other materials on vine-copula.org.

What is pyvinecopulib?

pyvinecopulib is the python interface to vinecopulib, a header-only C++ library for vine copula models based on Eigen. It provides high-performance implementations of the core features of the popular VineCopula R library, in particular inference algorithms for both vine copula and bivariate copula models. Advantages over VineCopula are

  • a stand-alone C++ library with interfaces to both R and Python,
  • a sleaker and more modern API,
  • shorter runtimes and lower memory consumption, especially in high dimensions,
  • nonparametric and multi-parameter families.

License

pyvinecopulib is provided under an MIT license that can be found in the LICENSE file. By using, distributing, or contributing to this project, you agree to the terms and conditions of this license.

Contact

If you have any questions regarding the library, feel free to open an issue or send a mail to info@vinecopulib.org.

Installation

With pip

The latest release can be installed using pip:

pip install pyvinecopulib

With conda

Similarly, it can be installed with conda:

conda install conda-forge::pyvinecopulib

Or with mamba:

mamba install conda-forge::pyvinecopulib

From source

Start by cloning this repository, noting the --recursive option which is needed for the vinecopulib and wdm submodules:

git clone --recursive https://github.com/vinecopulib/pyvinecopulib.git
cd pyvinecopulib

The main build time prerequisites are:

  • scikit-build-core (>=0.4.3),
  • nanobind (>=2.7.0),
  • a compiler with C++17 support.

To install from source, Eigen and Boost also need to be available, and CMake will try to find suitable versions automatically.

The recommended way to install pyvinecopulib from source is to use conda or mamba. A reproducible environment, also including requirements for the pyvinecopulib's development and documentation, can be created using:

python scripts/generate_requirements.py --format yml # from pyvinecopulib's root
mamba env create -f environment.yml
mamba activate pyvinecopulib

Alternatively, you can specify manually the location of Eigen and Boost using the environment variables EIGEN3_INCLUDE_DIR and Boost_INCLUDE_DIR respectively. On Linux, you can install the required packages and set the environment variables as follows:

sudo apt-get install libeigen3-dev libboost-all-dev
export Boost_INCLUDE_DIR=/usr/include
export EIGEN3_INCLUDE_DIR=/usr/include/eigen3

Finally, you can build and install pyvinecopulib using pip:

pip install .

Stubs can then be generated using:

PYTHONPATH=$(python -c "import site; print(site.getsitepackages()[0])") \
              python -m nanobind.stubgen \
                -m pyvinecopulib.pyvinecopulib_ext \
                -o src/pyvinecopulib/__init__.pyi \
                -M src/pyvinecopulib/py.typed

Note that the generate_requirements.py script can also be used to generate a requirements.txt file for use with pip via the --format option:

python scripts/generate_requirements.py --format txt

Building the documentation

Documentation for the example project is generated using Sphinx and the "Read the Docs" theme. The following command generates HTML-based reference documentation; for other formats please refer to the Sphinx manual:

cd docs
python serve_sphinx.py

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

pyvinecopulib-0.7.3.tar.gz (1.6 MB view details)

Uploaded Source

Built Distributions

pyvinecopulib-0.7.3-cp312-abi3-win_amd64.whl (1.4 MB view details)

Uploaded CPython 3.12+Windows x86-64

pyvinecopulib-0.7.3-cp312-abi3-musllinux_1_2_x86_64.whl (2.0 MB view details)

Uploaded CPython 3.12+musllinux: musl 1.2+ x86-64

pyvinecopulib-0.7.3-cp312-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.6 MB view details)

Uploaded CPython 3.12+manylinux: glibc 2.17+ x86-64

pyvinecopulib-0.7.3-cp312-abi3-macosx_11_0_arm64.whl (1.4 MB view details)

Uploaded CPython 3.12+macOS 11.0+ ARM64

pyvinecopulib-0.7.3-cp311-cp311-win_amd64.whl (1.4 MB view details)

Uploaded CPython 3.11Windows x86-64

pyvinecopulib-0.7.3-cp311-cp311-musllinux_1_2_x86_64.whl (2.0 MB view details)

Uploaded CPython 3.11musllinux: musl 1.2+ x86-64

pyvinecopulib-0.7.3-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.6 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ x86-64

pyvinecopulib-0.7.3-cp311-cp311-macosx_11_0_arm64.whl (1.4 MB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

pyvinecopulib-0.7.3-cp310-cp310-win_amd64.whl (1.4 MB view details)

Uploaded CPython 3.10Windows x86-64

pyvinecopulib-0.7.3-cp310-cp310-musllinux_1_2_x86_64.whl (2.0 MB view details)

Uploaded CPython 3.10musllinux: musl 1.2+ x86-64

pyvinecopulib-0.7.3-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.6 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ x86-64

pyvinecopulib-0.7.3-cp310-cp310-macosx_11_0_arm64.whl (1.4 MB view details)

Uploaded CPython 3.10macOS 11.0+ ARM64

pyvinecopulib-0.7.3-cp39-cp39-win_amd64.whl (1.4 MB view details)

Uploaded CPython 3.9Windows x86-64

pyvinecopulib-0.7.3-cp39-cp39-musllinux_1_2_x86_64.whl (2.0 MB view details)

Uploaded CPython 3.9musllinux: musl 1.2+ x86-64

pyvinecopulib-0.7.3-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.6 MB view details)

Uploaded CPython 3.9manylinux: glibc 2.17+ x86-64

pyvinecopulib-0.7.3-cp39-cp39-macosx_11_0_arm64.whl (1.4 MB view details)

Uploaded CPython 3.9macOS 11.0+ ARM64

File details

Details for the file pyvinecopulib-0.7.3.tar.gz.

File metadata

  • Download URL: pyvinecopulib-0.7.3.tar.gz
  • Upload date:
  • Size: 1.6 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for pyvinecopulib-0.7.3.tar.gz
Algorithm Hash digest
SHA256 2697eea43435492f00172dd9d51a757c72127ae13b13023319737e0e08679cd7
MD5 4fef0efc4f09911fc25ed486d3251a0c
BLAKE2b-256 549f9e50bf05c8115dd567f758d289e3adffbd7ae95a0a3a25d7944dbfee9cc3

See more details on using hashes here.

File details

Details for the file pyvinecopulib-0.7.3-cp312-abi3-win_amd64.whl.

File metadata

File hashes

Hashes for pyvinecopulib-0.7.3-cp312-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 b83e89c89788e419b295343ea85572d159138f2df9c315c1ba00f23d8a9be5e1
MD5 550fbd156da382aaf8d37e1e78c8e4ce
BLAKE2b-256 12d672de41ab2cef7f300579bb66c18668c1741242e32fc964d60d6fcd723729

See more details on using hashes here.

File details

Details for the file pyvinecopulib-0.7.3-cp312-abi3-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for pyvinecopulib-0.7.3-cp312-abi3-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 61f5b5ee8369eef607d8312c78e04c2371e2a93ec4b1b52c42af1d6363bb3617
MD5 ef81efcff328f88b1a55ad8ea6258f8a
BLAKE2b-256 d82a3d0a2fa011530e9e010ee29f321fb3f440cd4b588d209d28ba0b5250bfd0

See more details on using hashes here.

File details

Details for the file pyvinecopulib-0.7.3-cp312-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for pyvinecopulib-0.7.3-cp312-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 b80d7b8e68db31c26d3d487d738f02d99a20eddfe54a794ae24a67b6e8085d24
MD5 c625201c9728dacc9acfe174ecd9a7dd
BLAKE2b-256 04703a646ad3ec651d6cb49f12b14bf8d8d303ef1c2b0014736a59ea7175d722

See more details on using hashes here.

File details

Details for the file pyvinecopulib-0.7.3-cp312-abi3-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for pyvinecopulib-0.7.3-cp312-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 b7ceb3030ae707d34eba594e73bfb862337f98aacab25e96613b2afbbe60c742
MD5 74076753b2703d7f01dff0225abf50f2
BLAKE2b-256 4d0895bec81fd98711379a09b443664208ec0ff3e0d2fcf4a43a89cb7aaf6a54

See more details on using hashes here.

File details

Details for the file pyvinecopulib-0.7.3-cp311-cp311-win_amd64.whl.

File metadata

File hashes

Hashes for pyvinecopulib-0.7.3-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 f30b8cb3c0bee5e008d6ecf52ffe49602d4b713d812ad4ae5da61ef1e244181f
MD5 d5a72ebf0196e8c0af1b0ccf43458f7e
BLAKE2b-256 ba6df5d78c17a38dec134f0ede68424438cd84459bfd534c69b44c9f020f7a64

See more details on using hashes here.

File details

Details for the file pyvinecopulib-0.7.3-cp311-cp311-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for pyvinecopulib-0.7.3-cp311-cp311-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 1e8cb5127c6d7074d9e85b6432d6fe86178954b93cdd826b9c11c8d33da4f1d2
MD5 c9b2e3608b47e0c5d5b7a2ccc082a448
BLAKE2b-256 929981db642328f9b9005d51f17906caa22443eb74227856a73baccd2a578633

See more details on using hashes here.

File details

Details for the file pyvinecopulib-0.7.3-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for pyvinecopulib-0.7.3-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 58d7250d66b0959e2600d5bb15f09fce3b75711c6f84eba71f9a13615d839b1c
MD5 ac5286817c68cb8ed79a339c8571e29c
BLAKE2b-256 28a6893e79c5bff1d7818f887f724cbc2dc458d5e515b33266a7ea8fff4aba80

See more details on using hashes here.

File details

Details for the file pyvinecopulib-0.7.3-cp311-cp311-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for pyvinecopulib-0.7.3-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 7afe9efd3f409a0f87e49fc3bb63eba01895f2df0c181d8f24c93104951dbe5f
MD5 3c928bbb6aff59f7c7e121bb2e64b3ca
BLAKE2b-256 a776461c0bd35a89b3f169df76ebc8d1ea07ee61584a2147dfea787cdc34c26c

See more details on using hashes here.

File details

Details for the file pyvinecopulib-0.7.3-cp310-cp310-win_amd64.whl.

File metadata

File hashes

Hashes for pyvinecopulib-0.7.3-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 4d9e5c5c0609a8864351725dc84c9379feebf51e82e753783e804ea2f222783f
MD5 e716d75b4115a4bbbbbfb46c35277223
BLAKE2b-256 b45d6365a49f361df95d7a33636b369e3aa6a569c809ecb367e7bab4d4d7fc54

See more details on using hashes here.

File details

Details for the file pyvinecopulib-0.7.3-cp310-cp310-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for pyvinecopulib-0.7.3-cp310-cp310-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 d2b8f3fdbc49a26ab34276d6a839e6e782f11af2100f70966e3cfbcdf05147e0
MD5 9197ed9b1044f63d94b36dab6295cb0a
BLAKE2b-256 d803bdd02e4977275b33b2bf2e4be74f35f01a1ed60ab98b17b83e1cd8e5618b

See more details on using hashes here.

File details

Details for the file pyvinecopulib-0.7.3-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for pyvinecopulib-0.7.3-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 6c8d5b877795633bd634d41f3aa34ddb14a5b4debb768da8b5f04f96a76e7770
MD5 1b02476338fa9fb933aaec92b0a3e275
BLAKE2b-256 c850995af1189c8290061860d9498d2d678a99d93ba0ffc57ac2885bec72970b

See more details on using hashes here.

File details

Details for the file pyvinecopulib-0.7.3-cp310-cp310-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for pyvinecopulib-0.7.3-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 09aab1ea266cb8d97349e47e5dedc0147ac73f1cd267382caa1bba584d49000d
MD5 e75375215e8d233ce7eff467260e05a2
BLAKE2b-256 72c8ac36de1a49c3536b7faa9a05fdbd24db3d58e549764458950867ab70fa3d

See more details on using hashes here.

File details

Details for the file pyvinecopulib-0.7.3-cp39-cp39-win_amd64.whl.

File metadata

File hashes

Hashes for pyvinecopulib-0.7.3-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 e2e96e9b35dc101036ac273c4c73bcd2a43d403c2394c5df0e8959b2e96af4a3
MD5 d7b00abb535083791f36ffb669767ce3
BLAKE2b-256 c65221f7a2f23f7907d4fe5333f70c9ba0774c383967e3181d49af97d6645399

See more details on using hashes here.

File details

Details for the file pyvinecopulib-0.7.3-cp39-cp39-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for pyvinecopulib-0.7.3-cp39-cp39-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 6723d77fdcd8513f866f975f3a5ba9884ecdc04ddcd48f2545ea5755b1a41ef5
MD5 bbbc50ae38d44c9222471a56714fa5d5
BLAKE2b-256 9fedcdef423f710bd1df1c4b84d7f24c2306cbce98c75e56bbbf30410b8d9739

See more details on using hashes here.

File details

Details for the file pyvinecopulib-0.7.3-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for pyvinecopulib-0.7.3-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 1735b0bbce9e09da85cf537a326d7cef6cfcf85ee3472c30acdcadd611dc9896
MD5 c1b1b40cc39b6ecd191477599d5a9026
BLAKE2b-256 217e396b5703ca5d5149c8f25165da08e055466a6000bd2a5ba7934f61f63769

See more details on using hashes here.

File details

Details for the file pyvinecopulib-0.7.3-cp39-cp39-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for pyvinecopulib-0.7.3-cp39-cp39-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 a7f571fef89de31733f087e16338fa0d3f76c66c2e5aa4d46d26843371104a5f
MD5 19249e522028c5900fcaeac461c9ca1c
BLAKE2b-256 3e53eea5726baec24d83232ab2e2aded18e4342cd91d08ba27aa89a7228cf05a

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page