text_plain_output_1.png image_output_1.png
import matplotlib.pyplot as plt

import numpy as np

import os

import random

import seaborn as sns

def seed_everything(seed):
    random.seed(seed)
    os.environ['PYTHONHASHSEED'] = str(seed)
    np.random.seed(seed)
seed_everything(42)

fig, axes = plt.subplots(2,3, figsize = (10,10))

sns.boxplot(y = train['Age'], ax = axes[0][0])
sns.boxplot(y = train['Height'], ax = axes[0][1])
sns.boxplot(y = train['Weight'], ax = axes[0][2])

sns.boxplot(y = train['Duration'], ax = axes[1][0])
sns.boxplot(y = train['Heart_Rate'], ax = axes[1][1])
sns.boxplot(y = train['Body_Temp'],ax = axes[1][2])

plt.tight_layout()
plt.show()

mask = np.zeros_like(train.corr())
mask[np.triu_indices_from(mask)] = True

def GenderEncoder(df):
    df.loc[df['Gender'] == 'male', 'Gender'] = 0
    df.loc[df['Gender'] == 'female', 'Gender'] = 1
    return df
train = GenderEncoder(train).reset_index(drop=True)
test = GenderEncoder(test).reset_index(drop=True)
train