CVineStructure.from_trees
- CVineStructure.from_trees(d: int, trees: collections.abc.Sequence[collections.abc.Sequence[tuple[int, int, collections.abc.Sequence[int]]]]) pyvinecopulib.core.RVineStructure
Assemble an
RVineStructurefrom a list-of-trees decomposition.This is the finalization step of Dissmann-style structure selection: given the edges chosen for each tree, it produces the corresponding R-vine matrix (variable order + structure array), reusing the same diagonal policy as
selectso the result matches the compiled selector.- Parameters:
- dint
Dimension of the vine.
- treeslist of list of tuple
Per-tree edge lists, indexed
[tree][edge]. Each edge is a triple(a, b, conditioning)of 1-based variable labels, whereaandbare the conditioned pair andconditioningis the (possibly empty) conditioning set. Treetmust contain exactlyd - 1 - tedges. An empty list yields a fully truncated (independence) structure.
- Returns:
- RVineStructure
The assembled structure. Pair-copulas are not part of the input; callers fit them on the returned structure.