Skip to content

Releases: appeler/ethnicolr

ethnicolr v1.1.0

Choose a tag to compare

@github-actions github-actions released this 25 Jul 04:58
50725c7

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 a basis column ("Tyrone Smith" → ~90% Black).
    • pred_voter_name — five-category posterior from the CC0
      Rosenman-Olivella-Imai voter-file dictionaries (338k surnames).
    • conf_int= on census_ln/census_fn for 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

Choose a tag to compare

@github-actions github-actions released this 24 Jul 22:31
085f1fd

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 via DATAVERSE_API_TOKEN).
  • One parameterized trainer (scripts/model-training/train_name_lstm.py)
    replacing the Keras notebooks; reports top-2/top-3 accuracy.
  • ETHNICOLR_DEVICE environment 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 .pt state 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 .h5 models, Keras-era vocab files, and the Keras training
    notebooks.
  • The stale model-download machinery: ethnicolr/download.py, the
    ethnicolr models download/status commands, and the broken
    ethnicolr_download_models entry point. All model files ship with the
    package.

ethnicolr v0.21.1

Choose a tag to compare

@github-actions github-actions released this 27 Dec 22:11

Release v0.21.1 of ethnicolr

Automated release from workflow trigger.

See commit history for detailed changes.

ethnicolr v0.21.0

Choose a tag to compare

@github-actions github-actions released this 03 Dec 20:36

Release v0.21.0 of ethnicolr

Automated release from workflow trigger.

See commit history for detailed changes.

ethnicolr 0.9.8

Choose a tag to compare

@suriyan suriyan released this 13 Jun 06:59
v0.9.8

bump to 0.9.8

ethnicolr 0.9.6

Choose a tag to compare

@suriyan suriyan released this 17 Apr 17:50
v0.9.6

bump to v0.9.6

ethnicolr 0.9.5

Choose a tag to compare

@suriyan suriyan released this 17 Apr 15:28
v0.9.5

bump to v0.9.5

ethnicolr 0.9.3

Choose a tag to compare

@suriyan suriyan released this 27 Nov 03:33
f2b791a
Merge pull request #81 from appeler/soodoku-patch-1

Update README.rst

ethnicolr 0.9.2

Choose a tag to compare

@suriyan suriyan released this 26 Nov 01:20
59bad59
Merge pull request #79 from appeler/dev

correct lower/upper percentile value must be between 0 and 100 inclusive

ethnicolr 0.9.1

Choose a tag to compare

@suriyan suriyan released this 17 Jun 16:00
07b0453
Merge pull request #74 from suriyan/master

Add platform specific dependencies for tensorflow and update to 0.9.1