Releases: appeler/ethnicolr
Releases · appeler/ethnicolr
Release list
ethnicolr v1.1.0
A statistical-rigor release: calibrated probabilities and formal uncertainty
across all models, first names in the census pipeline, academic name
dictionaries, and a global name-origin model. (#127, #128, #129)
Added
- Calibration + conformal layer (#127). Every model ships a stats file
with a fitted temperature (probabilities are now measured-calibrated, not
assumed), the training class distribution, and split-conformal quantiles.prior=on every prediction function reweights probabilities to a target
population (p_adj ∝ p·π_target/π_train) — the base-rate fix for the
class-balanced models and the name-likelihood step for BISG pipelines.coverage=adds a conformal prediction set (race_set/origin_set) with
empirically verified marginal coverage at 0.80/0.90/0.95.- Model cards and a statistical-principles guide document reference
populations, calibration, weighting, and the conformal guarantee.
- Census 2020 first names + dictionary estimators (#128):
census_fn— first-name lookup against the Census 2020 first-name file
(53,616 names; first such release since 1990).pred_census_name— six-category first+last posterior via naive Bayes
with LSTM fallback and abasiscolumn ("Tyrone Smith" → ~90% Black).pred_voter_name— five-category posterior from the CC0
Rosenman-Olivella-Imai voter-file dictionaries (338k surnames).conf_int=oncensus_ln/census_fnfor exact Wilson score intervals.
pred_wiki_origin(#129) — name → country-of-origin over 90 countries,
trained on 3.6M Wikidata people (62% top-1 / 81% top-3; chance ≈ 1.1%).
Changed
- NC calibration re-inflates deduplicated names to person frequency, so its
guarantees describe a random person rather than a random unique name.
ethnicolr v1.0.0
Complete migration from TensorFlow to PyTorch, all models retrained, and a
refreshed Wikipedia/Wikidata training corpus. (#121, #122, #123, #124, #125)
Added
- Reproducible Wikidata data pipeline (
scripts/data-acquisition/wiki/):
fetches ~4M people from the public QLever SPARQL endpoint and labels them
via auditable country/ethnic-group mapping tables. The wiki models now
train on 3.69M rows (25x the 2009-era dataset). - Scripted acquisition for the Florida and North Carolina voter data
(scripts/data-acquisition/, Dataverse token viaDATAVERSE_API_TOKEN). - One parameterized trainer (
scripts/model-training/train_name_lstm.py)
replacing the Keras notebooks; reports top-2/top-3 accuracy. ETHNICOLR_DEVICEenvironment variable (cpu/cuda/mps) for device
selection; CUDA auto-selected when available, CPU otherwise.- Python 3.13 support (
requires-python >=3.11,<3.14, numpy >= 1.26 without
the 2.0 cap).
Changed
- Inference engine rewritten on PyTorch; models ship as
.ptstate dicts. - All nine LSTM models retrained from their original data sources. Held-out
accuracy: wiki_ln 0.78 (was 0.67), wiki_name 0.86 (was 0.71), fl_ln 0.81,
fl_name 0.84, FL five-cat 0.59-0.63 (balanced), nc_name 0.57 (12-class). - Monte Carlo dropout confidence intervals now work for every model
(the old NC model shipped with dropout 0.0, so its intervals were
degenerate zero-width).
Fixed
- macOS mispredictions in CI: MPS is never auto-selected (virtualized Apple
Silicon environments advertise MPS but return incorrect LSTM output). - Florida five-category models silently reused whichever year variant
(2017/2022) loaded first; the model cache is now keyed by model path. - Vocabulary CSVs are quoted so n-grams with meaningful trailing spaces
survive; a pre-commit hook had been stripping them.
Removed
- TensorFlow, tensorflow-intel, and protobuf dependencies (the
inference
extra is gone; the base install is all you need). - Legacy
.h5models, Keras-era vocab files, and the Keras training
notebooks. - The stale model-download machinery:
ethnicolr/download.py, the
ethnicolr models download/statuscommands, and the broken
ethnicolr_download_modelsentry point. All model files ship with the
package.
ethnicolr v0.21.1
Release v0.21.1 of ethnicolr
Automated release from workflow trigger.
See commit history for detailed changes.
ethnicolr v0.21.0
Release v0.21.0 of ethnicolr
Automated release from workflow trigger.
See commit history for detailed changes.
ethnicolr 0.9.8
ethnicolr 0.9.6
ethnicolr 0.9.5
ethnicolr 0.9.3
Merge pull request #81 from appeler/soodoku-patch-1 Update README.rst
ethnicolr 0.9.2
Merge pull request #79 from appeler/dev correct lower/upper percentile value must be between 0 and 100 inclusive
ethnicolr 0.9.1
Merge pull request #74 from suriyan/master Add platform specific dependencies for tensorflow and update to 0.9.1