Skip to content

sudarshan-krishnan/Medical-Insurance-Cost-Prediction

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 

Repository files navigation

Insurance Cost Prediction Using Linear Regression

This project demonstrates how to predict insurance costs using a linear regression model. By leveraging Python and its powerful data science libraries, we import and analyze the data, preprocess it, and then build and evaluate a predictive model.

Key Features

  • Data Collection & Analysis: Load and explore the insurance dataset.
  • Data Visualization: Use plots to understand data distribution and relationships.
  • Preprocessing: Encode categorical variables and split data into features and target variables.
  • Model Training: Train a linear regression model to predict insurance costs.
  • Model Evaluation: Evaluate the model's performance using metrics like R-squared.

Components

  • Python libraries: NumPy, pandas, matplotlib, seaborn, scikit-learn.
  • Jupyter Notebook for interactive data analysis and model building.

How It Works

  1. Import Dependencies: Import necessary libraries for data manipulation, visualization, and modeling.
  2. Data Collection & Analysis: Load the insurance dataset and explore its structure, including checking for missing values and basic statistical measures.
  3. Data Visualization: Plot various features like age, gender, BMI, number of children, smoker status, and region to understand their distributions and relationships.
  4. Data Preprocessing: Encode categorical variables (e.g., sex, smoker, region) into numerical values. Split the data into features (X) and target variable (Y).
  5. Train-Test Split: Divide the dataset into training and testing sets.
  6. Model Training: Train a linear regression model on the training data.
  7. Model Evaluation: Evaluate the model's performance on both training and testing data using the R-squared metric.
  8. Predictive System: Build a system to predict insurance costs for new data inputs.

Applications

  • Predict insurance costs based on individual attributes.
  • Understand factors that influence insurance costs.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published