RVineStructure.__init__

RVineStructure.__init__(*args, **kwargs)

Creates a new instance of the class.

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

Instantiates as a D-vine for a given dimension.

Parameters:
  • d – The dimension.

  • 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

Parameters:
  • mat – A matrix representing a valid R-vine array.

  • 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 as a D-vine with a given ordering of the variables.

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

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

  • 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 valuesThe file needs to contain two values: "array" for the structure triangular array and "order" for the order vector.

Parameters:
  • filename – The name of the JSON file to read.

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