This project implements a machine learning framework for the early detection of Autism Spectrum Disorder (ASD). It includes both a Jupyter Notebook (model_training.ipynb) for model training and a Python script (autism_gui.py) for a user-friendly graphical interface to make predictions. The project leverages various machine learning techniques to provide an effective tool for identifying potential ASD cases.
Here are some screenshots of the application:
For ease of use, this project includes a pre-built executable file (autism_gui.exe) located in the Ready to run EXE directory. You can directly run this executable on your Windows computer to utilize the application without needing to install Python or any dependencies. Simply navigate to the Ready to run EXE folder and double-click autism_gui.exe to launch the ASD prediction tool.
- Ready to Run Executable: A pre-built
.exefile for immediate use on Windows. - Data Preprocessing: Robust preprocessing in the notebook, including missing value imputation, feature encoding, and scaling.
- Machine Learning Classification: Training and evaluation of eight different machine learning classifiers within the
model_training.ipynbnotebook. - GUI Prediction: A graphical user interface (
autism_gui.py) allows users to input data and receive ASD predictions. - Model Persistence: Trained models, preprocessing objects, and column templates are saved as
.pklfiles for use in the GUI. - Clear Results Visualization: The GUI provides visual representations of prediction results, including pie charts for distribution and bar charts for model confidence.
The project is organized as follows:
. ├── Ready to run EXE/ # Directory containing the pre-built executable. │ └── autism_gui.exe ├── autism_gui.py # Python script for the graphical user interface. ├── model_training.ipynb # Jupyter Notebook for model training and evaluation. ├── models/ # Directory containing trained model files (.pkl). ├── preprocessor.pkl # Saved ColumnTransformer for data preprocessing. ├── template_columns.pkl # Saved list of input feature names. ├── train_combined_final.csv # Training data. ├── test_final.csv # Testing data. └── README.md # Documentation.
-
Ready to Run Application:
- Navigate to the
Ready to run EXEdirectory. - Double-click the
autism_gui.exefile to launch the application.
- Navigate to the
-
Model Training (
model_training.ipynb):- Loads training and testing data (
train_combined_final.csv,test_final.csv). - Performs data preprocessing using
scikit-learn(encoding, scaling). - Trains eight different machine learning models.
- Saves the trained models to the
models/directory as.pklfiles (e.g.,AB_model.pkl,RF_model.pkl). - Saves the
ColumnTransformer(preprocessor.pkl) and the list of feature names (template_columns.pkl).
- Loads training and testing data (
-
GUI Application (
autism_gui.py):- Loads the trained models, preprocessor, and feature names.
- Creates a graphical interface using
tkinterfor user input. - Takes user input and preprocesses it using the saved
ColumnTransformer. - Uses the loaded models to make ASD predictions.
- Displays the prediction results in a user-friendly format, including visualizations.
- For running the Python scripts and the notebook:
- Python 3.x
- Jupyter Notebook
- Libraries: (See
model_training.ipynbandautism_gui.pyfor specific dependencies)- pandas
- numpy
- scikit-learn
- matplotlib
- tkinter
- For running the pre-built executable:
- A Windows operating system.
-
Running the Executable (Recommended):
- Navigate to the
Ready to run EXEfolder. - Double-click
autism_gui.exe.
- Navigate to the
-
Model Training:
-
Open the
model_training.ipynbnotebook using Jupyter Notebook.jupyter notebook model_training.ipynb
-
Execute the cells in the notebook sequentially to train the models and generate the necessary
.pklfiles.
-
-
Running the Python Script (if you have Python installed):
-
Open your terminal or command prompt.
-
Navigate to the project directory.
-
Run the
autism_gui.pyscript:python autism_gui.py
-
The model_training.ipynb notebook provides detailed results for each trained model. These results highlight the effectiveness of the machine learning approach for ASD detection.
Contributions to this project are welcome. Please follow these guidelines:
- Fork the repository.
- Create a new branch for your feature or bug fix.
- Write clear and concise commit messages.
- Submit a pull request with a detailed description of your changes.
- The authors of the research paper "A Machine Learning Framework for Early-Stage Detection of Autism Spectrum Disorders" for providing the methodological foundation for this project.
- MIET college, Meerut
- MD. Shahid Sir (College Professor), MIET
- Hardik Goel (BTech CSE Student)
- Manas Kush (BTech CSE Student)
- Harshita Narang (BTech CSE Student)
- Harsh Bhardwaj (BTech CSE Student)
If you use this code in your research, please cite the following paper:
S. M. Mahedy Hasan, MD Palash Uddin, MD Al Mamun, Muhammad Imran Sharif, Anwaar Ulhaq, and Govind Krishnamoorthy, “A Machine Learning Framework for Early-Stage Detection of Autism Spectrum Disorders,” in IEEE Access, vol. 11, pp. 15038-15057, 2023, doi: 10.1109/ACCESS.2022.3232490.
.png)
.png)
.png)
.png)
.png)