Copula modeling for Python (NumPy) and Rust: vines, pair copulas, and reference-tested pseudo-observation workflows
Project description
rscopulas
rscopulas is a Python package for fitting, evaluating, and sampling copula models on validated pseudo-observations, backed by a Rust core built with PyO3 and maturin.
Install
pip install rscopulas
Optional plotting helpers are available with:
pip install "rscopulas[viz]"
Included models
- Gaussian and Student t copulas
- Archimedean families including Clayton, Frank, and Gumbel
- Pair copulas, including Khoudraji constructions
- C-vine, D-vine, and R-vine copulas
- Hierarchical Archimedean copulas
Python example
import numpy as np
from rscopulas import GaussianCopula
data = np.array(
[
[0.12, 0.18],
[0.21, 0.25],
[0.82, 0.79],
],
dtype=np.float64,
)
fit = GaussianCopula.fit(data)
print("AIC:", fit.diagnostics.aic)
print("sample:\n", fit.model.sample(4, seed=7))
Project links
- Source: https://github.com/alexwox/rscopulas
- Documentation: https://github.com/alexwox/rscopulas/tree/master/docs
- Issue tracker: https://github.com/alexwox/rscopulas/issues
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file rscopulas-0.1.0.tar.gz.
File metadata
- Download URL: rscopulas-0.1.0.tar.gz
- Upload date:
- Size: 92.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/1.13.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
206db26856c8739a46ec12c4a8de4a904a1786d1239e716363b63c1223a81cd4
|
|
| MD5 |
fa2df81e23d047e0ba152bc7322fe765
|
|
| BLAKE2b-256 |
09f38ce7939bf3bee049f48395469e48f654cdca084332865e8d35ce74c82f83
|
File details
Details for the file rscopulas-0.1.0-cp313-cp313-macosx_11_0_arm64.whl.
File metadata
- Download URL: rscopulas-0.1.0-cp313-cp313-macosx_11_0_arm64.whl
- Upload date:
- Size: 567.2 kB
- Tags: CPython 3.13, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/1.13.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
881388222e0b028c30e9015e1aabb9985eb564b68659b971bc79f19ad18e2cae
|
|
| MD5 |
533f8868e98aa9474ce1734927c601a7
|
|
| BLAKE2b-256 |
d1937fb75545d4c8bc6642665406bbcbe212a90e7126e6d32df052cbde22952b
|