Data Structures¶
Additional data structures used in SPFlow.
IntervalEvidence¶
Container for interval-based evidence (censored data) for range queries.
- class spflow.meta.data.interval_evidence.IntervalEvidence(low, high)[source]¶
Bases:
objectRepresents interval bounds for range inference queries.
Use this instead of a point evidence tensor when computing P(low <= X <= high).
- low¶
Lower bounds tensor of shape (batch, features). Use NaN for no lower bound.
- high¶
Upper bounds tensor of shape (batch, features). Use NaN for no upper bound.
Example
>>> import torch >>> evidence = IntervalEvidence( ... low=torch.tensor([[0.2, 0.3]]), ... high=torch.tensor([[0.8, 0.7]]) ... ) >>> evidence.shape torch.Size([1, 2])