Mixture#
- class sdm.prior.Mixture(items: Sequence[T | tuple[T, float]], correlated: bool = False, key: Hashable | None = None)#
Bases:
Generic[T]Select items using fixed or shared random weights.
- Parameters:
items (Sequence[T | tuple[T, float]]) – Objects or
(object, weight)pairs. Bare objects have weight one. Weights must be nonnegative, with at least one positive value.correlated (bool) – Share random selection probabilities within an active
CorrelatedContext.key (Hashable | None) – Key for shared probabilities. Defaults to this mixture’s identity.