Signup and get access to similar projects
Every week, we pick a real-life project to build your portfolio and get ready for a job. All projects are built with ChatGPT as co-pilot!
Start the ChallengeA tech-culture podcast where you learn to fight the enemies that blocks your way to become a successful professional in tech.
Listen the podcastFollow the instructions below:
Once you have finished solving the exercises, be sure to commit your changes, push to your repository and go to 4Geeks.com to upload the repository link.
The important insurance company 4Geeks Insurance S.L. wants to calculate, based on physiological data of its customers what will be the premium (cost) to be borne by each of them. To do this, it has assembled a whole team of doctors and based on data from other companies and a particular study have managed to gather a set of data to train a predictive model.
The dataset can be found in this project folder under the name medical_insurance_cost.csv
. You can load it into the code directly from the link (https://raw.githubusercontent.com/4GeeksAcademy/linear-regression-project-tutorial/main/medical_insurance_cost.csv
) or download it and add it by hand in your repository. In this dataset you will find the following variables:
age
. Age of primary beneficiary (numeric)sex
. Gender of the primary beneficiary (categorical)bmi
. Body mass index (numeric)children
. Number of children/dependents covered by health insurance (numeric)smoker
. smoker (categorical)region
. Beneficiary's residential area in the U.S.: northeast, southeast, southwest, northwest (categorical)charges
. Health insurance premium (numerical)This second step is vital to ensure that we keep the variables that are strictly necessary and eliminate those that are not relevant or do not provide information. Use the example Notebook we worked on and adapt it to this use case.
Be sure to conveniently divide the data set into train
and test
as we have seen in previous lessons.
You do not need to optimize the hyperparameters. Start by using a default definition and improve it in the next step.
After training the model, if the results are not satisfactory, optimize it if possible.
NOTE: Solution: https://github.com/4GeeksAcademy/linear-regression-project-tutorial/blob/main/solution.ipynb
Signup and get access to similar projects
Every week, we pick a real-life project to build your portfolio and get ready for a job. All projects are built with ChatGPT as co-pilot!
Start the ChallengeA tech-culture podcast where you learn to fight the enemies that blocks your way to become a successful professional in tech.
Listen the podcast