voiage.schema.DecisionOption
Represents a single arm in a clinical trial design.
Attributes
Section titled “Attributes”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.
Examples
Section titled “Examples”>>> from voiage.schema import DecisionOption >>> arm = DecisionOption(name=“Standard care”, sample_size=100) >>> arm.to_dict() {‘name’: ‘Standard care’, ‘sample_size’: 100}
Raises
Section titled “Raises”InputError
If name is not a non-empty string or sample_size is not a
positive integer.
Methods
Section titled “Methods”to_dict
Section titled “to_dict”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
Section titled “from_dict”from_dict([positional or keyword] cls: None = None, [positional or keyword] data: object = None) -> DecisionOptionDeserialize a decision option from a dictionary.
Parameters:
clsdataobject
Returns: DecisionOption