pyvinecopulib
Classes
A bivariate copula family identifier. |
|
A class for bivariate copula models. |
|
A class for controlling fits of bivariate copula models. |
|
A class for vine copula models. |
|
A class for controlling fits of vine copula models. |
|
A class for C-vine structures. |
|
A class for D-vine structures. |
|
A class for R-vine structures. |
Functions
- to_pseudo_obs(x: numpy.ndarray[numpy.float64[m, n]], ties_method: str = 'average') numpy.ndarray[numpy.float64[m, n]]
Applies the empirical probability integral transform to a data matrix.
Gives pseudo-observations from the copula by applying the empirical distribution function (scaled by \(n + 1\)) to each margin/column.
- Parameters:
x – A matrix of real numbers.
ties_method – Indicates how to treat ties; same as in R, see https://stat.ethz.ch/R-manual/R-devel/library/base/html/rank.html.
- Returns:
Pseudo-observations of the copula, i.e. \(F_X(x)\) (column-wise).
- simulate_uniform(n: int, d: int, qrng: bool = False, seeds: list[int] = []) numpy.ndarray[numpy.float64[m, n]]
Simulates from the multivariate uniform distribution.
If
qrng = TRUE
, generalized Halton sequences (seeghalton()
) are used for \(d \leq 300\) and Sobol sequences otherwise (seesobol()
).- Parameters:
n – Number of observations.
d – Dimension.
qrng – If true, quasi-numbers are generated.
seeds – Seeds of the random number generator; if empty (default), the random number generator is seeded randomly.
- Returns:
An \(n \times d\) matrix of independent \(\mathrm{U}[0, 1]\) random variables.
- ghalton(n: int, d: int, seeds: list[int] = []) numpy.ndarray[numpy.float64[m, n]]
Simulates from the multivariate Generalized Halton Sequence.
For more information on Generalized Halton Sequence, see Faure, H., Lemieux, C. (2009). Generalized Halton Sequences in 2008: A Comparative Study. ACM-TOMACS 19(4), Article 15.
- Parameters:
n – Number of observations.
d – Dimension.
seeds – Seeds to scramble the quasi-random numbers; if empty (default), the quasi-random number generator is seeded randomly.
- Returns:
An \(n \times d\) matrix of quasi-random \(\mathrm{U}[0, 1]\) variables.
- sobol(n: int, d: int, seeds: list[int] = []) numpy.ndarray[numpy.float64[m, n]]
Simulates from the multivariate Sobol sequence.
For more information on the Sobol sequence, see S. Joe and F. Y. Kuo (2008), constructing Sobol sequences with better two-dimensional projections, SIAM J. Sci. Comput. 30, 2635–2654.
- Parameters:
n – Number of observations.
d – Dimension.
seeds – Seeds to scramble the quasi-random numbers; if empty (default), the quasi-random number generator is seeded randomly.
- Returns:
An \(n \times d\) matrix of quasi-random \(\mathrm{U}[0, 1]\) variables.