Skip to content

yuki-sf/Diabetes-Prediction

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

15 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿฉบ๐Ÿ’ก Diabetes Prediction App โ€” Powered by Machine Learning & Love ๐Ÿง ๐Ÿ’–

Diabetes Prediction Demo

"A little data, a little ML, and a lot of heart ๐Ÿ’“"
Letโ€™s predict diabetes in a way thatโ€™s smart and delightful!


๐Ÿ” So, Whatโ€™s Happening Behind the Scenes?

Okay, real talk... ๐Ÿ˜…
Machine learning can sound super confusing at first.
"Feature what? WoE huh? Random Forests โ€” are we planting trees now?! ๐ŸŒณ"

We get it โ€” and youโ€™re not alone!

Confused Gif

But donโ€™t worry โ€” weโ€™re breaking it down in the cutest way possible!
Your data isnโ€™t just getting judged by a robot ๐Ÿค– โ€” it's being transformed with care and clever math โœจ


๐Ÿ›  The ML Pipeline:

  1. Feature Engineering
    ๐Ÿงช We mix up your input features to create cool combos like:

    • Pregnancy Ratio = Pregnancies / Age
    • Risk Score = A special blend of Glucose, BMI, and Age
    • And moreโ€ฆ like Glucose/BMI, BMI ร— Age, Insulin Efficiency!
  2. WoE Encoding (Weight of Evidence)
    ๐Ÿ“Š We categorize continuous values and calculate their predictive power (in a very mathy but magical way ๐Ÿง™). This helps our model understand what's really important.

  3. Column Selection + Prediction
    ๐ŸŽฏ Only the best features survive the cut, and they go into a Random Forest Classifier (aka our friendly decision-making tree ๐Ÿชด๐ŸŒณ).
    Then we save that model as a .pkl file using joblib โ€” like freezing your model in time for later!

  4. Prediction Time!
    Just slide in your values and โ€” poof! โ€” you get:

    • ๐ŸŽฏ Model Accuracy
    • ๐Ÿง  Prediction & Confidence %
    • ๐Ÿ“ˆ Feature Contributions via LIME
    • ๐Ÿฉ A beautiful donut chart to keep it sweet!

Confused Again Gif

So yes โ€” it might sound confusing at first...
But weโ€™ve wrapped all that ML magic into a friendly UI just for you ๐Ÿ˜„๐Ÿ’–

๐Ÿ“– But for the Curious Cats out there, Click to view ML Theory Summary

Full explanation here โ†’


๐ŸŽฎ Try It Yourself

Ready to predict? Letโ€™s go! ๐Ÿ

# 1. Set up your environment
python -m venv venv
.\venv\Scripts\activate

# 2. Install the magic
pip install -r requirements.txt

# 3. Launch the app ๐Ÿš€
streamlit run app.py

๐ŸŽจ Highlights

โœ… Interactive & Responsive UI using Streamlit

๐Ÿง  Smart Predictions with Scikit-learn

๐Ÿ” Explainable AI via LIME

๐Ÿฉ Cute donut charts for confidence scores

๐ŸŒˆ Built with love, data, and caffeine โ˜•โค๏ธ


โš ๏ธ Just a Heads-Up

This app is for educational and demo purposes only. Donโ€™t use it for real medical decisions, okay? ๐Ÿ™ Always talk to a real doctor ๐Ÿฉบ๐Ÿ‘จโ€โš•๏ธ๐Ÿ‘ฉโ€โš•๏ธ


๐Ÿ’Œ Spread the Joy!

Like what you see? Show some love:

โญ Star the repo

๐Ÿด Fork and remix

๐Ÿค Share with a fellow data nerd

Letโ€™s keep learning and building fun ML apps together! ๐Ÿง‘โ€๐Ÿ’ปโœจ


About

๐Ÿ” A fun, explainable Diabetes Prediction app built with ML & Streamlit. Predicts risk, shows feature insights via LIME, and visualizes results with sweet donut charts! ๐Ÿฉ๐Ÿฉบ๐Ÿ’ก

Resources

License

Security policy

Stars

Watchers

Forks

Contributors