Predicting Patient treatment costs using Machine Learning.

Regression and EDA on personal health data to determine factors contributing to treatment

Thomas George Thomas
Mar 21 · 6 min read
Photo by Kendal on Unsplash

Introduction

What is a Linear Regression?

Why Linear Regression?

Types of Linear Regression

Data Description

Photo by Alexander Sinn on Unsplash

Acquiring the Data

Viewing the sample data | Image by Author

Preparing the Data

data.describe()
Viewing descriptive statistics of the data | Image by Author

Exploratory Data Analysis (EDA)

Feature Engineering

Photo by Alex Knight on Unsplash
Differentiating numerical and categorical features | Image by Author
One hot encoding on Categorical data | Image by Author
Exploring the correlation between the features | Image by Author
Heatmap showing the correlation between the features | Image by Author
Graph showing the varying trend for treatment charges of patients | Image by Author

Building the Model

Training the linear regression model | Image by Author

Evaluating the Model

Model Evaluation results | Image by Author

Conclusion

References

Analytics Vidhya

Analytics Vidhya is a community of Analytics and Data…

Analytics Vidhya

Analytics Vidhya is a community of Analytics and Data Science professionals. We are building the next-gen data science ecosystem https://www.analyticsvidhya.com

Thomas George Thomas

Written by

Data Analytics Engineering Graduate Student at Northeastern. Ex Senior Data Engineer & IBM Certified Data Scientist. https://thomasgeorgethomas.ml

Analytics Vidhya

Analytics Vidhya is a community of Analytics and Data Science professionals. We are building the next-gen data science ecosystem https://www.analyticsvidhya.com