Vinecop.to_file
- Vinecop.to_file(self, filename: str) None
Writes the copula object into a JSON or CBOR file.
Filenames ending in
.cborare written as CBOR. All other filenames are written as JSON for backwards compatibility. The output 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). Seeto_file()objects for the encoding of pair-copulas.- Parameters:
- filenamestr
The name of the JSON file to write.