pystra.dependence.copula.Copula#
Use it: User guide · Worked example · Theory
- class Copula[source]#
Bases:
objectInterface for continuous dependence on the unit cube.
Coordinates and returned samples follow the original marginal order. Subclasses provide cdf, logpdf, rosenblatt and inverse_rosenblatt. The Rosenblatt maps take/return uniform coordinates, not normal scores.
Methods
Evaluate the copula density at interior uniform coordinates.
Sample rows using a local NumPy random generator.
- pdf(probabilities)[source]#
Evaluate the copula density at interior uniform coordinates.
- Parameters:
probabilities (
ArrayLike) – Marginal probabilities strictly between zero and one, in original order.- Returns:
Density for one point or one value per row of points.
- Return type:
float|ndarray- Raises:
ValueError – If the coordinates have an invalid shape or lie outside the interior.
- rvs(size=1, seed=None)[source]#
Sample rows using a local NumPy random generator.
- Parameters:
size (
int) – Nonnegative number of observations.seed (
int|integer|Sequence[int] |ndarray|SeedSequence|BitGenerator|Generator|None) – Input tonumpy.random.default_rng. A supplied generator is reused and advances; other seeds construct a local generator.
- Returns:
Uniform marginal coordinates with this copula’s dependence.
- Return type:
ndarray