Skip to main content

Survey-aware ML starter kit for NHIS Adults (2023/2024): fetch, build core data, train baselines, export reproducible outputs.

Project description

nhisml

Survey-aware machine learning toolkit for NHIS Adults data.

Features

- Task-aware training (SRH, smoking, etc.)
- Survey-weighted metrics
- Cross-year evaluation (2023 → 2024)
- Subgroup fairness analysis
- Publication-ready outputs

Installation

pip install nhisml

Quick start

#Download and cache raw NHIS Adults public-use files.
nhisml fetch --year 2023 --year 2024
#Builds a clean, analysis-ready core parquet with harmonized variable names.
nhisml build-core --year 2023

Self-rated health

#Train
nhisml train --in data/core_2023.parquet --task srh_binary
#Evaluate
nhisml evaluate --task srh_binary --latest --year 2024
# Subgroup analysis
nhisml subgroup --task srh_binary --latest --year 2024 --by sex age education

Current smoking

#Train
nhisml train --in data/core_2023.parquet --task smoking_current
#Evaluate
nhisml evaluate --task smoking_current --latest --year 2024
# Subgroup analysis
nhisml subgroup --task smoking_current --latest --year 2024 --by sex age education

FIGURES & TABLES

python scripts/make_paper_outputs.py \
  --tasks srh_binary smoking_current \
  --run-for-task srh_binary=runs/<srh_run_dir> \
  --run-for-task smoking_current=runs/<smoking_run_dir>

Others

nhisml list-tasks # list all available predicton tasks
nhisml describe-task # Describe a specific task.
nhisml list-featuresets # List available feature sets.
nhisml describe-featureset  # Describe feature set contents.

LICENSE

This project is licensed under the MIT License.
See the LICENSE file for details.
...

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

nhisml-0.4.0.tar.gz (21.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

nhisml-0.4.0-py3-none-any.whl (26.1 kB view details)

Uploaded Python 3

File details

Details for the file nhisml-0.4.0.tar.gz.

File metadata

  • Download URL: nhisml-0.4.0.tar.gz
  • Upload date:
  • Size: 21.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.25

File hashes

Hashes for nhisml-0.4.0.tar.gz
Algorithm Hash digest
SHA256 9a4fa7b1543ad50b5741d933b7ed2711f4cc8b924e0eff95aa7880eeaf965981
MD5 6307d3aead615583106202a45ceb6641
BLAKE2b-256 34b105ff5c697703451ced9441be917db45ea2b8cb69d014b9b9eba22f4bdd9b

See more details on using hashes here.

File details

Details for the file nhisml-0.4.0-py3-none-any.whl.

File metadata

  • Download URL: nhisml-0.4.0-py3-none-any.whl
  • Upload date:
  • Size: 26.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.25

File hashes

Hashes for nhisml-0.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 1fb5ddad5f6fa4231e1558d73f1dca7ea8bb0855599664c5fa84f9ccd76fd3f4
MD5 37354288f520d50faacbe0c44418a9c6
BLAKE2b-256 7ad52fe6ed08bedf5f8c70b047471875fdcafcae8990246e694e97fa06f30dd8

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page