Uncertainty
SedaroML fields can hold uncertain quantities: statistical distributions in place of concrete values. This makes uncertainty a property of the model rather than of analysis scripts around it — the same model describes both the nominal system and the space of its variations, which is the foundation for Monte Carlo studies run via Workflows.
Declaring Uncertainty
Any numeric field may be given a distribution instead of a concrete value — as an ontology-level default or per instance:
class Deployable(Ontology):
springConstant: float = NormalDistribution(mu=120.0, sigma=4.0)
"""Spring constant of the deployment mechanism."""
panel = SolarPanel(efficiency=UniformDistribution(min=0.28, max=0.31))
An uncertain value carries a nominal value (e.g. the mean, mode, or midpoint of its distribution) and behaves as that nominal value if the model is used without sampling.
Available distributions:
| Distribution | Kind | Parameters |
|---|---|---|
| Uniform | continuous | min, max |
| Triangular | continuous | min, max, mode |
| Normal | continuous | mu, sigma |
| Poisson | continuous | lam |
| Generic | continuous | arbitrary density function over a range |
| Discrete | discrete | values, optional weights |
| Binomial | discrete (integer) | n, p |
| Uniform unit vector | vector | — (random direction on the unit sphere) |
Sampling
A model with any uncertain field (anywhere in its tree) is uncertain. Sampling an uncertain model produces a new, fully concrete copy — the original is untouched:
trial_7 = model.sample(seed=7)
Sampling is deterministic and independent per field: the sample seed is combined with each instance's ID and field name to seed that field's draw. The same seed always reproduces the same trial, and changing one field's distribution does not perturb the draws of the others. This makes large studies reproducible run-to-run and robust to model edits.
Uncertain fields survive serialization: a serialized model preserves its distributions (not just nominal values), so an uncertain model can be shared, versioned, and sampled elsewhere.
Typical Study Shape
- Author one model with distributions on the uncertain parameters.
- For trial
i, takemodel.sample(seed=i)and simulate the concrete copy. - Aggregate result streams across trials via Workflows and the Artifact Service.
Because each trial's model is an ordinary concrete model, everything else in the platform — compilation caching, deterministic execution, result handling — applies unchanged.