Vinecop.from_file
- Vinecop.from_file(filename: str, check: bool = True) pyvinecopulib.core.Vinecop
Instantiates from a JSON or CBOR file.
Files ending in
.cborare read as CBOR. All other filenames are read as JSON for backwards compatibility. The input contains 2 attributes:"structure"for the vine structure, which itself contains attributes"array"for the structure triangular array and"order"for the order vector, and"pair copulas"."pair copulas"contains a list of attributes for the trees ("tree1","tree2", etc), each containing a list of attributes for the edges ("pc1","pc2", etc). See the corresponding method ofBicopobjects for the encoding of pair-copulas.- Parameters:
- filenamestr
The name of the file to read.
- checkbool
Whether to check if the
"structure"node of the input represents a valid R-vine structure.