Skip to content
Switch branches/tags

Latest commit


Git stats


Failed to load latest commit information.
Latest commit message
Commit time

nuMoM2b Preprocessing — Precision Health Initiative (φ)

A module for creating reproducible partitions of the nuMoM2b data set based on configuration files.

Documentation Status LGTM Code Review Build Status codecov

Getting Started

Data should not be stored here.

Familiarity with Python, UNIX systems, and Git would be helpful.

Getting Organized

The running assumption is that Data/ contains the .csv files representing the data set, and this nuMoM2b_preprocessing/ repository contains the code and documentation.

Each might be stored as follows (though this may be tweaked through config files):

├── Data/
│   ├── pregnancy_outcomes.csv
│   ├── Screening.csv
│   └── Visit1.csv
└── nuMoM2b_preprocessing/

Getting Running

Clone the repository from GitHub:

git clone

If you're using Anaconda, this would be a good time to create an environment:

conda create -n PHI python=3.7

... and install dependencies.

pip install -r phi/requirements.txt

Using nuMoM2b_preprocessing

  • As a Package

    Installing using the setup script adds a numom2b_preprocessing package.

    python install

    ... which can then be imported

    import numom2b_preprocessing
    _params = numom2b_preprocessing.parameters(config="phi_config.json")
  • As a Commandline (CLI) Tool

    Installing using adds an entry point to your default bin/ directory.

    python install

    This adds a numom2b_preprocessing tool which can be invoked as follows:

    numom2b_preprocessing --help
  • As a Submodule

    nuMoM2b_preprocessing acts as the first step in building classification pipelines. To incorporate it in later learning steps, it may be useful to have access to the methods as a submodule. For general documentation on using submodules, refer to the Git Manual.

    git submodule add

    The modules in the package can then be accessed as normal.

    import nuMoM2b_preprocessing.numom2b_preprocessing
    _params = numom2b_preprocessing.parameters(config="phi_config.json")

nuMoM2b_preprocessing Documentation

Documentation is not currently hosted at, but local copies may be built using Sphinx.

A separate requirements file is in the documentation/ directory.

pip install -r documentation/requirements.txt

A make.bat and Makefile are included:

cd documentation
make html

If the build is successful, a copy will reside in a new build/html/ directory.

open build/html/index.html          # (macOS)
xdg-open build/html/index.html      # (Linux — "should" open with default browser)


φ Preprocessing scripts to create reproducible partitions of the nuMoM2b data set. Part of the Indiana University Precision Health Initiative.