/heretolearn_django

Django microservice for machine learning component of HereToLearn SOA app

Primary LanguageJupyter Notebook

Here To Learn - Django & Jupyter Notebook

Django application hosted on Heroku that utilizes a machine learning model trained with over 300,000 data points to predict test outcomes for 5,000 mock students based on eating and sleeping habits for each student.

This Jupyter Notebook demonstrates:

  • Data generation
  • JSON API conversion to pandas DataFrame
  • Data munging (dummy variables for nominal categorical sleep data)
  • Hyperparameter optimization & model selection in RandomSearchCV
  • Gradient boosted model training
  • matplotlib and seaborn visualization

This app is one-third of a Service Oriented Architecture (SOA) app called Here To Learn which integrates with a Rails application which presents the data and serves as the interface for teachers and students and a Sinatra application which stores survey information gathered from students.

Application Highlights:

  • 5 person team project
  • SOA integration into Rails and Sinatra applications all hosted independently on Heroku
  • Data munging, hyperparameter optimization & model selection
  • Matplotlib, seaborn, chart.js data visualization

Contributing

  • Blake Enyart - Django app, data visualization (chart.js, seaborn, matplotlib), machine learning implementation
  • William Peterson - Provided input and mentoring on the machine learning model development

Location of Apps in Production

Tech Stack

Data Visualization

Local Configuration for Further Development

Use the following code to setup the code locally:

python3 -m venv env
source env/bin/activate
pip install -r requirements.txt
psql
CREATE DATABASE heretolearn_production;
CREATE USER heretolearn WITH PASSWORD 'badgers';
GRANT ALL PRIVILEGES ON DATABASE heretolearn_production TO heretolearn;
\q
python manage.py migrate
python manage.py runserver

Navigate to localhost:8000 from your browser to see the app in development mode

Django App Demo

Use the following endpoint to see the production app return data from the Sinatra app, make a prediction, and render data and prediction in JSON format:

https://lit-fortress-28598.herokuapp.com/machinelearning/results/?student_id=5