refactor(resilience): remove Cronbach alpha, add imputationShare confidence (#2787)

* refactor(resilience): remove Cronbach alpha, add imputationShare confidence

Remove cronbach_alpha from proto (field 5 reserved) and all response
builders. Replace with imputationShare (field 9): the fraction of
weighted score from imputed (not observed) data.

lowConfidence now triggers on averageCoverage < 0.55 or
imputationShare > 0.40, replacing the unstable Cronbach-based gate.

weightedBlend() return type extended with observedWeight/imputedWeight
for provenance tracking through the scoring pipeline.

* fix(resilience): version cache key + fix IMF proxy imputation classification

1. Bump resilience score cache key to v2 to avoid serving stale
   cached responses missing imputationShare after deploy.
2. Add explicit `imputed` flag to WeightedMetric so proxy data
   (real IMF inflation with lower certaintyCoverage) is classified
   as observed, not imputed. Only synthetic absence-based scores
   count toward imputationShare.
This commit is contained in:
Elie Habib
2026-04-07 18:22:26 +04:00
committed by GitHub
parent 19e6414a65
commit 2edcdeee06
17 changed files with 134 additions and 64 deletions

View File

@@ -111,9 +111,6 @@ components:
type: array
items:
$ref: '#/components/schemas/ResilienceDomain'
cronbachAlpha:
type: number
format: double
trend:
type: string
change30d:
@@ -121,6 +118,9 @@ components:
format: double
lowConfidence:
type: boolean
imputationShare:
type: number
format: double
ResilienceDomain:
type: object
properties:
@@ -147,6 +147,12 @@ components:
coverage:
type: number
format: double
observedWeight:
type: number
format: double
imputedWeight:
type: number
format: double
GetResilienceRankingRequest:
type: object
GetResilienceRankingResponse: