BudgetMatchedLabelingScenario
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 pool to label at label_price under budget: random labeling spends the budget, active learning reaches the same quality with active_labels.
Notes
Equation: full_cost is the worked quantity; each property below states its equation and units.
Assumptions: Labels have constant unit price and the active-label requirement is supplied.
Excludes: Predicting matched quality, pool-size clamping, and deadline feasibility.
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.MedicalScanActiveLearning
>>> value = case.full_cost
>>> print(f"{value:.3f~P}")
5000000.000 USDAttributes
| Name | Description |
|---|---|
| active_cost | Cost of the supplied active-learning label count. |
| active_labels | |
| budget | |
| deadline | |
| full_cost | Cost of labeling the entire pool in the supplied currency units. |
| label_price | |
| label_ratio | Dimensionless ratio of affordable random labels to active labels. |
| over_budget_ratio | Dimensionless full-pool labeling cost divided by budget. |
| pool | |
| random_labels | Label count affordable at the supplied budget and unit price. |
| saving | Budget minus active-labeling cost in currency units. |
| unspent_share | Dimensionless quantity for the unspent budget share; negative means overspend. |
pool
Type: Quantity.
Declared default: required.
label_price
Type: Quantity.
Declared default: required.
budget
Type: Quantity.
Declared default: required.
active_labels
Type: Quantity.
Declared default: required.
deadline
Type: Optional[Quantity].
Declared default: None.
full_cost
engine.scenario_types.BudgetMatchedLabelingScenario.full_cost
Cost of labeling the entire pool in the supplied currency units.
Equation: return self.pool * self.label_price
random_labels
engine.scenario_types.BudgetMatchedLabelingScenario.random_labels
Label count affordable at the supplied budget and unit price.
Equation: return (self.budget / self.label_price).to(‘count’)
active_cost
engine.scenario_types.BudgetMatchedLabelingScenario.active_cost
Cost of the supplied active-learning label count.
Equation: return self.active_labels * self.label_price
label_ratio
engine.scenario_types.BudgetMatchedLabelingScenario.label_ratio
Dimensionless ratio of affordable random labels to active labels.
Equation: return (self.random_labels / self.active_labels).to(’’).magnitude
saving
engine.scenario_types.BudgetMatchedLabelingScenario.saving
Budget minus active-labeling cost in currency units.
Equation: return self.budget - self.active_cost
over_budget_ratio
engine.scenario_types.BudgetMatchedLabelingScenario.over_budget_ratio
Dimensionless full-pool labeling cost divided by budget.
Equation: return (self.full_cost / self.budget).to(’’).magnitude