Poverty gap docstrings overclaim FGT indices, and the poverty estimators have no tests
Maintainer antworten meist innerhalb von 1 Tag
@juaristi22 arbeitet bereits daran.
Seit 22.9.2026.
Bewertung
Dieses Issue wurde noch nicht bewertet.
Beschreibung
MicroDataFrame.squared_poverty_gap (microdataframe.py line 812) sums (threshold - income) ** 2 over people in poverty and returns that total. Its docstring says the result is "also known as the poverty severity index". It is not: the FGT severity index is the mean of the squared normalised gap, (1/N) Σ ((z - y) / z)^2, dimensionless and in [0, 1]. What the method returns is in currency squared.
poverty_gap and deep_poverty_gap are likewise unnormalised currency totals, not FGT(1). Only poverty_rate is an FGT index.
The test suite has no test of poverty_rate, deep_poverty_rate, poverty_gap, deep_poverty_gap or squared_poverty_gap (grep poverty microdf/tests/ finds only poverty_count).
Fix:
- Docstrings: state exactly what each returns (weighted headcount rate; weighted aggregate gap in currency units; weighted aggregate squared gap in currency squared) and drop "poverty severity index".
- Either add normalised FGT(1) and FGT(2) as
poverty_gap_index/poverty_severity_index, or state in the docs that they are out of scope. - Tests for all five methods with hand-computed expected values on a three-row frame with non-uniform weights, including a row exactly at the threshold and a zero-weight row.
- Vorherrschende Sprache
- Python
- Sterne
- 16
- Forks
- 10
- Ø Merge
- 5 T. 3 Std.
- Gemergte PRs (30 T.)
- 21
Entwicklungsumgebung
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus PolicyEngine/microdf
-
docs/examples.md still says MicroDataFrame.cov() and .corr() are unweightedEvtl. vergeben @juaristi22 hat das vor 7 Tagen übernommen. Offen
PolicyEngine/microdf#335 · 1 zugewiesene Person ·
Maintainer antworten meist innerhalb von 1 Tag
-
Fail closed: aggregation and construction paths that silently return unweighted resultsEvtl. vergeben @juaristi22 hat das vor 7 Tagen übernommen. Offenbug
PolicyEngine/microdf#333 · 1 zugewiesene Person ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 5/5 Über eine Woche Anfängerfreundlichkeit 30/100
PolicyEngine/microdf#314 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 3/5 1-2 Tage Anfängerfreundlichkeit 65/100
PolicyEngine/microdf#264 · 2 Kommentare ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 45/100
PolicyEngine/microdf#223 ·
Maintainer antworten meist innerhalb von 1 Tag
Alle Issues in PolicyEngine/microdf
Ähnliche Issues
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 84/100
PedestrianDynamics/pyFDS-Evac#343 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 88/100
theskumar/python-dotenv#708 ·
-
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 88/100
Maintainer antworten meist innerhalb von 2 Tagen
-
Docs Timedelta
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 72/100
pandas-dev/pandas#69919 ·
Maintainer antworten meist innerhalb von 1 Tag
-
API documentation
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 72/100
zephyrproject-rtos/west#1009 · 2 Kommentare ·
Maintainer antworten meist innerhalb von 3 Tagen