Autism detection API

Ritabrata Maiti

Ritabrata Maiti

Delhi, Delhi

2 0
  • 0 Collaborators

To find out the best machine learning pipeline for predicting ASD cases using genetic algorithms, via the TPOT library. (Classification Problem) Compare the accuracy of the accuracy of the determined pipeline, with a standard Naive-Bayes classifier. Saving the classifier as an external file, and use this file in a Flask API to make predictions in the cloud. ...learn more

Project status: Published/In Market

HPC, Artificial Intelligence

Code Samples [1]Links [1]

Overview / Usage

API Demo:
Visit: http://ritabratamaiti.pythonanywhere.com/query?ip=0,0,0,0,0,0,0,1,0,1,2,30.0,m,White-European,no,no,Ireland,no,Self,NO You will get a value of 0 on your browser, indicating that the person does not suffer from ASD. The values that are assigned to ip: (0,0,0,0,0,0,0,1,0,1,2,30.0,m,White-European,no,no,Ireland,no,Self,NO) indicate the various features as per dataset description. You are free to change the API parameters to explore different results. 1 = ASD present; 0 = ASD absent

Application Demo:
Using the same API, I have built an android application which serves as a user-friendly tool that can be used by caretakers, doctors, and patients to determine an ASD case. The application can be found here: https://github.com/ritabratamaiti/Autism-Detection-API/tree/master/Android%20App%20Based%20on%20API

Note: This app was built on Thunkable; due to the Hybrid nature of the app, the google form in the initial screen may load slowly(because of embedded web viewer). Your patience is appreciated ^_^

This project has 3 goals:
To find out the best machine learning pipeline for predicting ASD cases using genetic algorithms, via the TPOT library. (Classification Problem)
Compare the accuracy of the accuracy of the determined pipeline, with a standard Naive-Bayes classifier.
Saving the classifier as an external file, and use this file in a Flask API to make predictions in the cloud.

Methodology / Approach

The first 2 goals are achieved via the builder.py script, which cleans the datasets, performs label encoding and finds the best-fitted classifier pipeline using genetic algorithms from the TPOT library. Furthermore, the builder script produces the files d, df, clf, and f.

d: This file contains the pickled dictionary used to label-encode the database.
df: The file contains the pickled skeletal dictionary of the original database.
clf: This file contains the pickled classifier pipeline that has the highest accuracy, determined via genetic algorithms.
f: This file contains a dummy row, as initial input that is later utilized by the API script.
The final goal, implementing the flask API, is achieved by the helper and API scripts. The helper script reads the files created by the builder and uses the saved models to predict an output, from the input obtained from the API request. The API script handles the actual requests and calls the helper script to predict and return an output.

Technologies Used

A Python 3.6 installation
The latest scikit learn installation
The latest TPOT installation
The latest Flask installation
The dill Python library

Repository

https://github.com/ritabratamaiti/Autism-Detection-API

Comments (0)