voiage.schema.Intervention
Represents a candidate intervention or strategy in a decision problem.
Attributes
Section titled “Attributes”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.
Examples
Section titled “Examples”>>> from voiage.schema import Intervention >>> arm = Intervention(intervention_id=“int_01”, name=“Treatment A”, is_reference=True) >>> arm.name ‘Treatment A’
Methods
Section titled “Methods”to_dict
Section titled “to_dict”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
Section titled “from_dict”from_dict([positional or keyword] cls: None = None, [positional or keyword] data: object = None) -> InterventionDeserialize intervention from dictionary.
Parameters:
clsdataobject
Returns: Intervention