VinecopBase.select

static VinecopBase.select(u, fit_edge, *, trunc_lvl=None, tree_criterion='tau', threshold=0.0, tree_algorithm='mst_prim', seeds=None, to_numpy=None)

Select an R-vine structure from data (array-agnostic Dissmann).

The array-agnostic (NumPy or PyTorch) analogue of select(), with the pair-copula fit supplied by the fit_edge callback. It differs in one way: rather than mutating a vine in place (as select() does), it returns the selected structure and pairs — VinecopBase leaves pair storage to the subclass, so there is no single object to mutate. It runs the tree-by-tree Dissmann greedy search [1]: for each tree it builds a candidate graph honoring the proximity condition, weights every candidate edge by 1 - |tau| (tau is the dependence measure named by tree_criterion, Kendall’s tau by default, via wdm), and keeps a spanning tree (tree_algorithm) — maximum-dependence for the MST variants, Wilson-weighted random for the random ones. Each surviving edge’s pair copula is fit by the fit_edge callback, whose h-functions feed the next tree.

The fitted pairs are returned reused, never re-fit: each is placed on its slot in the finalized structure and reoriented with its flip() where the slot’s orientation requires it. Selection is for a simplified vine — edge weights use the unconditional pseudo-observations, so fit_edge receives x_e = None.

Parameters:
uarray, shape (n, d), dtype float

Pseudo-observations on any array-API namespace (NumPy or PyTorch).

fit_edgecallable

(tree, edge, u_e, x_e) -> BicopLike fitting one edge’s pair copula; its hfunc1 / hfunc2 must be valid immediately, and it must implement flip() (used to reorient reused pairs onto their finalized slots). x_e is always None here.

trunc_lvlint, optional

Maximum number of trees to select (default: d - 1, i.e. untruncated).

tree_criterionstr, default “tau”

Dependence measure passed to wdm for edge weighting (e.g. "tau", "rho", "hoeffd").

thresholdfloat, default 0.0

Dependence threshold: edges with criterion below it are deprioritized (weight 1.0) during spanning-tree selection.

tree_algorithmstr, default “mst_prim”

"mst_prim" / "mst_kruskal" (Dissmann) or "random_weighted" / "random_unweighted" (Wilson).

seedslist of int, optional

RNG seeds for the random tree algorithms (ignored by the MST ones).

to_numpycallable, optional

Maps a 1-d array to a NumPy array for the wdm call. Defaults to numpy.asarray(); PyTorch callers pass one that detaches and moves to host (e.g. lambda t: t.detach().cpu().numpy()).

Returns:
structureRVineStructure

The selected vine structure.

pair_copulaslist of list of BicopLike

The fitted pair copulas, indexed [tree][edge] in the structure’s column order and reoriented onto their slots — ready to host in a vine without re-fitting.

See also

pyvinecopulib.core.VinecopBase.fit

Fit pair copulas along a fixed structure.

pyvinecopulib.core.Vinecop.select

The reference (in-place) selector.

References

[1]

Dissmann, J. F., E. C. Brechmann, C. Czado, and D. Kurowicka (2013). Selecting and estimating regular vine copulae and application to financial returns. Computational Statistics & Data Analysis, 59 (1), 52-69.