VineCopulas
VineCopulas: an open-source Python package for vine copula modelling - Published in JOSS (2024)
Science Score: 98.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
✓DOI references
Found 3 DOI reference(s) in README and JOSS metadata -
○Academic publication links
-
✓Committers with academic emails
2 of 3 committers (66.7%) from academic institutions -
✓Institutional organization owner
Organization vu-ivm has institutional domain (www.ivm.vu.nl) -
✓JOSS paper metadata
Published in Journal of Open Source Software
Scientific Fields
Repository
A pure python implementation for vine copulas
Basic Info
- Host: GitHub
- Owner: VU-IVM
- License: gpl-3.0
- Language: Python
- Default Branch: main
- Size: 73.7 MB
Statistics
- Stars: 32
- Watchers: 0
- Forks: 4
- Open Issues: 5
- Releases: 10
Metadata Files
README.md
VineCopulas

VineCopulas is a Python package that is able to:
* Fit both bivariate and vine copulas
* Simulate from both bivariate and vine copulas
* Allow for both discrete as well as continuous input data
* Draw conditional samples for any variables of interest with the use of bivariate copulas and different vine structures
Installation
pip install vinecopulas
Getting Started
Get started by testing out the package functionality using the Abalone example data.
```python import pandas as pd import matplotlib.pyplot as plt import numpy as np from vinecopulas.marginals import * from vinecopulas.bivariate import * from vinecopulas.vinecopula import *
datapath = 'https://raw.githubusercontent.com/VU-IVM/vinecopula/develop/doc/sampledata.csv'
df = pd.readcsv(datapath)
df.head()
```
Transform the data to pseudo data and fit a survival gumbel copula between two variables. Use the fitted copula to generate random samples.
```python x = np.array(df)[:,:-1] u = pseudodata(x) # computes the pseudodata cop = 4 # copula 4 is the gumbel copula with 180 degree rotation par = fit(cop, u[:,:2]) # fit the variables in the first 2 columns n = len(u) # number of samples to generate ur = random(cop, par, n) # generate random samples
plot
plt.scatter(u[:,0],u[:,1], label = 'Data')
plt.scatter(ur[:,0], ur[:,1], alpha = 0.5, label = 'Random')
plt.xlabel('$u1$')
plt.ylabel('$u2$')
plt.legend()
```

Fit a vine copula between multiple variables in the data, considering all possible copulas available in the package.
python
cops = list(range(1,16)) # fit vine copula according to these copulas
M, P, C = fit_vinecop(u, cops, vine = 'R') # fit R-vine
plotvine(M,variables = list(df.columns[:-1]), plottitle = 'R-Vine') # plot structure

For more examples, please have a look at the documentation.
Contribution Guidelines
Please look at our Contributing Guidelines if you are interested in contributing to this package.
Asking Questions and Reporting Issues
If you encounter any bugs or issues while using VineCopulas, please report them by opening an issue in the GitHub repository. Be sure to provide detailed information about the problem, such as steps to reproduce it, including operating system and Python version.
If you have any suggestions for improvements, or questions, please also raise an issue.
Citing the Package
If you use the VineCopulas package in your work, please cite:
Claassen, J. N., Koks, E. E., de Ruiter, M. C., Ward, P. J., & Jäger, W. S. (2024). VineCopulas: an open-source Python package for vine copula modelling. Journal of Open Source Software, 9(101), 6728. https://doi.org/10.21105/joss.06728
Owner
- Name: VU-IVM
- Login: VU-IVM
- Kind: organization
- Email: s.p.vijverberg@vu.nl
- Location: Amsterdam
- Website: https://www.ivm.vu.nl/en/index.aspx
- Repositories: 2
- Profile: https://github.com/VU-IVM
VU-IVM Github page
JOSS Publication
VineCopulas: an open-source Python package for vine copula modelling
Authors
Institute for Environmental Studies, Vrije Universiteit Amsterdam, Amsterdam, The Netherlands
Institute for Environmental Studies, Vrije Universiteit Amsterdam, Amsterdam, The Netherlands
Institute for Environmental Studies, Vrije Universiteit Amsterdam, Amsterdam, The Netherlands
Tags
copula statisticsGitHub Events
Total
- Issues event: 2
- Watch event: 16
- Push event: 13
- Pull request event: 5
- Fork event: 2
Last Year
- Issues event: 2
- Watch event: 16
- Push event: 13
- Pull request event: 5
- Fork event: 2
Issues and Pull Requests
Last synced: 6 months ago
All Time
- Total issues: 6
- Total pull requests: 19
- Average time to close issues: 29 days
- Average time to close pull requests: about 21 hours
- Total issue authors: 4
- Total pull request authors: 4
- Average comments per issue: 0.67
- Average comments per pull request: 0.05
- Merged pull requests: 17
- Bot issues: 0
- Bot pull requests: 0
Past Year
- Issues: 3
- Pull requests: 3
- Average time to close issues: 3 days
- Average time to close pull requests: 2 minutes
- Issue authors: 2
- Pull request authors: 2
- Average comments per issue: 0.33
- Average comments per pull request: 0.0
- Merged pull requests: 2
- Bot issues: 0
- Bot pull requests: 0
Top Authors
Issue Authors
- couasnonanais (2)
- meh2135 (2)
- Bluerrror (1)
- EvoLandEco (1)
- thierrymoudiki (1)
Pull Request Authors
- judithclaassen (21)
- wiebkejager (3)
- ElcoK (3)
- meh2135 (2)
Top Labels
Issue Labels
Pull Request Labels
Dependencies
- matplotlib *
- numpy *
- pandas *
- scipy *
- actions/checkout v3 composite
- mamba-org/setup-micromamba v1 composite
- actions/checkout v3 composite
- actions/setup-python v4 composite
- pypa/gh-action-pypi-publish release/v1 composite
- actions/checkout v4 composite
- actions/upload-artifact v1 composite
- openjournals/openjournals-draft-action master composite