Back to Projects
Medical Cost Prediction

Medical Cost Prediction

PythonPandasNumPyScikit-learnMatplotlibSeaborngradio

About the Project

This project tackles the real-world problem of predicting medical insurance costs using machine learning. It was trained on a dataset containing features such as age, BMI, number of children, smoking status, and region. After exploratory data analysis and feature engineering, a Gradient Boosting Regressor was chosen for its strong performance on tabular regression tasks. The final model is deployed as an interactive Gradio app on Hugging Face Spaces, making it accessible to anyone without requiring technical knowledge.

Challenges Faced

  • Handling skewed distributions in the target variable (charges), which required log transformation before training.
  • Balancing model complexity and interpretability — the Gradient Boosting model achieved low error but required careful hyperparameter tuning to avoid overfitting.
  • Designing an intuitive Gradio UI that is user-friendly for non-technical visitors while accurately representing model inputs.

🚀 Future Plans & Improvements

  • Add SHAP (SHapley Additive exPlanations) visualizations to show which features most influence each individual prediction.
  • Incorporate a wider and more diverse dataset to improve prediction accuracy across different demographics.
  • Explore deployment on a custom domain with a more polished UI built with React.