Skip to main content

DataBudgetScenario

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 data budget split into shares by category; the labeling share buys labels at label_price plus review_overhead for quality review.

Notes

Equation: category allocation = total * share; labels = labeling allocation / (label price * (1 + review overhead)).

Assumptions: Shares and review overhead are supplied budget assumptions and the effective label price is positive.

Excludes: Measured label quality, economies of scale, and integer rounding of purchased labels.

References

Derivation: category allocation = total * share; labels = labeling allocation / (label price * (1 + review overhead)). 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.KeywordSpotterDataBudget
>>> round(float(case.effective_label_cost.to('USD').magnitude), 3)
0.12

Attributes

Name Description
effective_label_cost Currency per label including proportional review overhead.
label_price
labeling_category
labels Affordable label count, labeling allocation divided by effective label cost;
review_overhead
shares
total

Methods

Name Description
allocation Currency allocated to a named category, total budget times its fractional share.

allocation

engine.scenario_types.DataBudgetScenario.allocation(category)

Currency allocated to a named category, total budget times its fractional share.

Equation: return total * shares[category].

total

Type: Quantity.

Declared default: required.

shares

Type: Dict[str, float].

Declared default: required.

label_price

Type: Quantity.

Declared default: required.

review_overhead

Type: float.

Declared default: required.

labeling_category

Type: str.

Declared default: 'labeling'.

effective_label_cost

engine.scenario_types.DataBudgetScenario.effective_label_cost

Currency per label including proportional review overhead.

Equation: return label_price * (1 + review_overhead).

labels

engine.scenario_types.DataBudgetScenario.labels

Affordable label count, labeling allocation divided by effective label cost; fractional labels are retained.

Equation: return (allocation(labeling_category) / effective_label_cost).to('').magnitude.

Back to top