Skip to main content

CoverageFloorScenario

Data scenarios · Implementation: mlsysim/engine/scenario_definitions/data.py.

Construct this scenario with keyword inputs. The fields below show the types and defaults declared by this class.

A keep_fraction coreset drawn without regard to class from pool examples, of which rare_share belong to a rare class that needs at least floor examples.

Notes

Equation: rare is the worked quantity; each property below states its equation and units.

Assumptions: Selection retains each class in expectation at the same keep fraction.

Excludes: Sampling variance, a probability guarantee for minimum coverage, and class-aware selection.

References

Derivation: The equations below follow the stated counts, geometric relations, or accounting definitions; scenario inputs are supplied assumptions or observations, not fitted predictions.

Examples

Execute the registered worked inputs; this is a modeled calculation.

>>> from mlsysim import Scenarios
>>> case = Scenarios.RareClassTenPercentCoreset
>>> value = case.rare
>>> round(value, 3)
1000.0

Attributes

Name Description
expected_kept Expected rare-class examples retained by class-agnostic selection.
floor
keep_fraction
pool
rare Expected rare-class examples in the full pool.
rare_share
shortfall Signed rare-class shortfall relative to the requested floor; negative means surplus.

pool

Type: float.

Declared default: required.

rare_share

Type: float.

Declared default: required.

keep_fraction

Type: float.

Declared default: required.

floor

Type: float.

Declared default: required.

rare

engine.scenario_types.CoverageFloorScenario.rare

Expected rare-class examples in the full pool.

Equation: return self.pool * self.rare_share

expected_kept

engine.scenario_types.CoverageFloorScenario.expected_kept

Expected rare-class examples retained by class-agnostic selection.

Equation: return self.rare * self.keep_fraction

shortfall

engine.scenario_types.CoverageFloorScenario.shortfall

Signed rare-class shortfall relative to the requested floor; negative means surplus.

Equation: return self.floor - self.expected_kept

Back to top