docs: add Shock Score, MAE sigma floor, DEB bias analysis to both READMEs

This commit is contained in:
2569718930@qq.com
2026-03-01 19:17:27 +08:00
parent af4f093fbc
commit 1382de96c3
2 changed files with 52 additions and 32 deletions
+26 -16
View File
@@ -24,17 +24,25 @@ The system automatically tracks the historical performance of weather models (EC
### 2. 🎲 Math Probability Engine (Settlement Probability)
Automatically computes the probability for each possible WU settlement integer using a Gaussian distribution fitted to the ensemble forecast:
Automatically computes the probability for each possible WU settlement integer using a Gaussian distribution:
- **Distribution Center μ**: Weighted average of DEB/multi-model median (70%) and ensemble median (30%). Auto-corrects upward when actual METAR max exceeds μ and is still rising.
- **Standard Deviation σ**: Derived from the 51-member ensemble P10/P90 (σ = (P90-P10) / 2.56).
- **Time Decay**: σ dynamically narrows based on the current time relative to the predicted peak window:
- Before peak: σ × 1.0 (maximum uncertainty)
- During peak window: σ × 0.7 (settling)
- After peak: σ × 0.3 (outcome mostly determined)
- **Observed Floor**: Temperatures below the current METAR max WU value are automatically excluded (can't go back down).
- **Interval Integration**: Integrates over each WU rounding interval [N-0.5, N+0.5) to compute the probability of settling at integer N.
- **Display**: `🎲 Settlement Probability (μ=3.7): 4°C [3.5~4.5) 68% | 3°C [2.5~3.5) 32%`
- **Distribution Center μ**: Weighted average of DEB/multi-model median (70%) and ensemble median (30%). Auto-corrects upward when METAR max exceeds μ.
- **Standard Deviation σ — Three-Layer Pipeline**:
1. **Ensemble Base**: σ = (P90-P10) / 2.56
2. **MAE Floor**: Uses DEBs historical MAE as σ minimum—prevents ensembles from underestimating true uncertainty
3. **Shock Score Amplifier**: σ × (1 + 0.5 × shock_score) when weather is changing rapidly
- **Time Decay**: Before peak σ×1.0 → During peak σ×0.7 → After peak σ×0.3
- **Observed Floor**: Temperatures below the current METAR max WU value are excluded
#### 💥 Shock Score: Weather Disruption Soft Scorer (0~1)
Evaluates environmental stability from the last 4 METAR observations. Higher = more unstable = wider σ:
| Component | Weight | Trigger |
| :-------------------- | :----- | :---------------------------------------------------------------- |
| Wind Direction Change | 0~0.4 | Angle difference × wind speed amplifier (weak winds downweighted) |
| Cloud Cover Jump | 0~0.35 | Cloud code escalation (FEW→BKN, etc.) |
| Pressure Change | 0~0.25 | >2hPa change within 2 hours |
### 3. 🤖 AI Deep Analysis (Groq LLaMA 3.3 70B)
@@ -91,12 +99,12 @@ chmod +x ~/update.sh
## 🕹️ Bot Commands
| Command | Description |
| :------------------ | :------------------------------------------------------------------------------- |
| `/city [city_name]` | Get weather analysis, settlement probabilities, METAR tracking, and AI insights. |
| `/deb [city_name]` | View DEB blended forecast accuracy (WU hit rate, MAE) and model comparison. |
| `/id` | View the Chat ID of the current conversation. |
| `/help` | Display help information. |
| Command | Description |
| :------------------ | :---------------------------------------------------------------------------------------------------------------------------------- |
| `/city [city_name]` | Get weather analysis, settlement probabilities, METAR tracking, and AI insights. |
| `/deb [city_name]` | View DEB accuracy: daily hit/miss breakdown, bias analysis (underestimate/overestimate), model MAE comparison, trading suggestions. |
| `/id` | View the Chat ID of the current conversation. |
| `/help` | Display help information. |
### Supported Cities
@@ -123,6 +131,8 @@ graph TD
DEB --> DB[(daily_records Database)]
Peak --> Prob[Gaussian Probability Engine]
Collector --> Prob
METAR --> Shock[Shock Score]
Shock --> Prob
Collector --> Logic[Settlement Boundary / Trend Analysis]
end
+26 -16
View File
@@ -26,15 +26,23 @@ PolyWeather 是一款专为 **Polymarket** 等预测市场打造的天气分析
基于集合预报的正态分布拟合,自动计算每个 WU 结算整数温度的概率:
- **分布中心 μ**:以 DEB/多模型中位数(70% 权重)和集合中位数(30%)的加权均值为中心。实测最高温已超过 μ 且仍在升温时,自动上修
- **标准差 σ**由 51 成员集合预报的 P10/P90 反推(σ = (P90-P10) / 2.56)。
- **时间衰减**:σ 会根据当前时间与预计最热时段的关系动态收窄:
- 峰值前:σ × 1.0(最大不确定性
- 峰值窗口内:σ × 0.7(正在定型)
- 峰值后:σ × 0.3(大局已定)
- **实测过滤**:已实测到的最高温对应 WU 值以下的候选温度自动排除(不可能回退)。
- **区间积分**:对每个 WU 取整区间 [N-0.5, N+0.5) 做正态积分,得到结算落入该整数的概率。
- **展示格式**`🎲 结算概率 (μ=3.7)4°C [3.5~4.5) 68% | 3°C [2.5~3.5) 32%`
- **分布中心 μ**:以 DEB/多模型中位数(70%)和集合中位数(30%)的加权均值为中心。实测超过 μ 自动上修。
- **标准差 σ 三层修正管线**
1. **集合基础**:σ = (P90-P10) / 2.56
2. **MAE 兆底**:用 DEB 历史 MAE 作为 σ 下限——防止集合预报低估真实不确定性
3. **Shock Score 放宽**:σ × (1 + 0.5 × shock_score),气象突变时自动加宽
- **时间衰减**:峰值前 σ×1.0 → 峰值窗口 σ×0.7 → 峰值后 σ×0.3
- **实测过滤**:已实测 WU 值以下的候选自动排除
#### 💥 Shock Score:气象突变软评分 (0~1)
用近 4 条 METAR 报文的风向/云量/气压变化评估环境稳定性,越高 = 越不稳定 = σ 放宽:
| 分项 | 权重 | 触发条件 |
| :------- | :----- | :------------------------------------ |
| 风向变化 | 0~0.4 | 角度差 × 风速放大系数(弱风降权避噪) |
| 云量阶跃 | 0~0.35 | FEW→BKN 等云码跳变 |
| 气压变化 | 0~0.25 | 2h 内气压差 > 2hPa |
### 3. 🤖 AI 深度分析 (Groq LLaMA 3.3 70B)
@@ -91,12 +99,12 @@ chmod +x ~/update.sh
## 🕹️ 机器人指令
| 指令 | 说明 |
| :--------------- | :---------------------------------------------------------- |
| `/city [城市名]` | 获取深度气象分析、结算概率、实测追踪及 AI 决策建议。 |
| `/deb [城市名]` | 查看 DEB 融合预测的历史准确率(WU 命中率、MAE)和模型对比。 |
| `/id` | 查看当前对话的 Chat ID。 |
| `/help` | 显示说明信息。 |
| 指令 | 说明 |
| :--------------- | :------------------------------------------------------------------------------ |
| `/city [城市名]` | 获取深度气象分析、结算概率、实测追踪及 AI 决策建议。 |
| `/deb [城市名]` | 查看 DEB 准确率:逐日命中明细、偏差分析(低估/高估)、模型 MAE 对比、交易建议。 |
| `/id` | 查看当前对话的 Chat ID。 |
| `/help` | 显示说明信息。 |
### 支持城市示例
@@ -120,9 +128,11 @@ graph TD
subgraph 算法层
Collector --> Peak[峰值时段预测]
Collector --> DEB[DEB 动态权重融合]
DEB --> DB[(daily_records 数据库)]
DEB --> DB[(每日记录数据库)]
Peak --> Prob[正态分布概率引擎]
Collector --> Prob
METAR --> Shock[Shock Score 突变评分]
Shock --> Prob
Collector --> Logic[结算边界 / 趋势分析]
end