This project involves the development of a simple linear regression model to predict insurance costs based on personal attributes such as height, weight, and age. The goal is to demonstrate the application of linear regression techniques in a practical scenario, providing insights into how personal health data can influence insurance cost estimations.
The model takes the following features into account:
- Height: The height of the individual in centimeters.
- Weight: The weight of the individual in kilograms.
- Age: The age of the individual in years.
These features are used to predict the annual insurance cost for the individual.
The dataset used in this project consists of simulated data representing the height, weight, age, and corresponding insurance costs for several individuals. This data is used to train the linear regression model.
To run this project, you will need the following:
- Python 3.6 or higher
- Jupyter Notebook
- Libraries:
numpy
,pandas
,matplotlib
,sklearn
- Clone this repository to your local machine.
- Install the required libraries using the following command: pip install numpy pandas matplotlib sklearn
- Open the Jupyter Notebook (
ci_project.ipynb
) to view and run the project.
To use the project, simply run all cells in the provided Jupyter Notebook. The notebook includes detailed steps from data loading and preprocessing to model training and evaluation.
The model is built using the LinearRegression
class from the sklearn.linear_model
module. It includes data preprocessing steps such as scaling and normalization where necessary.
The results section in the notebook discusses the accuracy of the model and provides visualizations such as scatter plots and regression lines to demonstrate the relationship between the input features and the predicted insurance costs.
This project demonstrates a basic application of linear regression to a real-world problem. Future enhancements can include more complex models and additional features to improve prediction accuracy.
For any further questions or contributions, feel free to contact the repository maintainer at [email protected].