Skip to content

samueldmeyer/explainable_ML_public_policy

 
 

Repository files navigation

Explainability of Machine Learning Models

Research Project on the explainability and interpretability of machine learning models.

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.

Prerequisites

  • Appilication/Backend

    • Python 3.4 or greater, Django 1.11
    • numpy, pandas, patsy, sklearn, scipy, django-cors-headers, django-filter, djangorestframework-bulk
      • To install: pip install -r requirements.txt
  • WebUI/Frontend

    • node.js
    • react-router-dom, file-saver
      • To install: cd Explainability/client; npm install
  • If using virtualenv, create a new virtualenv before running pip install -r requirements.txt

  • If using Anaconda, run conda create --name explainableml python=3.5 and source activate explainableml

Deploying

  • Appilication/Backednd: Run

    • python manage.py runserver
  • WebUI/Frontend: Run

    • npm start (in Explainability/client directory)
  • Use different terminal instances for each


Development

First, set up your python environment. If using Anaconda, run conda create --name explainableml django numpy pandas patsy sklearn scikit-learn

To install all node_modules for the frontend, use

cd Explainability/client
npm install
cd ../..

Then start the python api server with python manage.py runserver

And (in a separate terminal) start the frontend server with

cd Explainability/client
npm start

The frontend server at http://localhost:3000/ will automatically load in your default browser.

The frontend will automatically refresh the page when JavaScript files are changed.

You can view api documentation at http://localhost:8000/

Testing

You can run tests for python with python manage.py test restapi

And tests for React in Explainability/client with npm test

Database updates

Any time you update the database tables, you must also generate a migration script with python manage.py makemigrations Otherwise, tests will fail.


Deployment on a public server (not secure)

In Explainability/client, run npm run build Then at the project root run python manage.py collectstatic and python manage.py runserver 0.0.0.0:8000

Documents

User Story Map
UI Wireframe
ERD and Internal Interface Overview

Notes

Set up using create-react-app

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 60.0%
  • Python 25.6%
  • CSS 10.8%
  • HTML 3.6%