mixle.inference.copula_structure module¶
Copula dependence candidates for automatic structure detection (helper for mixle.inference.estimation).
Split out of mixle.inference.estimation because that module is a high-level compute utility that must
never import concrete mixle.stats.* distributions (enforced by
compute_metadata_test.py::test_high_level_compute_utilities_do_not_import_concrete_distributions) –
the same reason learn_bayesian_network/bayesian_network_bic live in mixle.inference.bayesian_network
rather than in estimation.py itself. estimation.py imports only copula_candidates() from here.
- copula_candidates(rows, composite, comp_params, comp_bic, n_log, max_its, rng)[source]
Copula dependence candidates over the composite’s per-field marginals, each scored by BIC.
Reuses the independently-detected marginals (which the composite already fitted, and which expose the CDF a copula needs for the probability-integral transform) and tries dependence cores that a linear-Gaussian Bayesian network cannot represent:
a Gaussian copula – one correlation matrix,
d(d-1)/2params on top of the marginals; the elliptical, tail-independent default.a regular vine with Dißmann structure + per-edge family selection – tried only when the Gaussian copula already shows dependence pays (so a vine is never fit on independent data), and kept only if its per-edge tail-dependence structure beats the Gaussian core by BIC. This is what lets automatic inference recognize joint tail dependence (a Clayton-style joint-crash coupling) instead of forcing it elliptical.
Returns a list of
(bic, model, description)candidates (possibly empty).