Skip to content

tiwari369/Autism-Prediction-ML-Web-App

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Autism Prediction ML Web App

A machine learning web application for autism prediction using Logistic Regression, SVM, and XGBoost models. The project includes a Flask-based frontend where users can enter required details and get a prediction output through a simple web interface.

Project Overview

This project uses machine learning techniques to predict autism-related outcomes from structured data. It was developed as an academic minor project to demonstrate how trained ML models can be integrated with a web application.

The project includes model training, saved machine learning models, dataset files, and a Flask-based frontend for real-time prediction.

Features

  • Autism prediction using machine learning
  • Logistic Regression model
  • Support Vector Machine model
  • XGBoost model
  • Flask-based web application
  • User-friendly prediction form
  • Saved trained models using Joblib
  • Jupyter Notebook for model analysis and training
  • Dataset files for academic reference
  • Confusion matrix visualization included

Tech Stack

  • Python
  • Flask
  • Pandas
  • NumPy
  • Scikit-learn
  • XGBoost
  • Joblib
  • HTML
  • CSS
  • Jupyter Notebook

Project Structure

Autism Prediction.ipynb
train.csv

Frontened Autism Prediction/
│── app.py
│── requirements.txt
│── train.py
│── readme.md
│── toRun.txt
│── modules.txt
│── confusion_matrix.png
│── feature_columns.joblib
│── feature_scaler.joblib
│── logistic_regression_model.joblib
│── svm_model.joblib
│── xgboost_model.joblib
│
│── data/
│   │── train.csv
│   │── test.csv

How to Run the Project

Follow these steps carefully on Windows using VS Code.

Step 1: Clone the Repository

git clone https://github.com/tiwari369/Autism-Prediction-ML-Web-App.git

Step 2: Open the Project Folder

cd Autism-Prediction-ML-Web-App

Step 3: Go to the Frontend Folder

cd "Frontened Autism Prediction"

Step 4: Create a Virtual Environment

python -m venv .venv

If the above command does not work, try:

py -m venv .venv

Step 5: Activate the Virtual Environment

For Windows PowerShell:

.venv\Scripts\activate

After activation, the terminal should show something like:

(.venv)

Step 6: Upgrade pip

python -m pip install --upgrade pip

Step 7: Install Required Libraries

pip install -r requirements.txt

If any package error occurs, install the common required packages manually:

pip install flask pandas numpy scikit-learn xgboost joblib

Step 8: Run the Flask Application

python app.py

Step 9: Open the Web App in Browser

After running app.py, open this link in your browser:

http://127.0.0.1:5000/

Now fill the form and submit it to get the autism prediction result.

Model Files Used

The web app uses trained model and preprocessing files stored inside the frontend folder:

logistic_regression_model.joblib
svm_model.joblib
xgboost_model.joblib
feature_scaler.joblib
feature_columns.joblib

These files help the application load the trained models and make predictions without retraining every time.

Training File

The project also includes:

train.py

This file can be used to train or regenerate model files if required.

To run the training script:

python train.py

Dataset

Dataset files are included for academic learning and model testing purposes:

train.csv
data/train.csv
data/test.csv

Common Errors and Fixes

1. Flask not found

If you get:

ModuleNotFoundError: No module named 'flask'

Run:

pip install flask

2. XGBoost not found

If you get:

ModuleNotFoundError: No module named 'xgboost'

Run:

pip install xgboost

3. Joblib model file not found

Make sure you are running the app from inside this folder:

Frontened Autism Prediction

Correct command:

cd "Frontened Autism Prediction"
python app.py

4. Virtual environment activation issue

If PowerShell does not allow activation, run:

Set-ExecutionPolicy -Scope CurrentUser -ExecutionPolicy RemoteSigned

Then activate again:

.venv\Scripts\activate

Files Not Included Publicly

Private academic documents such as reports, presentation files, and tool/source documents are intentionally excluded from this public repository using .gitignore.

Excluded file types include:

*.docx
*.pptx
*.pdf

Use Case

This project is useful for:

  • Academic minor project demonstration
  • Machine learning classification practice
  • Flask ML deployment learning
  • Healthcare-related ML project understanding
  • Model integration with a web frontend

Author

Riteek Raj Tiwari

Disclaimer

This project is created only for academic and learning purposes. It should not be used as a real medical diagnosis tool. Autism-related concerns should always be discussed with qualified medical or healthcare professionals.

About

Machine learning web app for autism prediction using Logistic Regression, SVM, and XGBoost.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors