ZeroEventExposureScenario
Statistics scenarios · Implementation: mlsysim/engine/scenario_definitions/statistics.py.
Construct this scenario with keyword inputs. The fields below show the types and defaults declared by this class.
Exposure needed, with zero events observed, to bound a rate of budget per horizon at one-sided confidence, and the size of recording that exposure at sample_rate.
Notes
Equation: zero-event bound = -log(1-confidence); required exposure = bound / target event rate.
Assumptions: Events follow the stationary Poisson model used by the exposure helper and confidence lies between zero and one.
Excludes: Nonstationary hazards, correlated events, and a guarantee of zero failures after testing.
References
Derivation: zero-event bound = -log(1-confidence); required exposure = bound / target event rate. The individual properties state units and intermediate accounting; this class introduces no fitted coefficient.
Examples
The named scenario supplies illustrative inputs; the output is calculated.
>>> from mlsysim import Scenarios
>>> case = Scenarios.KeywordSpotterFalseWakeEvidence
>>> round(float(case.target_rate.to('1/h').magnitude), 3)
0.001Attributes
| Name | Description |
|---|---|
| budget | |
| confidence | |
| events_bound | One-sided Poisson expected-count bound after zero events: negative log of one |
| exposure_needed | Required observation hours from |
| horizon | |
| horizons_needed | Exposure duration divided by one budget horizon, a dimensionless observation |
| recording_size | Raw recorded bytes during the required exposure, at the supplied sample rate and |
| sample_rate | |
| sample_width | |
| target_rate | Allowed event rate in inverse hours, budget divided by horizon. |
budget
Type: float.
Declared default: required.
horizon
Type: Quantity.
Declared default: required.
confidence
Type: float.
Declared default: required.
sample_rate
Type: Quantity.
Declared default: required.
sample_width
Type: Quantity.
Declared default: required.
target_rate
engine.scenario_types.ZeroEventExposureScenario.target_rate
Allowed event rate in inverse hours, budget divided by horizon.
Equation: return (budget / horizon).to('1/hour').
events_bound
engine.scenario_types.ZeroEventExposureScenario.events_bound
One-sided Poisson expected-count bound after zero events: negative log of one minus confidence.
Equation: return -math.log(1 - confidence).
exposure_needed
engine.scenario_types.ZeroEventExposureScenario.exposure_needed
Required observation hours from physics.robotics.assurance.calc_empirical_testing_exposure.
Equation: return calc_empirical_testing_exposure(target_rate, confidence).to('hour').
horizons_needed
engine.scenario_types.ZeroEventExposureScenario.horizons_needed
Exposure duration divided by one budget horizon, a dimensionless observation multiple.
Equation: return (exposure_needed / horizon).to('').magnitude.
recording_size
engine.scenario_types.ZeroEventExposureScenario.recording_size
Raw recorded bytes during the required exposure, at the supplied sample rate and width.
Equation: return (exposure_needed * sample_rate * sample_width).to('byte').