pal.couplings module
Stochastic variable coupling and dependency management.
Provides coupling mechanisms for stochastic variables, allowing them to maintain dependency relationships during reordering and copula applications. Key classes include CouplingGroup for managing variable groups and ProteusStochasticVariable as the base class for all stochastic types.
- class pal.couplings.CouplingGroup(variable)[source]
Bases:
objectA class to represent a group of variables that are coupled together.
- __init__(variable)[source]
Initialize coupling group with a single variable.
- Parameters:
variable (
ProteusStochasticVariable) – The initial variable to add to the group.
- merge(other)[source]
Merge another coupling group into this one.
- Parameters:
other (
CouplingGroup) – The other coupling group to merge.- Return type:
- class pal.couplings.ProteusStochasticVariable[source]
Bases:
NDArrayOperatorsMixin,ABCA class to represent a stochastic variable in a simulation.
- upsample(n_sims)[source]
Upsample the variable to match the specified number of simulations.
- Parameters:
n_sims (
int) – The number of simulations to upsample to.- Return type:
Self- Returns:
A new instance of self with the upsampled values.