统一 DEB 数据源为单一计算路径
getModelView 优先使用根级 detail.deb.prediction 保证与 AI 证据面板一致, _build_city_detail_payload 补上缺失的 deb 和 multi_model_daily 字段, _analyze_summary 补上 LGBM 增强步骤使其与 _analyze 产出相同的 DEB 值。 Constraint: 三个入口 (panel/full/summary) 的 DEB 必须经过同一套 calculate_dynamic_weights + LGBM 重算流程 Tested: ruff + tsc 全过
This commit is contained in:
@@ -37,15 +37,16 @@ export function getProbabilityView(detail: CityDetail, targetDate?: string | nul
|
||||
export function getModelView(detail: CityDetail, targetDate?: string | null) {
|
||||
const date = targetDate || detail.local_date;
|
||||
const daily = detail.multi_model_daily?.[date];
|
||||
const deb = detail.deb?.prediction ?? daily?.deb?.prediction ?? null;
|
||||
if (daily) {
|
||||
return {
|
||||
deb: daily.deb?.prediction ?? null,
|
||||
deb,
|
||||
models: daily.models || {},
|
||||
};
|
||||
}
|
||||
|
||||
return {
|
||||
deb: detail.deb?.prediction ?? null,
|
||||
deb,
|
||||
models: detail.multi_model || {},
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user