<jupyter_start><jupyter_text>ML Tuesdays - Session 3 Machine Learning Track Medical Insurace Cost Prediction Exercise Guidelines1. The notebook has been split into multiple steps with fine-grained instructions for each step. Use the instructions for each code cell to complete the code.2. You can refer the Linear Regression Module in the Machine Learning Pack from CellStrat Hub.3. Make use of the docstrings of the functions and classes using the `shift+tab` shortcut key.4. Refer the internet for the explanation of any algorithm.  About the DatasetThe insurance.csv dataset contains 7 features (columns). The dataset contains 4 numerical features (age, bmi, children and charges) and 3 nominal features (sex, smoker and region) that were converted into factors with numerical value desginated for each level.The purposes of this exercise to look into different features to observe their relationship, and plot a multiple linear regression based on several features of individual such as age, physical/family condition and location against their existing medical expense to be used for predicting future medical expenses of individuals that help medical insurance to make decision on charging the premium.le (0 or 1).  Load dataset  Handling Categorical Data- Encode the categorical variables using `get_dummies()`<jupyter_code>#==============================================================================
# Description of dataset (Categorical):
#==============================================================================
dataset.describe(include=['O'])<jupyter_output><empty_output><jupyter_text>Encode the categorical variables using `get_dummies()`<jupyter_code>#==============================================================================
# Rearranging columns to see better
#==============================================================================

dataset = dataset[['age','sex_male','smoker_yes','bmi','children','region_northwest','region_southeast','region_southwest','charges']]
#train_data.head(2)
#==============================================================================
# Rounding up & down Age
#==============================================================================

dataset['age'] = round(dataset['age'])<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.26096491228070173, 'fraction_numerical': 0.004824561403508772, 'mean_word_length': 8.160642570281125, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '2', 'dir': 'jupyter-structured-clean-dedup', 'id': '151866', 'license': 'MIT', 'n_tokens_mistral': 505, 'n_tokens_neox': 459, 'n_words': 213, 'path': 'MLT-3/MLT3_Medical-Insurance-Cost-Prediction.ipynb', 'repo_name': 'CellStratAI/discord-ml-tuesdays', 'size': '2280'}