Skip to main content

Python copulae library for dependency modelling

Project description

Copulae

Probably the second most popular copula package in Python. 😣

Copulae is a package used to model complex dependency structures. Copulae implements common and popular copula structures to bind multiple univariate streams of data together. All copula implemented are multivariate by default.

Versions

Anaconda Version PyPI version

Continuous Integration

Build Status Anaconda-Server Badge Downloads Anaconda-Server Badge

Documentation

Documentation Status

Coverage

Coverage Status

Installing

Install and update using pip and on conda.

# conda
conda install -c conda-forge copulae 
# PyPI
pip install -U copulae

Documentation

The documentation is located at https://copulae.readthedocs.io/en/latest/. Please check it out. :)

Simple Usage

from copulae import NormalCopula
import numpy as np

np.random.seed(8)
data = np.random.normal(size=(300, 8))
cop = NormalCopula(8)
cop.fit(data)

cop.random(10)  # simulate random number

# getting parameters
p = cop.params
# cop.params = ...  # you can override parameters too, even after it's fitted!  

# get a summary of the copula. If it's fitted, fit details will be present too
cop.summary()

# overriding parameters, for Elliptical Copulae, you can override the correlation matrix
cop[:] = np.eye(8)  # in this case, this will be equivalent to an Independent Copula

Most of the copulae work roughly the same way. They share pretty much the same API. The difference lies in the way they are parameterized. Read the docs to learn more about them. 😊

Acknowledgements

Most of the code has been implemented by learning from others. Copulas are not the easiest beasts to understand but here are some items that helped me along the way. I would recommend all the works listed below.

Elements of Copula Modeling with R

I referred quite a lot to the textbook when first learning. The authors give a pretty thorough explanation of copula from ground up. They go from describing when you can use copulas for modeling to the different classes of copulas to how to fit them and more.

Blogpost from Thomas Wiecki

This blogpost gives a very gentle introduction to copulas. Before diving into all the complex math you'd find in textbooks, this is probably the best place to start.

Motivations

I started working on the copulae package because I couldn't find a good existing package that does multivariate copula modeling. Presently, I'm building up the package according to my needs at work. If you feel that you'll need some features, you can drop me a message. I'll see how I can schedule it. 😊

TODOS

  • Set up package for pip and conda installation
  • More documentation on usage and post docs on rtd (Permanently in the works 😊)
  • Elliptical Copulas
    • Gaussian (Normal)
    • Student (T)
  • Implement in Archimedean copulas
    • Clayton
    • Gumbel
    • Frank
    • Empirical
    • Joe
    • AMH
    • Rho finding via Cubatures
  • Mixture copulas
    • Gaussian Mixture Copula
    • Generic Mixture Copula
    • Marginal Copula
  • Vine Copulas
  • Copula Tests
    • Radial Symmetry
    • Exchangeability
    • Goodness of Fit
      • Pairwise Rosenblatt
      • Multi-Independence
      • General GOF
    • Model Selection
      • Cross-Validated AIC/BIC

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

copulae-0.7.5.tar.gz (658.1 kB view details)

Uploaded Source

Built Distributions

copulae-0.7.5-cp39-cp39-win_amd64.whl (992.7 kB view details)

Uploaded CPython 3.9 Windows x86-64

copulae-0.7.5-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.whl (1.9 MB view details)

Uploaded CPython 3.9 manylinux: glibc 2.5+ x86-64

copulae-0.7.5-cp39-cp39-manylinux1_x86_64.whl (1.9 MB view details)

Uploaded CPython 3.9

copulae-0.7.5-cp39-cp39-macosx_10_9_x86_64.whl (993.7 kB view details)

Uploaded CPython 3.9 macOS 10.9+ x86-64

copulae-0.7.5-cp38-cp38-win_amd64.whl (992.2 kB view details)

Uploaded CPython 3.8 Windows x86-64

copulae-0.7.5-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.whl (2.0 MB view details)

Uploaded CPython 3.8 manylinux: glibc 2.5+ x86-64

copulae-0.7.5-cp38-cp38-manylinux1_x86_64.whl (2.0 MB view details)

Uploaded CPython 3.8

copulae-0.7.5-cp38-cp38-macosx_10_9_x86_64.whl (985.5 kB view details)

Uploaded CPython 3.8 macOS 10.9+ x86-64

copulae-0.7.5-cp37-cp37m-win_amd64.whl (987.4 kB view details)

Uploaded CPython 3.7m Windows x86-64

copulae-0.7.5-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.whl (2.0 MB view details)

Uploaded CPython 3.7m manylinux: glibc 2.5+ x86-64

copulae-0.7.5-cp37-cp37m-manylinux1_x86_64.whl (2.0 MB view details)

Uploaded CPython 3.7m

copulae-0.7.5-cp37-cp37m-macosx_10_9_x86_64.whl (986.6 kB view details)

Uploaded CPython 3.7m macOS 10.9+ x86-64

copulae-0.7.5-cp36-cp36m-win_amd64.whl (985.2 kB view details)

Uploaded CPython 3.6m Windows x86-64

copulae-0.7.5-cp36-cp36m-manylinux_2_5_x86_64.manylinux1_x86_64.whl (2.0 MB view details)

Uploaded CPython 3.6m manylinux: glibc 2.5+ x86-64

copulae-0.7.5-cp36-cp36m-manylinux1_x86_64.whl (2.0 MB view details)

Uploaded CPython 3.6m

copulae-0.7.5-cp36-cp36m-macosx_10_9_x86_64.whl (985.5 kB view details)

Uploaded CPython 3.6m macOS 10.9+ x86-64

File details

Details for the file copulae-0.7.5.tar.gz.

File metadata

  • Download URL: copulae-0.7.5.tar.gz
  • Upload date:
  • Size: 658.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.8.10

File hashes

Hashes for copulae-0.7.5.tar.gz
Algorithm Hash digest
SHA256 3b0efd9a91b618faf0fd57b2000b5c8583f4de139ce6f5011811547ef37e74ad
MD5 f6f46225c36b98b5bd4ed9500a1b4f92
BLAKE2b-256 6c88310bdd32a37101d764488a015949635777067b0200b1ab3d264477fc5c44

See more details on using hashes here.

File details

Details for the file copulae-0.7.5-cp39-cp39-win_amd64.whl.

File metadata

  • Download URL: copulae-0.7.5-cp39-cp39-win_amd64.whl
  • Upload date:
  • Size: 992.7 kB
  • Tags: CPython 3.9, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.8.10

File hashes

Hashes for copulae-0.7.5-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 c98982e60fbe8a47b0140decf4f85bf8feffc7c29d755edad6e923cd96dc797d
MD5 589be702559a441ed73913125004c99e
BLAKE2b-256 ced888ed46ff317161234e9dd88f6e249887f10400111f1191c686e26d669621

See more details on using hashes here.

File details

Details for the file copulae-0.7.5-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.whl.

File metadata

File hashes

Hashes for copulae-0.7.5-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 2c31cb72e43a49b055a5a3d892ac4b0f712f4f1eb67da98653e9a6d0ba413b0c
MD5 65a11d6bfa6e73c955f218d68c6734c2
BLAKE2b-256 202d752ae9ccd1b193afdae4877faf7c8a95695a95ff45904b82558c2628c098

See more details on using hashes here.

File details

Details for the file copulae-0.7.5-cp39-cp39-manylinux1_x86_64.whl.

File metadata

  • Download URL: copulae-0.7.5-cp39-cp39-manylinux1_x86_64.whl
  • Upload date:
  • Size: 1.9 MB
  • Tags: CPython 3.9
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.8.10

File hashes

Hashes for copulae-0.7.5-cp39-cp39-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 7f295d66de59d2f9cd79af2b8a7e6f0729ecf14386a258ae77950c39d3263597
MD5 736aaa8df2fc06a41126a84fee77bed7
BLAKE2b-256 5b37b696250629878c4789d982ac32b6cc2426d7a9064a2707a17b8178b85cf0

See more details on using hashes here.

File details

Details for the file copulae-0.7.5-cp39-cp39-macosx_10_9_x86_64.whl.

File metadata

  • Download URL: copulae-0.7.5-cp39-cp39-macosx_10_9_x86_64.whl
  • Upload date:
  • Size: 993.7 kB
  • Tags: CPython 3.9, macOS 10.9+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.8.10

File hashes

Hashes for copulae-0.7.5-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 7cf562ce46c9b228c398c49c649e18b6f409f6cb39b5f2e8a358e2a53abf5cb7
MD5 3a7c71a60c893189a8bba7a1363a90c6
BLAKE2b-256 af62647d8aab508a1bf959a95f4723f4dc0aaab721f35de82bbdf0dbf42ce101

See more details on using hashes here.

File details

Details for the file copulae-0.7.5-cp38-cp38-win_amd64.whl.

File metadata

  • Download URL: copulae-0.7.5-cp38-cp38-win_amd64.whl
  • Upload date:
  • Size: 992.2 kB
  • Tags: CPython 3.8, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.8.10

File hashes

Hashes for copulae-0.7.5-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 75fc3360e4fac5496c05107abc76fc2b449160f33d1792fdae696b58f40dd9c7
MD5 7adbeaa10b27a7babd78018d0a67e1d1
BLAKE2b-256 a12b4ae9b07d64cbfd91315257017107363f358192b12effe4886e246e44f8c8

See more details on using hashes here.

File details

Details for the file copulae-0.7.5-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.whl.

File metadata

File hashes

Hashes for copulae-0.7.5-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 38bb19191d514874476d00ad4ecf5776dd525e4d8c0bbb79e091f2d1a3d74519
MD5 b18e9acb35b2bb0098d65f46b128373e
BLAKE2b-256 e46a5dce322bda026aa19802592787d2faa9be9aecceefa53eeb0f8f509b75e7

See more details on using hashes here.

File details

Details for the file copulae-0.7.5-cp38-cp38-manylinux1_x86_64.whl.

File metadata

  • Download URL: copulae-0.7.5-cp38-cp38-manylinux1_x86_64.whl
  • Upload date:
  • Size: 2.0 MB
  • Tags: CPython 3.8
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.8.10

File hashes

Hashes for copulae-0.7.5-cp38-cp38-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 371a7afe5439e8e752e9cb43da21f78a492334c26932b28e253905f1de4c759a
MD5 ea5e4da8b451371ba1de143f348bb3ab
BLAKE2b-256 7ac41cd76067c1be069a84a4a5a6e2bdf1c3336609d05e786d4dd946e4d2e362

See more details on using hashes here.

File details

Details for the file copulae-0.7.5-cp38-cp38-macosx_10_9_x86_64.whl.

File metadata

  • Download URL: copulae-0.7.5-cp38-cp38-macosx_10_9_x86_64.whl
  • Upload date:
  • Size: 985.5 kB
  • Tags: CPython 3.8, macOS 10.9+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.8.10

File hashes

Hashes for copulae-0.7.5-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 869604e20ed4f432cb1b4a99618257be1f447648742e5e04a31fc0d5c2734cb9
MD5 ba85ed41b83025166d9c4ff7d343f9e0
BLAKE2b-256 050bc1dad1c743c3d68b5725308cfd16137ca863a07cdd52313c2275918fa528

See more details on using hashes here.

File details

Details for the file copulae-0.7.5-cp37-cp37m-win_amd64.whl.

File metadata

  • Download URL: copulae-0.7.5-cp37-cp37m-win_amd64.whl
  • Upload date:
  • Size: 987.4 kB
  • Tags: CPython 3.7m, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.8.10

File hashes

Hashes for copulae-0.7.5-cp37-cp37m-win_amd64.whl
Algorithm Hash digest
SHA256 b04fd2b3ac71bc0696a505bb2ef03041608d21492b3d3fb0425d21e7e0024cfc
MD5 6ac6b5aa0985c10b0a02cb377c951305
BLAKE2b-256 d1cc03a29fe8b8b801f03880a483564fb1eccf2b671743d598c64a0796f27a8f

See more details on using hashes here.

File details

Details for the file copulae-0.7.5-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.whl.

File metadata

File hashes

Hashes for copulae-0.7.5-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 0c911c8852190ee6cf69db86ecfd165ea73d3060325585c629f43a2c5fac914e
MD5 5568c75e7d612e5fc51c3f6e89011194
BLAKE2b-256 77b613fe63832781c1333753ed1c5b5388c83e8409a4d742ab49cb7c43bf26c8

See more details on using hashes here.

File details

Details for the file copulae-0.7.5-cp37-cp37m-manylinux1_x86_64.whl.

File metadata

  • Download URL: copulae-0.7.5-cp37-cp37m-manylinux1_x86_64.whl
  • Upload date:
  • Size: 2.0 MB
  • Tags: CPython 3.7m
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.8.10

File hashes

Hashes for copulae-0.7.5-cp37-cp37m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 42cd66b54c8635f010684820c70d9a968056b652cfe586a8b6228d46a6ad1b89
MD5 bc6d553772dcb2c027dd2993340477b4
BLAKE2b-256 1cc052d0a24ffd21684e589962b9c555edd1e10f16e8ecdb14d5f2213a54c799

See more details on using hashes here.

File details

Details for the file copulae-0.7.5-cp37-cp37m-macosx_10_9_x86_64.whl.

File metadata

  • Download URL: copulae-0.7.5-cp37-cp37m-macosx_10_9_x86_64.whl
  • Upload date:
  • Size: 986.6 kB
  • Tags: CPython 3.7m, macOS 10.9+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.8.10

File hashes

Hashes for copulae-0.7.5-cp37-cp37m-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 077b6fcb7c843b33aa61ab163d109cf4fae415916f4cd33f2bfd06dfb0cedec7
MD5 db2e33202f6946afed2f32815c5db1e5
BLAKE2b-256 84286c484eab67daef528b41c22fc982676f49feb84a384b70cd847f017c1541

See more details on using hashes here.

File details

Details for the file copulae-0.7.5-cp36-cp36m-win_amd64.whl.

File metadata

  • Download URL: copulae-0.7.5-cp36-cp36m-win_amd64.whl
  • Upload date:
  • Size: 985.2 kB
  • Tags: CPython 3.6m, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.8.10

File hashes

Hashes for copulae-0.7.5-cp36-cp36m-win_amd64.whl
Algorithm Hash digest
SHA256 e1b96d9ce8dd80017b2be53580d9ed09fdd6a7304530a43acdb2079b4d3bbd5a
MD5 cbc8d8e526de7b8928c99e49557890f3
BLAKE2b-256 d5a20b398583fbb592f7a363a8604bf1c731e7e772c3a5fa1ef01ddf967441c7

See more details on using hashes here.

File details

Details for the file copulae-0.7.5-cp36-cp36m-manylinux_2_5_x86_64.manylinux1_x86_64.whl.

File metadata

File hashes

Hashes for copulae-0.7.5-cp36-cp36m-manylinux_2_5_x86_64.manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 9374f285ce8b70b0652aa2809dca60380bf1af8389707a60ea13bdf6d8e559e6
MD5 893a6c7bcc1a8523680ec5ce894edbb9
BLAKE2b-256 0147ba32640367f97a82e4c96dc0c483772e4059ed6007b86219b6137617a0d3

See more details on using hashes here.

File details

Details for the file copulae-0.7.5-cp36-cp36m-manylinux1_x86_64.whl.

File metadata

  • Download URL: copulae-0.7.5-cp36-cp36m-manylinux1_x86_64.whl
  • Upload date:
  • Size: 2.0 MB
  • Tags: CPython 3.6m
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.8.10

File hashes

Hashes for copulae-0.7.5-cp36-cp36m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 4102cf216bb9f72b90e4f0da2b7aeab678a54a9a904465be7288d4c1c6de7d1d
MD5 716d943ce4375adcad3705f016013c26
BLAKE2b-256 66e4d727292d72ed1319bea836b0cdbfc304d1382f4cdf8d40017a57bbf9b0e9

See more details on using hashes here.

File details

Details for the file copulae-0.7.5-cp36-cp36m-macosx_10_9_x86_64.whl.

File metadata

  • Download URL: copulae-0.7.5-cp36-cp36m-macosx_10_9_x86_64.whl
  • Upload date:
  • Size: 985.5 kB
  • Tags: CPython 3.6m, macOS 10.9+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.8.10

File hashes

Hashes for copulae-0.7.5-cp36-cp36m-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 1898bb571cf2dd2c5fc1119dbcb869557b6ec9d3aa07017c4c4a91dbbe126967
MD5 33c50d8eaaf70b0b564b25b670e09ee3
BLAKE2b-256 73e86368cd197720ec22d94264e619914bba6b74998ac16848e58c846dc2dddc

See more details on using hashes here.

Supported by

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