Skip to content

voiage.schema.Intervention

Represents a candidate intervention or strategy in a decision problem.

intervention_id : str Stable identifier for the intervention or strategy. name : str Human-readable intervention name. description : str, optional Optional description of the intervention. is_reference : bool, default=False True when this intervention is the comparator or reference arm. category : str, optional Optional grouping label for the intervention.

>>> from voiage.schema import Intervention >>> arm = Intervention(intervention_id=“int_01”, name=“Treatment A”, is_reference=True) >>> arm.name ‘Treatment A’

to_dict([positional or keyword] self: None = None) -> dict[str, object]

Serialize intervention to dictionary conforming to InterventionV1 schema.

Parameters:

  • self

Returns: dict[str, object]

from_dict([positional or keyword] cls: None = None, [positional or keyword] data: object = None) -> Intervention

Deserialize intervention from dictionary.

Parameters:

  • cls
  • data object

Returns: Intervention