Skip to content
D

Disease Prediction System(DPS)

Prevention Starts with Prediction

Created on 7th September 2025

โ€ข

D

Disease Prediction System(DPS)

Prevention Starts with Prediction

The problem Disease Prediction System(DPS) solves

The Disease Prediction System can be used to:

๐Ÿงช Early Diabetes Screening โ€“ Quickly check whether a person is at risk of diabetes using basic health details.

โšก Fast Health Assessment โ€“ Enter simple inputs like glucose, BMI, and age to get an instant prediction.

๐Ÿฅ Support for Doctors & Clinics โ€“ Acts as a decision support tool for doctors, helping them screen patients faster before recommending detailed tests.

๐Ÿ‘จโ€๐Ÿ‘ฉโ€๐Ÿ‘ง Self-Check for Individuals โ€“ Anyone can use it from home to get a preliminary idea of their health condition.

๐ŸŒ Accessible Anywhere โ€“ Runs online on Streamlit Cloud, so no installation or setup is required.

๐Ÿ”‘ How It Makes Tasks Easier & Safer

โœ… Saves Time โ€“ No need to wait for multiple medical tests just for a first-level check.

โœ… Increases Awareness โ€“ Encourages people to monitor their health regularly.

โœ… Assists Healthcare โ€“ Doctors can quickly identify high-risk patients.

โœ… Accessible & Safe โ€“ Works on any device with internet, making health predictions more inclusive.

Challenges I ran into

While building this project, one major hurdle we faced was:

โšก Mismatch in Features During Prediction

Initially, when we tried to predict the output for a new patient, the app crashed with an error:

ValueError: X has 7 features, but StandardScaler is expecting 8 features as input

This happened because the model was trained on 8 features (Pregnancies, Glucose, Blood Pressure, Skin Thickness, Insulin, BMI, Diabetes Pedigree Function, Age), but during prediction we accidentally passed fewer inputs.

โœ… How We Solved It

We carefully checked the dataset columns and matched them with the form inputs.

Added all 8 inputs in the form (Pregnancies, Glucose, BP, Skin Thickness, Insulin, BMI, DPF, Age).

After fixing this mismatch, the model worked correctly and predictions were generated smoothly.

๐ŸŽฏ Learning

Always ensure that the input format for prediction matches exactly with the training data.

Debugging step by step helped us identify where the mismatch occurred.

This taught us the importance of data consistency in ML pipelines.

Technologies used

Discussion

Builders also viewed

See more projects on Devfolio