Skip to content

voiage.schema.DecisionOption

Represents a single arm in a clinical trial design.

name : str The name of the trial arm (e.g., “Treatment A”, “Placebo”). sample_size : int The number of subjects to be allocated to this arm.

>>> from voiage.schema import DecisionOption >>> arm = DecisionOption(name=“Standard care”, sample_size=100) >>> arm.to_dict() {‘name’: ‘Standard care’, ‘sample_size’: 100}

InputError If name is not a non-empty string or sample_size is not a positive integer.

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

Serialize the decision option to a dictionary.

Parameters:

  • self

Returns: dict[str, object]

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

Deserialize a decision option from a dictionary.

Parameters:

  • cls
  • data object

Returns: DecisionOption