TorchVinecop.from_data

classmethod TorchVinecop.from_data(u, structure=None, controls=None, var_types=[])

Fit a pure-PyTorch TLL vine on u.

When structure is None the R-vine structure and its pair copulas are selected and fit natively in torch by select() — the array-agnostic analogue of Vinecop’s Dissmann / Wilson selection (edge weights use Kendall’s tau via wdm).

When a structure is given it is fixed and the pair copulas are fit on it tree by tree (fit()): at each (tree, edge) the pair of pseudo-obs columns is collected by the same rule as the pdf / rosenblatt cascade, a TorchBicop is fit via from_data(), and hfunc1 / hfunc2 propagate forward.

Either way the result matches Vinecop’s TLL fit to machine precision when cache_integrals=False. Structure selection honors controls.trunc_lvl / tree_criterion / threshold / tree_algorithm / seeds.

Parameters:
undarray or Tensor, shape (n, d), dtype float

Pseudo-observations.

structureRVineStructure or None, default=None

Vine skeleton. None selects one natively in torch (continuous variables only).

controlsFitControlsTorchVinecop or None, default=None

Pair-copula fit controls bundled with the vine-level structure-selection and placement / cascade knobs. None defaults to TLL on a 30x30 normal-spaced grid, float64, mst_prim with trunc_lvl=20.

var_typeslist of str, default=[]

Per-variable types; only "c" (continuous) is supported. Empty means all-continuous.

Returns:
TorchVinecop

A fitted TorchVinecop.

Raises:
NotImplementedError

If any var_types entry is not "c" (continuous only).

Notes

With structure=None the selected vine — its variable order, R-vine matrix encoding, and reused pair copulas — reproduces Vinecop’s selection on the same data.