fix: change exponential rating for distance to be more agressive
This commit is contained in:
parent
faa9e48234
commit
9158ed3ba2
2 changed files with 3 additions and 3 deletions
|
|
@ -138,10 +138,10 @@ All scores are precomputed at ingest time for every combination of threshold (5
|
|||
Each subcategory *i* contributes a proximity score based on travel time `t` and threshold `T` (both in seconds) using exponential decay:
|
||||
|
||||
```
|
||||
score(t, T) = exp(−3 × t / T)
|
||||
score(t, T) = exp(−6 × t / T)
|
||||
```
|
||||
|
||||
At t = 0 the score is 1.0. At the threshold it is exp(−3) ≈ 0.05 — a POI reachable in exactly the threshold time barely contributes. Close proximity dominates: a third of the threshold away scores ~0.37, halfway scores ~0.22. This ensures that genuinely nearby POIs are rated much more highly than merely reachable ones.
|
||||
At t = 0 the score is 1.0. At the threshold it is exp(−6) ≈ 0.002 — essentially zero. Close proximity strongly dominates: a sixth of the threshold away scores ~0.37, a third scores ~0.14. This ensures that only genuinely nearby POIs contribute meaningfully to the score.
|
||||
|
||||
The category score aggregates across subcategories **and** across multiple nearby POIs of the same subcategory via a **complement product** weighted by profile-specific importance weights `w_i ∈ [0, 1]`:
|
||||
|
||||
|
|
|
|||
|
|
@ -248,7 +248,7 @@ export async function handleComputeScores(
|
|||
1.0 - COALESCE(pw.weight, ${DEFAULT_SUBCATEGORY_WEIGHT}::float8)
|
||||
* CASE
|
||||
WHEN s.travel_time_s IS NULL THEN 0.0
|
||||
ELSE EXP(-3.0 * s.travel_time_s / (t.threshold_min * 60.0))
|
||||
ELSE EXP(-6.0 * s.travel_time_s / (t.threshold_min * 60.0))
|
||||
END,
|
||||
1e-10
|
||||
))
|
||||
|
|
|
|||
Loading…
Reference in a new issue