RVineStructure.__init__

RVineStructure.__init__(*args, **kwargs)

Overloaded function.

  1. __init__(self: pyvinecopulib.RVineStructure, d: int = 1, trunc_lvl: int = 18446744073709551615) -> None

Instantiates an RVineStructure object to a D-vine for a given dimension.

Parameter d:

The dimension.

Parameter trunc_lvl:

The truncation level. By default, it is dim - 1.

  1. __init__(self: pyvinecopulib.RVineStructure, mat: numpy.ndarray[numpy.uint64[m, n]], check: bool = True) -> None

Instantiates an RVineStructure object from a matrix representing an R-vine array.

The matrix must contain zeros in the lower right triangle and the upper left triangle must be a valid R-vine array. Truncated vines can be encoded by putting zeros above the digonal in all rows below the truncation level. Example of a 1-truncated matrix:

4 4 4 4
0 0 3 0
0 2 0 0
1 0 0 0
Parameter mat:

A matrix representing a valid R-vine array.

Parameter check:

Whether mat shall be checked for validity.

  1. __init__(self: pyvinecopulib.RVineStructure, order: List[int], trunc_lvl: int = 18446744073709551615, check: bool = True) -> None

Instantiates an RVineStructure object to a D-vine with a given ordering of the variables.

Parameter order:

The order of variables in the D-vine (diagonal entries in the R-vine array); must be a permutation of 1, …, d.

Parameter trunc_lvl:

The truncation level. By default, it is d - 1.

Parameter check:

Whether `order shall be checked for validity.

  1. __init__(self: pyvinecopulib.RVineStructure, filename: str, check: bool = True) -> None

Instantiates an RVineStructure from a JSON file.

The file needs to contain two values: "array" for the structure triangular array and "order" for the order vector.

Parameter filename:

The name of the JSON file to read.

Parameter check:

Whether to check if the input represents a valid R-vine matrix.