TorchBicop.simulate

TorchBicop.simulate(n=100, *, x=None, qrng=False, seeds=None)

Draws n joint samples from the fitted copula.

Uses the inverse Rosenblatt scheme: sample two independent uniforms (U1, P) and set U2 = hinv1((U1, P)) so that (U1, U2) has the fitted joint distribution.

Parameters:
nint, default=100

Number of samples to draw (must be > 0).

xTensor or None, optional

Conditioning variables. Ignored by TorchBicop (an unconditional pair copula); accepted for signature parity with the BicopLike contract.

qrngbool, default=False

If True, draw the base uniforms from a scrambled Sobol sequence instead of pseudo-random uniforms.

seedslist of int or None, optional

When qrng=True the first entry seeds the torch.quasirandom.SobolEngine scramble; when qrng=False it seeds the global torch RNG before the torch.rand call. None keeps the existing global state.

Returns:
Tensor, shape (n, 2), dtype float

Samples in (0, 1)^2.