transitlos.scoring.stop_score¶
Combines the MRC, speed and frequency sub-scores into one stop-level score.
Default structure ("nested"):
stop_score = sqrt(MRC * V) * H
MRC (mode / reliability / comfort) and V (speed) are pooled by an equal geometric mean (a faster vehicle can make up for a lower
mode category and vice versa); H (headway) multiplies the result, so a service that hardly ever comes is not rescued by being fast
or comfortable. The flat weighted geometric mean of the three is kept as an option (mode=).
stop_score(mrc_score, speed_score, frequency_score, weights=None, region='global', mode=DEFAULT_AGGREGATION_MODE, p=None)
¶
Compute stop_score from the three MRC/V/H sub-scores.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
mrc_score
|
float
|
Sub-score from |
required |
speed_score
|
float
|
Sub-score from |
required |
frequency_score
|
float
|
Sub-score from |
required |
weights
|
tuple[float, float, float] | None
|
Only meaningful for |
None
|
region
|
str
|
Region key into |
'global'
|
mode
|
str
|
Aggregation structure. One of:
- |
DEFAULT_AGGREGATION_MODE
|
p
|
float | None
|
Deprecated escape hatch for |
None
|
Returns:
| Type | Description |
|---|---|
float
|
A float in [0, 1]: |
float
|
structure, hard-capped at 1.0 (see module docstring's "2026-09-29 |
float
|
hard cap" note -- |
float
|
composite |
Raises:
| Type | Description |
|---|---|
ValueError
|
If mrc_score/frequency_score is outside [0, 1],
speed_score is negative, |