Python copulae library for dependency modelling
Project description
Copulae
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.
Continuous Integration
Documentation
Coverage
Installing
Install and update using pip
pip install -U copulae
Still working on the conda build. Please wait a while more!!
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
print(cop.params)
# overriding parameters
cop[:] = np.eye(8) # in this case, setting to independent Gaussian Copula
I'll work on the docs and other copulas as soon as I can!
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
- Elliptical Copulas
- Gaussian (Normal)
- Student (T)
- Implement in Archmedeans copulas
- Clayton
- Gumbel
- Frank
- Joe
- AMH
- Implement goodness of fit
- Implement mixed copulas
- Implement more solvers
- Implement convenient graphing functions
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file copulae-0.2.2.tar.gz
.
File metadata
- Download URL: copulae-0.2.2.tar.gz
- Upload date:
- Size: 185.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.12.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.8.0 tqdm/4.31.1 CPython/3.6.8
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6bdf53472d5e9fcf72760eb4da4da12c379501db5736c1536edf2d1e62a86d7c |
|
MD5 | 374cc4332da699632397acbb9be6f88f |
|
BLAKE2b-256 | 8c84ef0212fa53c8a259ba0d239d34ea9cfc0b57ddb483f42dfd6dccd95e3009 |
File details
Details for the file copulae-0.2.2-py3-none-any.whl
.
File metadata
- Download URL: copulae-0.2.2-py3-none-any.whl
- Upload date:
- Size: 205.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.12.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.8.0 tqdm/4.31.1 CPython/3.6.8
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | df3ef853f5c7c60bd6b4d295756e695bcda2adb94b3cb85a8793f6c0b8b649c6 |
|
MD5 | 5c66acfe10bf6906d3deec56670c750f |
|
BLAKE2b-256 | 7e25160a4e0e553076f3103bbce012d3955b283655fb174944b4260495f6b1bb |