Bm25PairScenario
Agents scenarios · Implementation: mlsysim/engine/scenario_definitions/agents.py.
Construct this scenario with keyword inputs. The fields below show the types and defaults declared by this class.
One query term scored by BM25 in a short and a long document of one corpus.
Notes
Equation: Result = mlsysim.solvers.Bm25PairModel.solve with the named scenario fields; no extra fitting or postprocessing is applied.
Assumptions: The supplied inputs use the units and validity regime documented by Bm25PairModel.solve; this class binds one reproducible configuration.
Excludes: Any behavior excluded by Bm25PairModel.solve, and measurement or calibration of the supplied inputs.
References
Implementation reference: mlsysim.solvers.Bm25PairModel.solve documents the composed equation and its sources.
Examples
The named registry scenario supplies the stated inputs; this is a modeled calculation, not a new measurement.
>>> from mlsysim import Scenarios
>>> scenario = Scenarios.Bm25ShortAgainstLongFile
>>> round(scenario.result.idf, 6)
9.808187Attributes
| Name | Description |
|---|---|
| average_length | |
| b | |
| documents | |
| k1 | |
| long_frequency | |
| long_length | |
| matching_documents | |
| result | Return mlsysim.solvers.Bm25PairModel.solve for this scenario; output fields retain the units and feasibility semantics specified by that solver. |
| short_frequency | |
| short_length |
documents
Type: int.
Declared default: required.
matching_documents
Type: int.
Declared default: required.
average_length
Type: float.
Declared default: required.
short_length
Type: float.
Declared default: required.
short_frequency
Type: float.
Declared default: required.
long_length
Type: float.
Declared default: required.
long_frequency
Type: float.
Declared default: required.
k1
Type: float.
Declared default: required.
b
Type: float.
Declared default: required.
result
engine.scenario_types.Bm25PairScenario.result
Return mlsysim.solvers.Bm25PairModel.solve for this scenario; output fields retain the units and feasibility semantics specified by that solver.
Equation: mlsysim.solvers.Bm25PairModel.solve (scenario fields).