NYC Data Science Academy| Blog
Bootcamps
Lifetime Job Support Available Financing Available
Bootcamps
Data Science with Machine Learning Flagship ๐Ÿ† Data Analytics Bootcamp Artificial Intelligence Bootcamp New Release ๐ŸŽ‰
Free Lesson
Intro to Data Science New Release ๐ŸŽ‰
Find Inspiration
Find Alumni with Similar Background
Job Outlook
Occupational Outlook Graduate Outcomes Must See ๐Ÿ”ฅ
Alumni
Success Stories Testimonials Alumni Directory Alumni Exclusive Study Program
Courses
View Bundled Courses
Financing Available
Bootcamp Prep Popular ๐Ÿ”ฅ Data Science Mastery Data Science Launchpad with Python View AI Courses Generative AI for Everyone New ๐ŸŽ‰ Generative AI for Finance New ๐ŸŽ‰ Generative AI for Marketing New ๐ŸŽ‰
Bundle Up
Learn More and Save More
Combination of data science courses.
View Data Science Courses
Beginner
Introductory Python
Intermediate
Data Science Python: Data Analysis and Visualization Popular ๐Ÿ”ฅ Data Science R: Data Analysis and Visualization
Advanced
Data Science Python: Machine Learning Popular ๐Ÿ”ฅ Data Science R: Machine Learning Designing and Implementing Production MLOps New ๐ŸŽ‰ Natural Language Processing for Production (NLP) New ๐ŸŽ‰
Find Inspiration
Get Course Recommendation Must Try ๐Ÿ’Ž An Ultimate Guide to Become a Data Scientist
For Companies
For Companies
Corporate Offerings Hiring Partners Candidate Portfolio Hire Our Graduates
Students Work
Students Work
All Posts Capstone Data Visualization Machine Learning Python Projects R Projects
Tutorials
About
About
About Us Accreditation Contact Us Join Us FAQ Webinars Subscription An Ultimate Guide to
Become a Data Scientist
    Login
NYC Data Science Acedemy
Bootcamps
Courses
Students Work
About
Bootcamps
Bootcamps
Data Science with Machine Learning Flagship
Data Analytics Bootcamp
Artificial Intelligence Bootcamp New Release ๐ŸŽ‰
Free Lessons
Intro to Data Science New Release ๐ŸŽ‰
Find Inspiration
Find Alumni with Similar Background
Job Outlook
Occupational Outlook
Graduate Outcomes Must See ๐Ÿ”ฅ
Alumni
Success Stories
Testimonials
Alumni Directory
Alumni Exclusive Study Program
Courses
Bundles
financing available
View All Bundles
Bootcamp Prep
Data Science Mastery
Data Science Launchpad with Python NEW!
View AI Courses
Generative AI for Everyone
Generative AI for Finance
Generative AI for Marketing
View Data Science Courses
View All Professional Development Courses
Beginner
Introductory Python
Intermediate
Python: Data Analysis and Visualization
R: Data Analysis and Visualization
Advanced
Python: Machine Learning
R: Machine Learning
Designing and Implementing Production MLOps
Natural Language Processing for Production (NLP)
For Companies
Corporate Offerings
Hiring Partners
Candidate Portfolio
Hire Our Graduates
Students Work
All Posts
Capstone
Data Visualization
Machine Learning
Python Projects
R Projects
About
Accreditation
About Us
Contact Us
Join Us
FAQ
Webinars
Subscription
An Ultimate Guide to Become a Data Scientist
Tutorials
Data Analytics
  • Learn Pandas
  • Learn NumPy
  • Learn SciPy
  • Learn Matplotlib
Machine Learning
  • Boosting
  • Random Forest
  • Linear Regression
  • Decision Tree
  • PCA
Interview by Companies
  • JPMC
  • Google
  • Facebook
Artificial Intelligence
  • Learn Generative AI
  • Learn ChatGPT-3.5
  • Learn ChatGPT-4
  • Learn Google Bard
Coding
  • Learn Python
  • Learn SQL
  • Learn MySQL
  • Learn NoSQL
  • Learn PySpark
  • Learn PyTorch
Interview Questions
  • Python Hard
  • R Easy
  • R Hard
  • SQL Easy
  • SQL Hard
  • Python Easy
Data Science Blog > Capstone > NICU Admissions and CCHD: Predicting Based on Data Analysis

NICU Admissions and CCHD: Predicting Based on Data Analysis

Paul Lee, Aron Berke, Bee Kim, Bettina Meier and Ira Villar
Posted on Jan 7, 2020
The skills I demoed here can be learned through taking Data Science with Machine Learning bootcamp with NYC Data Science Academy.

The Center for Disease Control and Prevention annually publishes selected characteristics for all birth and pregnancy-related events for independent research and analysis. Our project aimed to understand the non-genetic risk factors for congenital abnormalities and neonatal intensive care unit (NICU) admissions and to ultimately predict these instances.

The ability to explain and predict congenital abnormalities and NICU admissions would be valuable for hospitals aiming to optimize staffing and resource usage, for primary care physicians in identifying patients who might require closer monitoring, and for expectant mothers seeking additional information on key risks during pregnancy.

Data Set

In 2018, 3.8 million live births were recorded in the United States, each with over 200 features including characteristics of the mother, father, baby, the delivery, as well as which babies were admitted to the NICU. Information from previous years contained a comparable number of births and features.

The data comes in a fixed width file format where each feature occupies a specific space within a certain length of characters. An associated user guide in PDF provides information on the file layout and detailed technical notes. The PDFs for more recent years were digitally created so their text was readily accessible, whereas those from the 1990โ€™s and earlier were image only, requiring optical character recognition tools to access the text.

Data Extraction and Transformation

User guides for recent years, 2016-2018, were converted into text. On that basis we were able to generate a key using regular expression to convert the fixed width format. The process captured around 97% of the features; the rest of the keys were extracted manually. Through this, 15GB of data in fixed width format file was split into corresponding features, converted to CSV, and imported into a MySQL database.

Exploratory Data Analysis

Many features were represented more than once in the dataset, often grouped with different levels of granularity. To understand factors contributing to NICU admissions, we chose to look at less granular information. For instance, if the motherโ€™s age affects NICU admission this would be detectable using age brackets and would not require the granularity of every age. Using this approach we reduced our feature set to 91 variables, which were used for exploratory data analysis and initial modeling approaches.

In contrast, when investigating congenital abnormalities, we chose to retain the most granular encoding of variables. The number of positive cases for congenital abnormalities was relatively small despite the large size of the dataset, so we chose to retain as much information as possible.

NICU Admissions 2018

From our original exploratory analysis and modelling (see below), variables associated with labor and delivery showed a very strong relationship with NICU admissions; however, this wouldnโ€™t be useful in predicting NICU admission at an early stage of pregnancy. Therefore, we shifted our focus to variables that would be available before the labor and delivery to potentially educate primary healthcare providers and the pregnant mothers and to reduce the NICU admission rate.

Broad Variable

Overall, there are three broad variable classes available before labor and delivery: motherโ€™s physical characteristics, motherโ€™s medical history , father's background , and the babyโ€™s condition during pregnancy. The graphs below show relationships between these factors and NICU admissions. Gray sections of the bars indicate โ€˜No NICU admissionโ€™ and the red sections indicate โ€˜NICU admission.โ€™ Yellow lines represent the 9.14% average NICU admissions rate for all babies born in 2018.

Motherโ€™s Physical Characteristics

Two variables of the motherโ€™s physical characteristics stood out as the most strongly related to NICU admissions: body mass index (BMI) and age. While NICU admissions increased at both extremes, mothers with BMI score over 40.0 and mothers over 40 years of age showed more significant increases. For motherโ€™s older than 45, the risk of babies born with a critical condition increased two-fold.

NICU admission vs Motherโ€™s BMI
NICU admission vs Motherโ€™s age

Motherโ€™s Medical History

Previous pregnancy history, such as having had a pre-term birth and/or a prior termination of pregnancy, voluntary or other-wise, correlated with  higher NICU admission rate. Prior pregnancy complication might have genetic or physical reasons that can also affect current or future pregnancies.

Previous pre-term births vs NICU admissions
Prior termination of pregnancy vs NICU admission

There were other medical history factors that correlated with NICU admission. One was smoking cigarettes during pregnancy. Compared to a non-smoker, a mother who were smokers prior to or during pregnancy had a higher risk of babies ending up in the NICU. Also, mothers with certain medical conditions, such as hypertension or diabetes, prior or during the pregnancy (gestational), showed a higher rate of newborns with NICU admission.

Effect of cigarette smoking on NICU admission
Motherโ€™s health vs NICU admission

Babyโ€™s Condition During Pregnancy

Variables related to the babyโ€™s condition during pregnancy were more strongly correlated to NICU admission than any conditions of the mother alone. Many congenital abnormalities detectable during routine prenatal visits lead to a high rate of NICU admissions. Being pregnant with more than once child (plurality) increases the risk of underweight and premature birth, thus leading to a higher chance of NICU admission. While 40% of all births of twins in 2018 led to NICU admissions, the rate rose to over 80% for triplets, quadruplets, and more multiples.

Effect of Plurality on NICU admissions
Effects of Congenital abnormalities on NICU admission
Number of NICU Admissions and Rate of Congenital Abnormality

Data Visualization

From our data visualizations, we identified that a large proportion of babies born with a congenital abnormality called cyanotic congenital heart disease (CCHD) was admitted to NICU. Cyanotic congenital heart disease is a condition present at birth in which complications in heart function lead to low blood oxygen levels evident through a bluish tint of the skin. 

CCHD contributed the largest absolute number of babies being admitted to the NICU across all congenital abnormalities captured in the dataset. The CDC notes that critical congenital heart defectโ€“associated hospitalizaยญtions represents the highest mean and median cost among birth defect categories considered ($79,011 and $29,886, respectively). Furthermore, while there is a genetic component to CCHD, its etiology remains largely unknown. As a result, we deemed CCHD to have the highest medical urgency and unmet need among all captured abnormalities. For that reason, we focused one branch of our project on CCHD.

Despite its unknown etiology, previous studies have established links between CCHD and toxic chemical exposure, exposure to certain drugs, infections, and diabetes during pregnancy. As these factors or potential proxies (e.g., demographic data) are captured in our dataset, we hypothesized that it may be possible to predict CCHD or at least identify some statistically significant explanatory factors.

For more extensive analysis, please feel free to explore our Tableau dashboard.

Dataflow and Processing

The two targets of predicting NICU admission and CCHD paired with the different models required data to be cleaned and processed in parallel workstreams. A schematic of the workflow is presented below.

Data Pipeline and Workflow

The target of the predictive models appear only as a small fraction of our dataset. To avoid artificially inflated classification model scores, we chose to optimize precision and reduce false positives rather than focus on overall accuracy. Precision was chosen as the metric because accurately predicting true positives while minimizing false positives was imperative based on our primary use cases. For example, if our model is used to direct specialized resources to closer monitoring of certain patients, it would generate a lot of excess costs if the modelโ€™s precision is low. 

To test the validity of the models, 10% of the original data was withheld before downsampling as a validation set before further preparation. For most models we used a downsampled dataset to give equal weight to the positive and negative outcomes and this dataset was further processed to meet the requirements of the model being used. For instance, we selected all confirmed cases of CCHD and randomly sampled a matching number of cases without CCHD.

We also removed selected variables to ensure limited multicollinearity (all remaining variables have a variance inflation factor below 5) and thus meet the assumptions of a descriptive logistic model. We performed mode imputation and median imputation for categorical and continuous variables, respectively. For variables with missingness greater than 5%, we retained the information whether or not the value was imputed, as preliminary analysis showed a relationship between missingness and the target variable CCHD. Further details on data processing and imputation can be found here.

Predictive Modeling

NICU admissions

Using RandomForest and XGBoost classifiers, we investigated the most important predictors of NICU admissions with 91 initial variables and a downsampled 2018 dataset.  This analysis revealed many highly predictive variables are associated with the delivery, such as the birth weight, the need for assisted ventilation, as well as the 5 min APGAR score, a medical measure of the need for resuscitation at birth and a predictor of the infant's chances of surviving the first year of life.

These aspects of delivery were certainly clear indicators that the babyโ€™s health was in jeopardy at birth and would require NICU admissions. The RandomForest model on the 2018 data set was able to predict NICU admissions at 98% precision or 2% false positive rate. However, our project aimed at identifying early predictors with the hope for possible early intervention or monitoring. We therefore reduced the number of features used for modelling to 56 pre-delivery features. Using only the pre-delivery features lowered the precision of the best models to 67.5%.

Exploratory Data Analysis

Consistent with our exploratory data analysis, a previous preterm birth correlated with higher risk of NICU admissions both in RandomForest and XGBoost models. Moreover, pre-pregnancy hypertension and gestational hypertension developed as a complication during pregnancy, as well as pre-pregnancy diabetes and gestational diabetes increased the risk of NICU admissions in all models.

Most strikingly, investigating the effect of both hypertension and diabetes, we identified a strong medical need to monitor mothers with pre-pregnancy diabetes for development of gestational hypertension. While 26.7% of all newborns from diabetic mothers and 18.9% of newborns from mothers with gestational hypertension needed to be admitted to the NICU, the rate increased to 41.2% when the mother with pre-pregnancy diabetes developed additional gestational hypertension.

Pre-pregnancy Diabetes and Gestational Hypertension

Based on our understanding of pre-pregnancy risk factors from our modelling approaches and exploratory data analysis, we developed an information leaflet for expectant mothers explaining some of these risks in order to aid the best possible care by primary health physicians during pregnancy.

Congenital Abnormalities

Attempting to build a classification model, we tried various algorithms including logistic regression with forward selection, regularized logistic regression, random forest, and support vector machines. We also tried some outlier detection algorithms including isolation forest and local outlier factor. Hyperparameters were tuned using precision and models were compared using the same metric. Most models we trained performed better than random on the validation set, though precision was quite low even in the best models.

Feature set

We concluded that our feature set was not rich enough to develop a useful predictive model. Moving forward, weโ€™d like to try combining this dataset with genomic or other -omics data to develop a stronger model.

We were, however, able to develop a solid descriptive logistic model using forward selection based on the Bayesian Information Criterion. This model highlighted several statistically significant risk factors detailed in the table below.

Consistent with previously published literature, diabetes is associated with increased log-odds of CCHD. Being an Asian, Hispanic, or Native American mother has a protective effect relative to being White. Shorter gestation, hypertension, later start to prenatal care, and number of prior births are all associated with increased risk. Interestingly, so is missing information on the intake form, perhaps acting through hidden socio-economic factors and potential correlation with exposure to toxic chemicals.

About Authors

Paul Lee

Inquisitive data scientist with proven problem solving skills and strong coding abilities. Great communicator with 10+ years in a heralded career in education.
View all posts by Paul Lee >

Aron Berke

Aron is a healthcare and business-oriented data scientist. He holds a Master's Degree in Public Health (MPH) and a Master's Degree in Business Administration (MBA) from Yale University. He has previously worked as a Data Analyst for the...
View all posts by Aron Berke >

Bee Kim

Bee holds a masters degree in Information Systems with concentration in data analysis and is very passionate about storytelling through data. She is skilled in communication and critical thinking, with 5+ years of experience in analyzing and processing...
View all posts by Bee Kim >

Bettina Meier

Bettina Meier is a NYC Data Science Fellow with a PhD in biochemistry/molecular biology and experience in Cancer research, Genetics, and NGS data analysis.
View all posts by Bettina Meier >

Ira Villar

Ira is currently a Data Science Fellow at the NYC Data Science Academy. He has nearly a decade of experience in film directing and production. This gives him a unique insight and perspective when it comes to data...
View all posts by Ira Villar >

Leave a Comment

No comments found.

View Posts by Categories

All Posts 2399 posts
AI 7 posts
AI Agent 2 posts
AI-based hotel recommendation 1 posts
AIForGood 1 posts
Alumni 60 posts
Animated Maps 1 posts
APIs 41 posts
Artificial Intelligence 2 posts
Artificial Intelligence 2 posts
AWS 13 posts
Banking 1 posts
Big Data 50 posts
Branch Analysis 1 posts
Capstone 206 posts
Career Education 7 posts
CLIP 1 posts
Community 72 posts
Congestion Zone 1 posts
Content Recommendation 1 posts
Cosine SImilarity 1 posts
Data Analysis 5 posts
Data Engineering 1 posts
Data Engineering 3 posts
Data Science 7 posts
Data Science News and Sharing 73 posts
Data Visualization 324 posts
Events 5 posts
Featured 37 posts
Function calling 1 posts
FutureTech 1 posts
Generative AI 5 posts
Hadoop 13 posts
Image Classification 1 posts
Innovation 2 posts
Kmeans Cluster 1 posts
LLM 6 posts
Machine Learning 364 posts
Marketing 1 posts
Meetup 144 posts
MLOPs 1 posts
Model Deployment 1 posts
Nagamas69 1 posts
NLP 1 posts
OpenAI 5 posts
OpenNYC Data 1 posts
pySpark 1 posts
Python 16 posts
Python 458 posts
Python data analysis 4 posts
Python Shiny 2 posts
R 404 posts
R Data Analysis 1 posts
R Shiny 560 posts
R Visualization 445 posts
RAG 1 posts
RoBERTa 1 posts
semantic rearch 2 posts
Spark 17 posts
SQL 1 posts
Streamlit 2 posts
Student Works 1687 posts
Tableau 12 posts
TensorFlow 3 posts
Traffic 1 posts
User Preference Modeling 1 posts
Vector database 2 posts
Web Scraping 483 posts
wukong138 1 posts

Our Recent Popular Posts

AI 4 AI: ChatGPT Unifies My Blog Posts
by Vinod Chugani
Dec 18, 2022
Meet Your Machine Learning Mentors: Kyle Gallatin
by Vivian Zhang
Nov 4, 2020
NICU Admissions and CCHD: Predicting Based on Data Analysis
by Paul Lee, Aron Berke, Bee Kim, Bettina Meier and Ira Villar
Jan 7, 2020

View Posts by Tags

#python #trainwithnycdsa 2019 2020 Revenue 3-points agriculture air quality airbnb airline alcohol Alex Baransky algorithm alumni Alumni Interview Alumni Reviews Alumni Spotlight alumni story Alumnus ames dataset ames housing dataset apartment rent API Application artist aws bank loans beautiful soup Best Bootcamp Best Data Science 2019 Best Data Science Bootcamp Best Data Science Bootcamp 2020 Best Ranked Big Data Book Launch Book-Signing bootcamp Bootcamp Alumni Bootcamp Prep boston safety Bundles cake recipe California Cancer Research capstone car price Career Career Day ChatGPT citibike classic cars classpass clustering Coding Course Demo Course Report covid 19 credit credit card crime frequency crops D3.js data data analysis Data Analyst data analytics data for tripadvisor reviews data science Data Science Academy Data Science Bootcamp Data science jobs Data Science Reviews Data Scientist Data Scientist Jobs data visualization database Deep Learning Demo Day Discount disney dplyr drug data e-commerce economy employee employee burnout employer networking environment feature engineering Finance Financial Data Science fitness studio Flask flight delay football gbm Get Hired ggplot2 googleVis H20 Hadoop hallmark holiday movie happiness healthcare frauds higgs boson Hiring hiring partner events Hiring Partners hotels housing housing data housing predictions housing price hy-vee Income industry Industry Experts Injuries Instructor Blog Instructor Interview insurance italki Job Job Placement Jobs Jon Krohn JP Morgan Chase Kaggle Kickstarter las vegas airport lasso regression Lead Data Scienctist Lead Data Scientist leaflet league linear regression Logistic Regression machine learning Maps market matplotlib Medical Research Meet the team meetup methal health miami beach movie music Napoli NBA netflix Networking neural network Neural networks New Courses NHL nlp NYC NYC Data Science nyc data science academy NYC Open Data nyc property NYCDSA NYCDSA Alumni Online Online Bootcamp Online Training Open Data painter pandas Part-time performance phoenix pollutants Portfolio Development precision measurement prediction Prework Programming public safety PwC python Python Data Analysis python machine learning python scrapy python web scraping python webscraping Python Workshop R R Data Analysis R language R Programming R Shiny r studio R Visualization R Workshop R-bloggers random forest Ranking recommendation recommendation system regression Remote remote data science bootcamp Scrapy scrapy visualization seaborn seafood type Selenium sentiment analysis sentiment classification Shiny Shiny Dashboard Spark Special Special Summer Sports statistics streaming Student Interview Student Showcase SVM Switchup Tableau teachers team team performance TensorFlow Testimonial tf-idf Top Data Science Bootcamp Top manufacturing companies Transfers tweets twitter videos visualization wallstreet wallstreetbets web scraping Weekend Course What to expect whiskey whiskeyadvocate wildfire word cloud word2vec XGBoost yelp youtube trending ZORI

NYC Data Science Academy

NYC Data Science Academy teaches data science, trains companies and their employees to better profit from data, excels at big data project consulting, and connects trained Data Scientists to our industry.

NYC Data Science Academy is licensed by New York State Education Department.

Get detailed curriculum information about our
amazing bootcamp!

Please enter a valid email address
Sign up completed. Thank you!

Offerings

  • HOME
  • DATA SCIENCE BOOTCAMP
  • ONLINE DATA SCIENCE BOOTCAMP
  • Professional Development Courses
  • CORPORATE OFFERINGS
  • HIRING PARTNERS
  • About

  • About Us
  • Alumni
  • Blog
  • FAQ
  • Contact Us
  • Refund Policy
  • Join Us
  • SOCIAL MEDIA

    ยฉ 2025 NYC Data Science Academy
    All rights reserved. | Site Map
    Privacy Policy | Terms of Service
    Bootcamp Application