Skip to main content

PreferencePairScenario

Training scenarios · Implementation: mlsysim/engine/scenario_definitions/training.py.

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

Log-probability sums over a preferred and a dispreferred record’s selected tokens.

Notes

Equation: Composition of mlsysim.solvers.PreferencePairModel.solve.

Assumptions: Inputs are routed to PreferencePairModel.solve; their documented regimes and units apply to this configuration.

Excludes: Additional mechanisms beyond the linked solver contracts; the scenario does not collect measurements.

References

Derivation: This scenario binds named inputs to PreferencePairModel. The linked solver contracts own equations, sources, and result-unit definitions.

Examples

Evaluate the named configuration and display a modeled result.

>>> from mlsysim import Scenarios
>>> case = Scenarios.RepairPreferencePair
>>> value = case.result.loss
>>> print(f"{value:.3g}")
0.437

Attributes

Name Description
beta
policy_dispreferred
policy_preferred
reference_dispreferred
reference_preferred
result Evaluate the stated preference pair case through PreferencePairModel.solve; returns its typed result and quantity units.

policy_preferred

Type: float.

Declared default: required.

reference_preferred

Type: float.

Declared default: required.

policy_dispreferred

Type: float.

Declared default: required.

reference_dispreferred

Type: float.

Declared default: required.

beta

Type: float.

Declared default: required.

result

engine.scenario_types.PreferencePairScenario.result

Evaluate the stated preference pair case through PreferencePairModel.solve; returns its typed result and quantity units.

Calculation: mlsysim.solvers.PreferencePairModel.solve.

Back to top