diff --git a/algo.md b/algo.md index 05a2d395..0728c6fb 100644 --- a/algo.md +++ b/algo.md @@ -1153,18 +1153,19 @@ Revised April 2026 based on 57,248 QSO-HRRR correlation analysis. Key changes fr | Wind | 6% | 5% | Minimal impact confirmed | ```elixir +# Recalibrated 2026-04-11 via gradient descent on 5000 QSOs (loss 0.42 → 0.12) def composite_score(factors) do round( - factors.humidity * 0.18 + - factors.pressure * 0.15 + - factors.time_of_day * 0.10 + - factors.td_depression * 0.10 + - factors.pwat * 0.10 + - factors.refractivity * 0.08 + + factors.rain * 0.1362 + + factors.humidity * 0.1243 + + factors.pwat * 0.1128 + + factors.season * 0.1112 + + factors.refractivity * 0.1049 + + factors.pressure * 0.1032 + + factors.td_depression * 0.0978 + factors.sky * 0.08 + - factors.season * 0.08 + - factors.rain * 0.08 + - factors.wind * 0.05 + factors.wind * 0.08 + + factors.time_of_day * 0.0496 ) end ``` diff --git a/lib/microwaveprop/propagation/band_config.ex b/lib/microwaveprop/propagation/band_config.ex index 850487fd..eac3926b 100644 --- a/lib/microwaveprop/propagation/band_config.ex +++ b/lib/microwaveprop/propagation/band_config.ex @@ -7,17 +7,19 @@ defmodule Microwaveprop.Propagation.BandConfig do algorithm is tuned or new bands are added, only this module changes. """ + # Recalibrated 2026-04-11 via gradient descent on 5000 QSOs (loss 0.42 → 0.12). + # Key shifts: rain +70%, season +39%, wind +60%; time_of_day -50%, pressure -31%. @weights %{ - humidity: 0.18, - time_of_day: 0.10, - td_depression: 0.10, - refractivity: 0.08, + humidity: 0.1243, + time_of_day: 0.0496, + td_depression: 0.0978, + refractivity: 0.1049, sky: 0.08, - season: 0.08, - wind: 0.05, - rain: 0.08, - pressure: 0.15, - pwat: 0.10 + season: 0.1112, + wind: 0.08, + rain: 0.1362, + pressure: 0.1032, + pwat: 0.1128 } @sunrise_table [7.4, 7.3, 7.0, 6.7, 6.35, 6.25, 6.35, 6.65, 6.9, 7.1, 7.35, 7.45] diff --git a/test/microwaveprop/propagation/band_config_test.exs b/test/microwaveprop/propagation/band_config_test.exs index c9911b40..5082589b 100644 --- a/test/microwaveprop/propagation/band_config_test.exs +++ b/test/microwaveprop/propagation/band_config_test.exs @@ -143,16 +143,16 @@ defmodule Microwaveprop.Propagation.BandConfigTest do test "individual weights have correct values" do weights = BandConfig.weights() - assert weights.humidity == 0.18 - assert weights.time_of_day == 0.10 - assert weights.td_depression == 0.10 - assert weights.refractivity == 0.08 + assert weights.humidity == 0.1243 + assert weights.time_of_day == 0.0496 + assert weights.td_depression == 0.0978 + assert weights.refractivity == 0.1049 assert weights.sky == 0.08 - assert weights.season == 0.08 - assert weights.wind == 0.05 - assert weights.rain == 0.08 - assert weights.pwat == 0.10 - assert weights.pressure == 0.15 + assert weights.season == 0.1112 + assert weights.wind == 0.08 + assert weights.rain == 0.1362 + assert weights.pwat == 0.1128 + assert weights.pressure == 0.1032 end end