Skip to content

Add Liouville copulas - #416

Merged
lrnv merged 15 commits into
mainfrom
lrnv/issue405
Aug 25, 2026
Merged

Add Liouville copulas#416
lrnv merged 15 commits into
mainfrom
lrnv/issue405

Conversation

@lrnv

@lrnv lrnv commented Aug 20, 2026

Copy link
Copy Markdown
Owner

Closes #405

This adds a generator-first Liouville copula implementation with arbitrary positive Dirichlet parameters and generic radial distributions derived through Williamson inversion.

It includes sampling, density and CDF evaluation, marginalization, conditioning, Rosenblatt transforms, support for real Williamson orders, documentation, and targeted tests. Integer conditioning orders retain the existing tilted-generator path; fractional orders use the conditional radial representation.

The generic test bestiary covers preserved Williamson radials and ordinary Clayton generators with both integer and non-integer alpha parameters. The CI should also help identify the cost of the fractional-order numerical paths.

@github-actions

github-actions Bot commented Aug 20, 2026

Copy link
Copy Markdown
Contributor

🟢 Tachometer — no performance regressions detected (1 improvement 🟢)

25 benchmarks compared · 579cef3d9abb7e · Julia 1.12.7 · 5% tolerance · 3× runs

Benchmark Time Memory
🟢 sampling/clayton_d5 7.03 ms → 2.3 ms (−67%) 547 KiB → 391 KiB (−29%)
Full results (25 benchmarks)
Benchmark Time Memory
⚪️ cdf/bb1_d2 1.55 ms → 1.56 ms (+1%)
⚪️ cdf/galambos_d2 1.33 ms → 1.33 ms (+0%)
⚪️ conditioning/cdf_bb1_d2 335 µs → 336 µs (+0%)
⚪️ conditioning/construct_bb1_d2_1000 633 µs → 638 µs (+1%)
⚪️ conditioning/inverse_rosenblatt_gaussian_d5 263 µs → 264 µs (+0%)
⚪️ conditioning/quantile_galambos_d2 11.4 ms → 11.4 ms (−0%)
⚪️ conditioning/rosenblatt_gaussian_d5 297 µs → 298 µs (+0%)
⚪️ data/beta_logpdf 10.3 ms → 10.2 ms (−1%)
⚪️ data/checkerboard_cdf 56.1 ms → 53.6 ms (−4%)
⚪️ data/empirical_cdf 15.2 ms → 15.2 ms (−0%)
⚪️ data/pseudos_5x10000 1.97 ms → 1.98 ms (+1%)
⚪️ density/bb1_d2 1.86 ms → 1.86 ms (+0%)
⚪️ density/galambos_d2 2.53 ms → 2.53 ms (+0%)
⚪️ density/gaussian_d10 8.53 ms → 8.59 ms (+1%)
⚪️ density/gumbel_d5 8.97 ms → 9.01 ms (+0%)
⚪️ density/nested_d6 10.4 ms → 10.3 ms (−0%)
⚪️ fitting/gaussian_mle 54.7 µs → 55.1 µs (+1%)
⚪️ fitting/gumbel_itau 143 µs → 143 µs (−0%)
⚪️ fitting/sklar_ifm 54.4 ms → 53.6 ms (−2%) 38.3 MiB → 37.9 MiB (−1%)
⚪️ sampling/archimax_d2 16.7 ms → 16.7 ms (+0%)
🟢 sampling/clayton_d5 7.03 ms → 2.3 ms (−67%) 547 KiB → 391 KiB (−29%)
⚪️ sampling/galambos_d2 82.2 ms → 82.2 ms (−0%)
⚪️ sampling/gaussian_d10 1.73 ms → 1.73 ms (−0%)
⚪️ sampling/nested_d6 121 ms → 120 ms (−1%)
⚪️ sampling/student_d2 4.4 ms → 4.4 ms (+0%)

baseline 579cef3 · target d9abb7e · Julia 1.12.7 · ARM Neoverse-N2 · min estimator · tol 5%/5% · floor 1 µs · 3× runs · run · Tachometer.jl

@lrnv lrnv mentioned this pull request Aug 21, 2026
@codecov

codecov Bot commented Aug 24, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 94.81865% with 20 lines in your changes missing coverage. Please review.
✅ Project coverage is 83.50%. Comparing base (579cef3) to head (d9abb7e).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
src/Generator/ClaytonGenerator.jl 78.94% 8 Missing ⚠️
...riateDistribution/Radials/WilliamsonFromFrailty.jl 92.94% 6 Missing ⚠️
src/LiouvilleCopula.jl 98.00% 4 Missing ⚠️
src/Generator.jl 97.87% 1 Missing ⚠️
...tribution/Radials/ClaytonWilliamsonDistribution.jl 91.66% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #416      +/-   ##
==========================================
+ Coverage   82.47%   83.50%   +1.03%     
==========================================
  Files          87       88       +1     
  Lines        6328     6640     +312     
==========================================
+ Hits         5219     5545     +326     
+ Misses       1109     1095      -14     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@lrnv
lrnv merged commit 6f0d4a6 into main Aug 25, 2026
5 of 7 checks passed
@lrnv
lrnv deleted the lrnv/issue405 branch August 25, 2026 11:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[New copula] Liouville copula family

1 participant