Embedded source prior¶
- class stix.core.embedded_source_prior.EmbeddedSourcePrior(*args, **kwargs)¶
Bases:
ProtocolProtocol for sampling an embedded source \(z_{\mathrm{src}}\) from a prior.
For modalities with a two-sided interpolant, this is can be used to fill missing
embedded_pairs.sourcevalues at training and sampling time.- NOTE:
runtime_checkableso a prior can be recognised byisinstance alongside the other modality fields. The check is structural: it tests that
__call__exists, never its signature.
- __call__(key, shape)¶
Sample an embedded source \(z_{\mathrm{src}}\) of the given shape.
- Parameters:
- Returns:
An embedded source sample \(z_{\mathrm{src}}\).
- Return type:
- NOTE: