Skip to main content

SemiSupervisedCostScenario

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 supervised baseline with supervised_labels and supervised_compute against a semi-supervised run with ssl_labels and ssl_compute, labels at label_price.

Notes

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

Assumptions: Both methods have supplied label counts and compute bills at a common label price.

Excludes: Predicting equal quality, extra data acquisition, and campaign variance.

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.FixMatchCifar10Cost
>>> value = case.supervised_label_cost
>>> print(f"{value:.3f~P}")
4000.000 USD

Attributes

Name Description
compute_multiple Dimensionless semi-supervised-to-supervised compute-cost ratio.
cost_reduction Dimensionless supervised-to-semi-supervised total-cost ratio, not a fractional cut.
label_price
label_reduction Dimensionless supervised-to-semi-supervised label-count ratio.
ssl_compute
ssl_label_cost Semi-supervised labeling cost in USD.
ssl_labels
ssl_total Semi-supervised labeling plus compute cost in currency units.
supervised_compute
supervised_label_cost Supervised labeling cost in USD.
supervised_labels
supervised_total Supervised labeling plus compute cost in currency units.

label_price

Type: Quantity.

Declared default: required.

supervised_labels

Type: int.

Declared default: required.

supervised_compute

Type: Quantity.

Declared default: required.

ssl_labels

Type: int.

Declared default: required.

ssl_compute

Type: Quantity.

Declared default: required.

supervised_label_cost

engine.scenario_types.SemiSupervisedCostScenario.supervised_label_cost

Supervised labeling cost in USD.

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

supervised_total

engine.scenario_types.SemiSupervisedCostScenario.supervised_total

Supervised labeling plus compute cost in currency units.

Equation: return self.supervised_label_cost + self.supervised_compute

ssl_label_cost

engine.scenario_types.SemiSupervisedCostScenario.ssl_label_cost

Semi-supervised labeling cost in USD.

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

ssl_total

engine.scenario_types.SemiSupervisedCostScenario.ssl_total

Semi-supervised labeling plus compute cost in currency units.

Equation: return self.ssl_label_cost + self.ssl_compute

compute_multiple

engine.scenario_types.SemiSupervisedCostScenario.compute_multiple

Dimensionless semi-supervised-to-supervised compute-cost ratio.

Equation: return (self.ssl_compute / self.supervised_compute).to(’’).magnitude

cost_reduction

engine.scenario_types.SemiSupervisedCostScenario.cost_reduction

Dimensionless supervised-to-semi-supervised total-cost ratio, not a fractional cut.

Equation: return (self.supervised_total / self.ssl_total).to(’’).magnitude

label_reduction

engine.scenario_types.SemiSupervisedCostScenario.label_reduction

Dimensionless supervised-to-semi-supervised label-count ratio.

Equation: return self.supervised_labels / self.ssl_labels

Back to top