Skip to content

This work demonstrates how to apply linear regression using Python and scikit-learn, starting from a simple synthetic example and progressing to a real-world healthcare dataset.

Notifications You must be signed in to change notification settings

kduffuor/Linear-Regression-model-Basics-to-Project-Based

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Linear Regression with Scikit-Learn: From Basics to Healthcare Cost Prediction

This work demonstrates how to apply linear regression using Python and scikit-learn, starting from a simple synthetic example and progressing to a real-world healthcare dataset.

What it Covers

Part 1: Linear Regression Basics

  • Model training and prediction
  • Evaluation using Mean Squared Error and R² Score
  • Plotting regression line

Part 2: Medical Cost Prediction (Mini Project)

  • EDA
  • Feature selection and preprocessing
  • One-hot encoding of categorical variables
  • Splitting into train/test sets
  • Model training and evaluation
  • Actual vs Predicted cost visualization

Techniques & Tools Used

  • Python
  • scikit-learn (LinearRegression, train_test_split, metrics, OneHotEncoder)
  • pandas for data handling
  • matplotlib and seaborn for visualization

Next Steps

  • Extend to Polynomial Regression
  • Try regularization (Ridge, Lasso)
  • Explore healthcare datasets with more features or classification tasks

About

This work demonstrates how to apply linear regression using Python and scikit-learn, starting from a simple synthetic example and progressing to a real-world healthcare dataset.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published