Vinecop.__init__

Vinecop.__init__(*args, **kwargs)

Creates a new instance of the class.

  1. __init__(self: pyvinecopulib.Vinecop, d: int) -> None

Instantiates a D-vine with all pair-copulas set to independence.

Parameters:

d – The dimension (= number of variables) of the model.

  1. __init__(self: pyvinecopulib.Vinecop, structure: pyvinecopulib.RVineStructure, pair_copulas: list[list[pyvinecopulib.Bicop]] = [], var_types: list[str] = []) -> None

Instantiates an arbitrary vine copula model.

Parameters:
  • structure – An RVineStructure object specifying the vine structure.

  • pair_copulasBicop objects specifying the pair-copulas, namely a nested list such that pc_store[t][e] contains a Bicop object for the pair copula corresponding to tree t and edge e.

  • var_types – Strings specifying the types of the variables, e.g., ("c", "d") means first variable continuous, second discrete. If empty, then all variables are set as continuous.

  1. __init__(self: pyvinecopulib.Vinecop, matrix: numpy.ndarray[numpy.uint64[m, n]], pair_copulas: list[list[pyvinecopulib.Bicop]] = [], var_types: list[str] = []) -> None

Instantiates an arbitrary vine copula model.

Parameters:
  • matrix – An R-vine matrix specifying the vine structure.

  • pair_copulasBicop objects specifying the pair-copulas, namely a nested list such that pc_store[t][e] contains a Bicop object for the pair copula corresponding to tree t and edge e.

  • var_types – Strings specifying the types of the variables, e.g., ("c", "d") means first variable continuous, second discrete. If empty, then all variables are set as continuous.

  1. __init__(self: pyvinecopulib.Vinecop, data: numpy.ndarray[numpy.float64[m, n]], structure: pyvinecopulib.RVineStructure = <pyvinecopulib.RVineStructure> 1, var_types: list[str] = [], controls: pyvinecopulib.FitControlsVinecop = FitControlsVinecop()) -> None

Instantiates from data. Equivalent to creating a default Vinecop() and then selecting the model using select().

Parameters:
  • data – An \(n \times d\) matrix of observations.

  • structure – An RVineStructure object specifying the vine structure. If empty, then it is selected as part of the fit.

  • var_types – Strings specifying the types of the variables, e.g., ("c", "d") means first variable continuous, second discrete. If empty, then all variables are set as continuous.

  • controls – See FitControlsVinecop().

  1. __init__(self: pyvinecopulib.Vinecop, data: numpy.ndarray[numpy.float64[m, n]], matrix: numpy.ndarray[numpy.uint64[m, n]] = array([], shape=(0, 0), dtype=uint64), var_types: list[str] = [], controls: pyvinecopulib.FitControlsVinecop = FitControlsVinecop()) -> None

Instantiates from data. Equivalent to creating a default Vinecop() and then selecting the model using select().

Parameters:
  • data – An \(n \times d\) matrix of observations.

  • matrix – Either an empty matrix (default) or an R-vine structure matrix, see select(). If empty, then it is selected as part of the fit.

  • var_types – Strings specifying the types of the variables, e.g., ("c", "d") means first variable continuous, second discrete. If empty, then all variables are set as continuous.

  • controls – See FitControlsVinecop().

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

Instantiates from a JSON file. The input file contains 2 attributesThe input file 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 of Bicop objects for the encoding of pair-copulas.

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

  • check – Whether to check if the "structure" node of the input represents a valid R-vine structure.