Vinecop.cdf
- Vinecop.cdf(self, u: numpy.ndarray, N: int = 10000, num_threads: int = 1, seeds: collections.abc.Sequence[int] = []) numpy.ndarray
Evaluates the copula distribution.
Because no closed-form expression is available, the distribution is estimated numerically using Monte Carlo integration. The function uses quasi-random numbers from the vine model to do so.
When at least one variable is discrete, two types of “observations” are required in
u: the first \(n \; x \; d\)block contains realizations of \(F_{X_j}(X_j)\). The second \(n \; x \; d\)block contains realizations of \(F_{X_j}(X_j^-)\). The minus indicates a left-sided limit of the cdf. For, e.g., an integer-valued variable, it holds \(F_{X_j}(X_j^-) = F_{X_j}(X_j - 1)\). For continuous variables the left limit and the cdf itself coincide. Respective columns can be omitted in the second block.- Parameters:
- undarray, shape (n, m), dtype float
An \(n \times (d + k)\)or \(n \times 2d\)matrix of evaluation points, where \(k\)is the number of discrete variables (see
select()).- Nint
Integer for the number of quasi-random numbers to draw to evaluate the distribution (default: 1e4).
- num_threadsint
The number of threads to use for computations; if greater than 1, the function will generate
nsamples concurrently innum_threadsbatches.- seedslist of int
Seeds to scramble the quasi-random numbers; if empty (default), the random number quasi-generator is seeded randomly.
- Returns:
- ndarray, shape (n,), dtype float
A vector of length
ncontaining the copula distribution values.