DVineStructure.from_matrix
- DVineStructure.from_matrix(mat: numpy.ndarray, check: bool = True) pyvinecopulib.core.RVineStructure
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:
- matndarray, shape (n, m), dtype int
A matrix representing a valid R-vine array.
- checkbool
Whether
matshall be checked for validity.