Copulalib
This is a package/library in python to model the copulas. This was developed as part of my PhD thesis.
This contains module for the following copula:
- Frank
- Clayton
- Gumbel
Installing copulalib
Installing copulalib is done by
python setup.py install
with the usual Distutils options available
Usage
Import required modules
import numpy as np
import matplotlib.pyplot as plt
from copulalib.copulalib import Copula
Generate random (normal distributed) numbers
x = np.random.normal(size=100)
y = 2.5*x+ np.random.normal(size=100)
Make the instance of Copula class with x, y and clayton family
foo = Copula(x, y, family='clayton')
Print the Kendall's rank correlation
print(foo.tau)
Print spearmen's correlation
print(foo.sr)
Print pearson's correlation
print(foo.pr)
Print the parameter (theta) of copula
print(foo.theta)
Generate the 1000 samples (U,V) of copula
X1, Y1 = foo.generate_xy(1000)
For more details see the test.py file inside module.
Changes
Version 1.0.0 -- May, 2011 --- Initial release
Version 1.1.0 -- June, 2011 --- changed from function orieted to object oriented, documentation improved
version 2.0.0 -- Oct, 2022 --- Updated for Python 3, removed the dependancy on statistics library
Any questions/comments
If you have any comment/suggestion/question, please feel free to write me at satkumartomer@gmail.com
You may go through https://github.com/tomersk/learn-python to see the examples.
Metadata
Release files for copulalib 2.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| copulalib-2.0.1.tar.gz | 13.8 kB | Without provenance | Details for copulalib-2.0.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| copulalib-2.0.1-py3-none-any.whl | Python 3 | none | any | Details for copulalib-2.0.1-py3-none-any.whl |
Total release size: 28.3 kB
Release files / copulalib-2.0.1.tar.gz
| Download URL | copulalib-2.0.1.tar.gz |
|---|---|
| Size | 13.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
3321bc915139a2b5b9505c93487ea9b37d4500321c026221e91eacab54b5c358
|
|
BLAKE2b-256 checksum How to use checksums |
1d67ae35d0e3ccb4bb2538c85a154f2423f6eac7bb9879e375283ad7ad972989
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.9.7
|
Release files / copulalib-2.0.1-py3-none-any.whl
| Download URL | copulalib-2.0.1-py3-none-any.whl |
|---|---|
| Size | 14.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
f4e028972c5c6ba7ebd3b9dcc8e3b9b27c67fd6b6f87a3dd3b301373f4537df3
|
|
BLAKE2b-256 checksum How to use checksums |
6e7f638989e3e9c363522993d233edf37c39320aa1ad463d540014bcd3662aa2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.9.7
|
Security for copulalib 2.0.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.