Inspiration
Diabetes is a widespread health concern, and early identification of risk can help individuals and healthcare professionals take preventive action. We were inspired to explore how Machine Learning could analyze medical data and identify patterns associated with diabetes. The goal of DiaSense was to build a reliable and data-driven prediction system that could provide early insights into an individual's potential diabetes risk.
What it does
DiaSense – AI-Powered Diabetes Prediction System analyzes relevant medical and lifestyle-related information to predict the likelihood of diabetes.
The system processes features such as:
- Gender and age
- Hypertension and heart disease history
- Smoking history
- BMI
- HbA1c level
- Blood glucose level
It uses Machine Learning models to identify patterns in the data and generate a prediction. The project is intended as a decision-support and risk prediction tool, not as a replacement for professional medical diagnosis.
How we built it
We built DiaSense using Python and a complete Machine Learning workflow.
Our development process included:
Data Analysis and Preprocessing: We analyzed a dataset containing over 10,000 medical records and cleaned and prepared the data using Pandas and NumPy.
Handling Class Imbalance: Since the dataset had an imbalance between diabetes and non-diabetes cases, we used SMOTE (Synthetic Minority Over-sampling Technique) to improve the model's ability to learn from minority-class examples.
Model Experimentation: We experimented with several Machine Learning algorithms, including:
- Logistic Regression
- Support Vector Machine (SVM)
- K-Nearest Neighbors (KNN)
- Decision Tree
- Random Forest
- XGBoost
Model Optimization: The best-performing models, Random Forest and XGBoost, were further optimized using hyperparameter tuning and cross-validation.
Ensemble Approach: We combined the strengths of Random Forest and XGBoost to create an ensemble-based approach for improved prediction performance.
Evaluation and Visualization: We evaluated the models using Accuracy, F1-score, and ROC-AUC and used Matplotlib for visualization and analysis.
Challenges we ran into
One of the biggest challenges was dealing with class imbalance in the dataset. A model trained directly on imbalanced data can become biased toward the majority class and produce misleading accuracy.
Another challenge was selecting the best model. Different algorithms performed differently, so we had to compare multiple approaches using appropriate evaluation metrics rather than relying only on accuracy.
We also focused on reducing the possibility of overfitting. Hyperparameter tuning and cross-validation helped us evaluate the models more reliably and improve their generalization.
Accomplishments that we're proud of
We are proud that DiaSense successfully combines several important stages of a real-world Machine Learning workflow, including data preprocessing, imbalance handling, model experimentation, optimization, and evaluation.
Some of our key accomplishments include:
- Working with 10,000+ medical records
- Handling class imbalance using SMOTE
- Experimenting with multiple Machine Learning algorithms
- Building an ensemble using Random Forest and XGBoost
- Applying hyperparameter tuning and cross-validation
- Achieving approximately 98% accuracy
- Achieving an F1-score of 0.97
- Achieving a ROC-AUC score of 0.99
Most importantly, the project demonstrates how Machine Learning can be used to analyze healthcare-related data and provide meaningful risk insights.
What we learned
Through DiaSense, we gained practical experience with the complete Machine Learning development process.
We learned:
- How to preprocess and analyze real-world datasets
- Why class imbalance can significantly affect model performance
- How SMOTE can help address imbalanced datasets
- How different Machine Learning algorithms behave on the same problem
- Why metrics such as F1-score and ROC-AUC are important in addition to accuracy
- How hyperparameter tuning and cross-validation can improve model reliability
- How ensemble methods can combine the strengths of multiple models
The project also taught us that high model performance alone is not enough, especially in healthcare-related applications. Reliability, responsible use, and proper validation are equally important.
What's next for DiaSense – AI-Powered Diabetes Prediction System
We plan to further improve DiaSense by expanding it into a more practical and user-friendly healthcare decision-support system.
Future improvements include:
- Developing a simple web interface for easier predictions
- Adding explainable AI techniques to help users understand predictions
- Testing the model on larger and more diverse datasets
- Improving model validation to evaluate real-world generalization
- Adding personalized risk insights and visualizations
- Exploring secure integration with healthcare systems
Our long-term goal is to make DiaSense a responsible and accessible AI-based tool that can provide useful diabetes risk insights while supporting, rather than replacing, healthcare professionals.
Built With
- cross-validation
- data-science
- ensemble-learning
- hyperparameter-tuning
- jupyter-notebook
- machine-learning
- matplotlib
- numpy
- pandas
- python
- random-forest
- roc-auc
- scikit-learn
- support-vector-machine
- xgboost
Log in or sign up for Devpost to join the conversation.