Code Monkey home page Code Monkey logo

predicting_food_allergies's Introduction

Predicting Childrens' Food Allergies

Can we predict a child's future food allergies based on their current ones?

image

Business Problem

The prevalence of food allergies in children has increased at a rapid rate within the past couple of decades. "Between 1997 and 2011, food allergies among children increased 50% and now affect 6 million US children" [1]:source. As a millenial born in 1991, my elementary school experience was void of strict protocols on outside food, unlike the current school landscape. Classmates often had cupcakes or pizza brought in to celebrate birthdays and peanut butter crackers were the unofficial snack of field trips.

The stakeholder is Food Allergy Research & Education (FARE). The objective is to use existing data to predict and model patients' future food allergies. The ability to predict an increase of a specific food allergy identifies new trends and allows research to pivot and address them.

Data

The dataset was obtained from zenodo.org. It entails information on food allergies alongside preexisting conditions on a peer reviewd study from the Children's Hospital of Philadelphia of patients born in 1983-2012. There were 333,200 individuals in the dataset. The columns were then pared down as listed below.

logreg_crop_cmatrix_curve

logreg_crop_scores

Modeling and Evaluation

Modeling began with the dataset split, scaled, transformed and smote'd. A Dummy Baseline was the first model and it resulted in a Train Accuracy of 50% and Test Accuracy of 6.8%. After One Hot Encoding I ran a Logistic Regression which resulted in a Train Accuracy of 75.45% and Test Accuracy of 89.33%. I followed up with a Decision Tree Classifier where milk, egg and peanut allergies occur at the highest frequency.

This model can be applied to

In the future I would like to run an additional target also utilizing pre-existing traits of asthma and eczema as well in addition to having an adult dataset. Finally I would like to implement a risk level range estimation prediction.

Repo Tree

├── Data                                    <- data folder
├── EDA                                     <- EDA folder
├── Images                                  <- images folder
├── .DS_Store                               <- DS_store
├── .gitignore                              <- gitignore
├── Final_Notebook                          <- Jupyter notebook
├── README.md                               <- README overview
├── notebook.pdf                            <- jupyter notebook pdf
├── presentation.pdf                        <- slideshow presentation pdf
└──                             

predicting_food_allergies's People

Contributors

daranadine avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.