Skip to main content

ActiveLearningRoundsScenario

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.

Active learning from initial_labels adding labels_per_round for rounds rounds, each round paying round_scoring_cost to score the pool, against random labeling that needs random_labels at the same label_price.

Notes

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

Assumptions: Each round buys fixed labels and pays a fixed scoring bill; baseline label demand is supplied.

Excludes: Quality prediction, turnaround time in the returned costs, and changing unit prices.

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.ActiveLearningTenRounds
>>> value = case.active_labels
>>> value
2000

Attributes

Name Description
active_cost Combined active-learning labeling and scoring cost in USD.
active_label_cost Active-learning labeling cost in USD, excluding scoring.
active_labels Total labels acquired across the initial pool and subsequent rounds.
initial_labels
label_price
label_turnaround
labels_per_round
random_cost Random-baseline labeling cost in USD.
random_labels
roi Dimensionless net saving divided by active-learning cost.
round_scoring_cost
rounds
scoring_cost Total pool-scoring cost in USD across all rounds.

label_price

Type: Quantity.

Declared default: required.

initial_labels

Type: int.

Declared default: required.

labels_per_round

Type: int.

Declared default: required.

rounds

Type: int.

Declared default: required.

round_scoring_cost

Type: Quantity.

Declared default: required.

random_labels

Type: int.

Declared default: required.

label_turnaround

Type: Optional[Quantity].

Declared default: None.

active_labels

engine.scenario_types.ActiveLearningRoundsScenario.active_labels

Total labels acquired across the initial pool and subsequent rounds.

Equation: return self.initial_labels + self.rounds * self.labels_per_round

random_cost

engine.scenario_types.ActiveLearningRoundsScenario.random_cost

Random-baseline labeling cost in USD.

Equation: return (self.random_labels * self.label_price).to(‘USD’)

active_label_cost

engine.scenario_types.ActiveLearningRoundsScenario.active_label_cost

Active-learning labeling cost in USD, excluding scoring.

Equation: return (self.active_labels * self.label_price).to(‘USD’)

scoring_cost

engine.scenario_types.ActiveLearningRoundsScenario.scoring_cost

Total pool-scoring cost in USD across all rounds.

Equation: return (self.rounds * self.round_scoring_cost).to(‘USD’)

active_cost

engine.scenario_types.ActiveLearningRoundsScenario.active_cost

Combined active-learning labeling and scoring cost in USD.

Equation: return self.active_label_cost + self.scoring_cost

roi

engine.scenario_types.ActiveLearningRoundsScenario.roi

Dimensionless net saving divided by active-learning cost.

Saving over the active-learning cost.

Equation: return ((self.random_cost - self.active_cost) / self.active_cost).to(’’).magnitude

Back to top