designspace.Weights#

class designspace.Weights(values: tuple[float, ...])#

Bases: object

Relative weights over a discrete parameter’s values.

What .prior(weights=[…]) produces, and what ParamDef.prior holds for a weighted categorical, ordinal, bool, choice, or subset. Unlike an external Prior this is fully structural, so it serializes and fingerprints like any other declaration.

values#

One weight per declared value or variant, in declaration order. Relative, so they need not sum to 1.

Type:

tuple[float, …]