{"metadata":{"kernelspec":{"display_name":"Python 3","language":"python","name":"python3"},"language_info":{"name":"python","version":"3.10.12","mimetype":"text/x-python","codemirror_mode":{"name":"ipython","version":3},"pygments_lexer":"ipython3","nbconvert_exporter":"python","file_extension":".py"},"kaggle":{"accelerator":"none","dataSources":[{"sourceId":81933,"databundleVersionId":9643020,"sourceType":"competition"},{"sourceId":10272470,"sourceType":"datasetVersion","datasetId":6355962}],"dockerImageVersionId":30822,"isInternetEnabled":false,"language":"python","sourceType":"notebook","isGpuEnabled":false}},"nbformat_minor":4,"nbformat":4,"cells":[{"cell_type":"code","source":"import numpy as np\nimport pandas as pd\nimport matplotlib.pyplot as plt\nimport seaborn as sns\nfrom sklearn.metrics import confusion_matrix   \n%matplotlib inline\n","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2024-12-24T10:42:07.163446Z","iopub.execute_input":"2024-12-24T10:42:07.163840Z","iopub.status.idle":"2024-12-24T10:42:08.610972Z","shell.execute_reply.started":"2024-12-24T10:42:07.163801Z","shell.execute_reply":"2024-12-24T10:42:08.609912Z"}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"# Load data from a CSV file\ndata = pd.read_csv('/kaggle/input/train-test-and-sample-submission/data_dictionary.csv')","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2024-12-24T10:42:08.612052Z","iopub.execute_input":"2024-12-24T10:42:08.612663Z","iopub.status.idle":"2024-12-24T10:42:08.642313Z","shell.execute_reply.started":"2024-12-24T10:42:08.612623Z","shell.execute_reply":"2024-12-24T10:42:08.641251Z"}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"# Display the full data in a scrollable format\nfrom IPython.display import display, HTML\ndisplay(HTML(data.to_html(escape=False)))","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2024-12-24T10:42:08.643612Z","iopub.execute_input":"2024-12-24T10:42:08.643979Z","iopub.status.idle":"2024-12-24T10:42:08.666270Z","shell.execute_reply.started":"2024-12-24T10:42:08.643944Z","shell.execute_reply":"2024-12-24T10:42:08.664748Z"}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"# Load train data from a CSV file\ntrain_data = pd.read_csv('/kaggle/input/train-test-and-sample-submission/train.csv')\n\n# Display the first few rows of the dataframe\ntrain_data.head()","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2024-12-24T10:42:08.668894Z","iopub.execute_input":"2024-12-24T10:42:08.669224Z","iopub.status.idle":"2024-12-24T10:42:08.769661Z","shell.execute_reply.started":"2024-12-24T10:42:08.669194Z","shell.execute_reply":"2024-12-24T10:42:08.768495Z"}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"# shape of the train data\nprint(train_data.shape)","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2024-12-24T10:42:08.771432Z","iopub.execute_input":"2024-12-24T10:42:08.771834Z","iopub.status.idle":"2024-12-24T10:42:08.777787Z","shell.execute_reply.started":"2024-12-24T10:42:08.771803Z","shell.execute_reply":"2024-12-24T10:42:08.776551Z"}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"submission_data = pd.read_csv('/kaggle/input/train-test-and-sample-submission/sample_submission.csv')\nsubmission_data.head()","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2024-12-24T10:42:08.778963Z","iopub.execute_input":"2024-12-24T10:42:08.779364Z","iopub.status.idle":"2024-12-24T10:42:08.812816Z","shell.execute_reply.started":"2024-12-24T10:42:08.779326Z","shell.execute_reply":"2024-12-24T10:42:08.811837Z"}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"# Display the full train data in a scrollable format for 30 rows\nfrom IPython.display import display, HTML\ndisplay(HTML(train_data.head(20).to_html(escape=False)))","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2024-12-24T10:42:08.813803Z","iopub.execute_input":"2024-12-24T10:42:08.814135Z","iopub.status.idle":"2024-12-24T10:42:08.885892Z","shell.execute_reply.started":"2024-12-24T10:42:08.814105Z","shell.execute_reply":"2024-12-24T10:42:08.884571Z"}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"# all columns of train data\ntrain_data.columns","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2024-12-24T10:42:08.886911Z","iopub.execute_input":"2024-12-24T10:42:08.887248Z","iopub.status.idle":"2024-12-24T10:42:08.895703Z","shell.execute_reply.started":"2024-12-24T10:42:08.887221Z","shell.execute_reply":"2024-12-24T10:42:08.894543Z"}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"# finding duplicates\ntrain_data.duplicated().sum()","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2024-12-24T10:42:08.896742Z","iopub.execute_input":"2024-12-24T10:42:08.897082Z","iopub.status.idle":"2024-12-24T10:42:08.944604Z","shell.execute_reply.started":"2024-12-24T10:42:08.897051Z","shell.execute_reply":"2024-12-24T10:42:08.943558Z"}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"# full list of columns with missing values\ntrain_data.isnull().sum()[train_data.isnull().sum()>0]","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2024-12-24T10:42:08.945639Z","iopub.execute_input":"2024-12-24T10:42:08.945939Z","iopub.status.idle":"2024-12-24T10:42:08.965305Z","shell.execute_reply.started":"2024-12-24T10:42:08.945913Z","shell.execute_reply":"2024-12-24T10:42:08.963989Z"}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"# load test data from a CSV file\ntest_data = pd.read_csv('/kaggle/input/train-test-and-sample-submission/test.csv')\n\n# Display the first few rows of the dataframe\ntest_data.head()","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2024-12-24T10:42:08.966971Z","iopub.execute_input":"2024-12-24T10:42:08.967537Z","iopub.status.idle":"2024-12-24T10:42:09.004137Z","shell.execute_reply.started":"2024-12-24T10:42:08.967377Z","shell.execute_reply":"2024-12-24T10:42:09.003086Z"}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"# shape of the test data\nprint(test_data.shape)","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2024-12-24T10:42:09.005254Z","iopub.execute_input":"2024-12-24T10:42:09.005637Z","iopub.status.idle":"2024-12-24T10:42:09.010939Z","shell.execute_reply.started":"2024-12-24T10:42:09.005608Z","shell.execute_reply":"2024-12-24T10:42:09.009880Z"}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"# All columns in the test data\ntest_data.columns","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2024-12-24T10:42:09.015379Z","iopub.execute_input":"2024-12-24T10:42:09.015732Z","iopub.status.idle":"2024-12-24T10:42:09.033786Z","shell.execute_reply.started":"2024-12-24T10:42:09.015701Z","shell.execute_reply":"2024-12-24T10:42:09.032400Z"}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"# shape of the test data\ntest_data.shape","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2024-12-24T10:42:09.035900Z","iopub.execute_input":"2024-12-24T10:42:09.036271Z","iopub.status.idle":"2024-12-24T10:42:09.056151Z","shell.execute_reply.started":"2024-12-24T10:42:09.036241Z","shell.execute_reply":"2024-12-24T10:42:09.054920Z"}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"# finding duplicates in test data\ntest_data.duplicated().sum()","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2024-12-24T10:42:09.057244Z","iopub.execute_input":"2024-12-24T10:42:09.057717Z","iopub.status.idle":"2024-12-24T10:42:09.081826Z","shell.execute_reply.started":"2024-12-24T10:42:09.057685Z","shell.execute_reply":"2024-12-24T10:42:09.080633Z"}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"# missing values in 'id' column in the test data\ntest_data['id'].isnull().sum()","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2024-12-24T10:42:09.083061Z","iopub.execute_input":"2024-12-24T10:42:09.083436Z","iopub.status.idle":"2024-12-24T10:42:09.101875Z","shell.execute_reply.started":"2024-12-24T10:42:09.083398Z","shell.execute_reply":"2024-12-24T10:42:09.100805Z"}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"# total number of objects columns in the test data\ntest_data.select_dtypes(include='object').columns","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2024-12-24T10:42:09.103047Z","iopub.execute_input":"2024-12-24T10:42:09.103448Z","iopub.status.idle":"2024-12-24T10:42:09.122539Z","shell.execute_reply.started":"2024-12-24T10:42:09.103406Z","shell.execute_reply":"2024-12-24T10:42:09.121520Z"}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"# print missing values in Basic_Demos-Enroll_Season in train data\nprint(train_data['Basic_Demos-Enroll_Season'].isnull().sum())\n\n#category in Basic_Demos-Enroll_Season in train data\nprint(test_data['Basic_Demos-Enroll_Season'].value_counts())\n\n# label encoding of Basic_Demos-Enroll_Season in train data\nfrom sklearn.preprocessing import LabelEncoder\nle = LabelEncoder()\ntrain_data['Basic_Demos-Enroll_Season'] = le.fit_transform(train_data['Basic_Demos-Enroll_Season'])\ntrain_data['Basic_Demos-Enroll_Season'].value_counts()","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2024-12-24T10:42:09.123753Z","iopub.execute_input":"2024-12-24T10:42:09.124070Z","iopub.status.idle":"2024-12-24T10:42:09.155116Z","shell.execute_reply.started":"2024-12-24T10:42:09.124040Z","shell.execute_reply":"2024-12-24T10:42:09.153844Z"}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"# print missing values in Basic_Demos-Enroll_Season in test data\nprint(test_data['Basic_Demos-Enroll_Season'].isnull().sum())\n\n#category in Basic_Demos-Enroll_Season in test data\nprint(test_data['Basic_Demos-Enroll_Season'].value_counts())\n\n# label encoding of Basic_Demos-Enroll_Season in test data\ntest_data['Basic_Demos-Enroll_Season'] = le.fit_transform(test_data['Basic_Demos-Enroll_Season'])\ntest_data['Basic_Demos-Enroll_Season'].value_counts()\n","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2024-12-24T10:42:09.156250Z","iopub.execute_input":"2024-12-24T10:42:09.156715Z","iopub.status.idle":"2024-12-24T10:42:09.188641Z","shell.execute_reply.started":"2024-12-24T10:42:09.156670Z","shell.execute_reply":"2024-12-24T10:42:09.187514Z"}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"# missing values in Basic_Demos-Age in train data\nprint(train_data['Basic_Demos-Age'].isnull().sum())\n\n#skewness of Basic_Demos-Age in train data\nprint(train_data['Basic_Demos-Age'].skew())\n\n# describe the train data of Basic_Demos-Age\nprint(train_data['Basic_Demos-Age'].describe())\n\n# kde plot of Basic_Demos-Age in train data\nsns.kdeplot(train_data['Basic_Demos-Age'])\nplt.show()\n","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2024-12-24T10:42:09.189969Z","iopub.execute_input":"2024-12-24T10:42:09.190363Z","iopub.status.idle":"2024-12-24T10:42:09.517549Z","shell.execute_reply.started":"2024-12-24T10:42:09.190323Z","shell.execute_reply":"2024-12-24T10:42:09.516522Z"}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"# missing values in Basic_Demos-Age in test data\nprint(test_data['Basic_Demos-Age'].isnull().sum())\n\n#skewness of Basic_Demos-Age in test data\nprint(test_data['Basic_Demos-Age'].skew())\n\n# describe the test data of Basic_Demos-Age\nprint(test_data['Basic_Demos-Age'].describe())\n\n# kde plot of Basic_Demos-Age in test data\nsns.kdeplot(test_data['Basic_Demos-Age'])\nplt.show()","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2024-12-24T10:42:09.518571Z","iopub.execute_input":"2024-12-24T10:42:09.518945Z","iopub.status.idle":"2024-12-24T10:42:09.750595Z","shell.execute_reply.started":"2024-12-24T10:42:09.518916Z","shell.execute_reply":"2024-12-24T10:42:09.749315Z"}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"# print missing values in Basic_Demos-Sex in train data\nprint(train_data['Basic_Demos-Sex'].isnull().sum())\n\n#category in Basic_Demos-Sex in train data\nprint(train_data['Basic_Demos-Sex'].value_counts())","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2024-12-24T10:42:09.751736Z","iopub.execute_input":"2024-12-24T10:42:09.752035Z","iopub.status.idle":"2024-12-24T10:42:09.760201Z","shell.execute_reply.started":"2024-12-24T10:42:09.751994Z","shell.execute_reply":"2024-12-24T10:42:09.758986Z"}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"# print missing values in Basic_Demos-Sex in test data\nprint(test_data['Basic_Demos-Sex'].isnull().sum())\n\n#category in Basic_Demos-Sex in test data\nprint(test_data['Basic_Demos-Sex'].value_counts())","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2024-12-24T10:42:09.761167Z","iopub.execute_input":"2024-12-24T10:42:09.761542Z","iopub.status.idle":"2024-12-24T10:42:09.783006Z","shell.execute_reply.started":"2024-12-24T10:42:09.761507Z","shell.execute_reply":"2024-12-24T10:42:09.781256Z"}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"# print missing values in CGAS-Season in train data\nprint(train_data['CGAS-Season'].isnull().sum())\n\n#category in CGAS-Season in train data\nprint(train_data['CGAS-Season'].value_counts())\n\n# Fill n/a in 'CGAS-Season' with 'Missing' in train_data\ntrain_data['CGAS-Season'].fillna('Missing', inplace=True)\nprint(train_data['CGAS-Season'].value_counts())\n\n# label encoding of CGAS-Season in train data\n\ntrain_data['CGAS-Season'] = le.fit_transform(train_data['CGAS-Season'])\ntrain_data['CGAS-Season'].value_counts()","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2024-12-24T10:42:09.784141Z","iopub.execute_input":"2024-12-24T10:42:09.784502Z","iopub.status.idle":"2024-12-24T10:42:09.813038Z","shell.execute_reply.started":"2024-12-24T10:42:09.784436Z","shell.execute_reply":"2024-12-24T10:42:09.811910Z"}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"# print missing values in CGAS-Season in test data\nprint(test_data['CGAS-Season'].isnull().sum())\n\n#category in CGAS-Season in test data\nprint(test_data['CGAS-Season'].value_counts())\n\n# Fill n/a in 'CGAS-Season' with 'Missing' in test_data\ntest_data['CGAS-Season'].fillna('Missing', inplace=True)\nprint(test_data['CGAS-Season'].value_counts())\n\n# label encoding of CGAS-Season in test data\ntest_data['CGAS-Season'] = le.fit_transform(test_data['CGAS-Season'])\ntest_data['CGAS-Season'].value_counts()\n","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2024-12-24T10:42:09.813986Z","iopub.execute_input":"2024-12-24T10:42:09.814321Z","iopub.status.idle":"2024-12-24T10:42:09.839335Z","shell.execute_reply.started":"2024-12-24T10:42:09.814295Z","shell.execute_reply":"2024-12-24T10:42:09.838170Z"}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"# missing values in CGAS-CGAS_Score in train data\nprint(train_data['CGAS-CGAS_Score'].isnull().sum())\n\n#skewness of CGAS-CGAS_Score in train data\nprint(train_data['CGAS-CGAS_Score'].skew())\n\n#median of CGAS-CGAS_Score in train data\nprint(train_data['CGAS-CGAS_Score'].median())\n\n# mode of CGAS-CGAS_Score in train data\nprint(train_data['CGAS-CGAS_Score'].mode())\n\n# describe the data of CGAS-CGAS_Score\nprint(train_data['CGAS-CGAS_Score'].describe())\n\n# kde plot of CGAS-CGAS_Score in train data\nsns.kdeplot(train_data['CGAS-CGAS_Score'])\nplt.show()","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2024-12-24T10:42:09.840590Z","iopub.execute_input":"2024-12-24T10:42:09.840919Z","iopub.status.idle":"2024-12-24T10:42:10.174382Z","shell.execute_reply.started":"2024-12-24T10:42:09.840880Z","shell.execute_reply":"2024-12-24T10:42:10.173067Z"}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"# fill missing values in CGAS-CGAS_Score in train data\ntrain_data['CGAS-CGAS_Score'].fillna(train_data['CGAS-CGAS_Score'].median(), inplace=True)","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2024-12-24T10:42:10.175583Z","iopub.execute_input":"2024-12-24T10:42:10.175887Z","iopub.status.idle":"2024-12-24T10:42:10.182796Z","shell.execute_reply.started":"2024-12-24T10:42:10.175860Z","shell.execute_reply":"2024-12-24T10:42:10.181646Z"}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"# missing values in CGAS-CGAS_Score in test data\nprint(test_data['CGAS-CGAS_Score'].isnull().sum())\n\n\n#skewness of CGAS-CGAS_Score in test data\nprint(test_data['CGAS-CGAS_Score'].skew())\n\n#median of CGAS-CGAS_Score in test data\nprint(test_data['CGAS-CGAS_Score'].median())\n\n# mode of CGAS-CGAS_Score in test data\nprint(test_data['CGAS-CGAS_Score'].mode())\n\n\n# describe the data of CGAS-CGAS_Score\nprint(test_data['CGAS-CGAS_Score'].describe())\n\n# kde plot of CGAS-CGAS_Score in test data\nsns.kdeplot(test_data['CGAS-CGAS_Score'])\nplt.show()\n\n","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2024-12-24T10:42:10.184020Z","iopub.execute_input":"2024-12-24T10:42:10.184597Z","iopub.status.idle":"2024-12-24T10:42:10.418702Z","shell.execute_reply.started":"2024-12-24T10:42:10.184561Z","shell.execute_reply":"2024-12-24T10:42:10.417580Z"}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"# fill missing values in CGAS-CGAS_Score in test data\ntest_data['CGAS-CGAS_Score'].fillna(test_data['CGAS-CGAS_Score'].median(), inplace=True)","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2024-12-24T10:42:10.419899Z","iopub.execute_input":"2024-12-24T10:42:10.420179Z","iopub.status.idle":"2024-12-24T10:42:10.426169Z","shell.execute_reply.started":"2024-12-24T10:42:10.420157Z","shell.execute_reply":"2024-12-24T10:42:10.425128Z"}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"# print missing values in Physical-Season in train data\nprint(train_data['Physical-Season'].isnull().sum())\n\n#category in Physical-Season in train data\nprint(train_data['Physical-Season'].value_counts())\n\n# Fill n/a in 'Physical-Season' with 'Missing' in train_data\ntrain_data['Physical-Season'].fillna('Missing', inplace=True)\nprint(train_data['Physical-Season'].value_counts())\n\n# label encoding of CGAS-Season in train data\n\ntrain_data['Physical-Season'] = le.fit_transform(train_data['Physical-Season'])\ntrain_data['Physical-Season'].value_counts()","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2024-12-24T10:42:10.427413Z","iopub.execute_input":"2024-12-24T10:42:10.427881Z","iopub.status.idle":"2024-12-24T10:42:10.453058Z","shell.execute_reply.started":"2024-12-24T10:42:10.427853Z","shell.execute_reply":"2024-12-24T10:42:10.451818Z"}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"# print missing values in Physical-Season in test data\nprint(test_data['Physical-Season'].isnull().sum())\n\n#category in Physical-Season in test data\nprint(test_data['Physical-Season'].value_counts())\n\n# Fill n/a in 'Physical-Season' with 'Missing' in test_data\ntest_data['Physical-Season'].fillna('Missing', inplace=True)\nprint(test_data['Physical-Season'].value_counts())\n\n# label encoding of CGAS-Season in train data\n\ntest_data['Physical-Season'] = le.fit_transform(test_data['Physical-Season'])\ntest_data['Physical-Season'].value_counts()","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2024-12-24T10:42:10.454340Z","iopub.execute_input":"2024-12-24T10:42:10.454947Z","iopub.status.idle":"2024-12-24T10:42:10.477441Z","shell.execute_reply.started":"2024-12-24T10:42:10.454887Z","shell.execute_reply":"2024-12-24T10:42:10.476349Z"}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"# missing values in Physical-BMI in train data\nprint(train_data['Physical-BMI'].isnull().sum())\n\n\n#skewness of Physical-BMI in train data\nprint(train_data['Physical-BMI'].skew())\n\n#median of Physical-BMI in train data\nprint(train_data['Physical-BMI'].median())\n\n# mode of Physical-BMI in train data\nprint(train_data['Physical-BMI'].mode())\n\n\n# describe the data of Physical-BMI\nprint(train_data['Physical-BMI'].describe())\n\n# kde plot of Physical-BMI in train data\nsns.kdeplot(train_data['Physical-BMI'])\nplt.show()","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2024-12-24T10:42:10.478514Z","iopub.execute_input":"2024-12-24T10:42:10.478862Z","iopub.status.idle":"2024-12-24T10:42:10.742854Z","shell.execute_reply.started":"2024-12-24T10:42:10.478834Z","shell.execute_reply":"2024-12-24T10:42:10.741774Z"}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"# fill the missing values in Physical-BMI in train_data with median\ntrain_data['Physical-BMI'].fillna(train_data['Physical-BMI'].median(), inplace=True)","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2024-12-24T10:42:10.743908Z","iopub.execute_input":"2024-12-24T10:42:10.744194Z","iopub.status.idle":"2024-12-24T10:42:10.750549Z","shell.execute_reply.started":"2024-12-24T10:42:10.744169Z","shell.execute_reply":"2024-12-24T10:42:10.749203Z"}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"# missing values in Physical-BMI in test data\nprint(test_data['Physical-BMI'].isnull().sum())\n\n#skewness of Physical-BMI in test data\nprint(test_data['Physical-BMI'].skew())\n\n#median of Physical-BMI in test data\nprint(test_data['Physical-BMI'].median())\n\n# mode of Physical-BMI in test data\nprint(test_data['Physical-BMI'].mode())\n\n# describe the data of Physical-BMI\nprint(test_data['Physical-BMI'].describe())\n\n# kde plot of Physical-BMI in test data\nsns.kdeplot(test_data['Physical-BMI'])\nplt.show()","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2024-12-24T10:42:10.751613Z","iopub.execute_input":"2024-12-24T10:42:10.752002Z","iopub.status.idle":"2024-12-24T10:42:10.973146Z","shell.execute_reply.started":"2024-12-24T10:42:10.751974Z","shell.execute_reply":"2024-12-24T10:42:10.971790Z"}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"# fill the missing values in Physical-BMI in test_data with median\ntest_data['Physical-BMI'].fillna(test_data['Physical-BMI'].median(), inplace=True)\n","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2024-12-24T10:42:10.974555Z","iopub.execute_input":"2024-12-24T10:42:10.974971Z","iopub.status.idle":"2024-12-24T10:42:10.980847Z","shell.execute_reply.started":"2024-12-24T10:42:10.974929Z","shell.execute_reply":"2024-12-24T10:42:10.979765Z"}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"# missing values in Physical-Height in train data\nprint(train_data['Physical-Height'].isnull().sum())\n\n#skewness of Physical-Height in train data\nprint(train_data['Physical-Height'].skew())\n\n#median of Physical-Height in train data\nprint(train_data['Physical-Height'].median())\n\n# mode of Physical-Height in train data\nprint(train_data['Physical-Height'].mode())\n\n# describe the data of Physical-Height\nprint(train_data['Physical-Height'].describe())\n\n# kde plot of Physical-Height in train data\nsns.kdeplot(train_data['Physical-Height'])\nplt.show()","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2024-12-24T10:42:10.982091Z","iopub.execute_input":"2024-12-24T10:42:10.982597Z","iopub.status.idle":"2024-12-24T10:42:11.263674Z","shell.execute_reply.started":"2024-12-24T10:42:10.982554Z","shell.execute_reply":"2024-12-24T10:42:11.262403Z"}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"# fill the missing values in Physical-Height in train_data with median\ntrain_data['Physical-Height'].fillna(train_data['Physical-Height'].median(), inplace=True)\n","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2024-12-24T10:42:11.264591Z","iopub.execute_input":"2024-12-24T10:42:11.264968Z","iopub.status.idle":"2024-12-24T10:42:11.271367Z","shell.execute_reply.started":"2024-12-24T10:42:11.264927Z","shell.execute_reply":"2024-12-24T10:42:11.270369Z"}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"# missing values in Physical-Height in test data\nprint(test_data['Physical-Height'].isnull().sum())\n\n#skewness of Physical-Height in test data\nprint(test_data['Physical-Height'].skew())\n\n#median of Physical-Height in train data\nprint(test_data['Physical-Height'].median())\n\n# mode of Physical-Height in test data\nprint(test_data['Physical-Height'].mode())\n\n# describe the data of Physical-Height\nprint(test_data['Physical-Height'].describe())\n\n# kde plot of Physical-Height in test data\nsns.kdeplot(test_data['Physical-Height'])\nplt.show()","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2024-12-24T10:42:11.272595Z","iopub.execute_input":"2024-12-24T10:42:11.272984Z","iopub.status.idle":"2024-12-24T10:42:11.522138Z","shell.execute_reply.started":"2024-12-24T10:42:11.272946Z","shell.execute_reply":"2024-12-24T10:42:11.521088Z"}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"# fill the missing values in Physical-Height in test_data with median\ntest_data['Physical-Height'].fillna(test_data['Physical-Height'].median(), inplace=True)","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2024-12-24T10:42:11.523194Z","iopub.execute_input":"2024-12-24T10:42:11.523547Z","iopub.status.idle":"2024-12-24T10:42:11.529118Z","shell.execute_reply.started":"2024-12-24T10:42:11.523512Z","shell.execute_reply":"2024-12-24T10:42:11.528103Z"}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"# missing values in Physical-Weight in train data\nprint(train_data['Physical-Weight'].isnull().sum())\n\n#skewness of Physical-Weight in train data\nprint(train_data['Physical-Weight'].skew())\n\n#median of Physical-Weight in train data\nprint(train_data['Physical-Weight'].median())\n\n# mode of Physical-Weight in train data\nprint(train_data['Physical-Weight'].mode())\n\n# describe the data of Physical-Weight\nprint(train_data['Physical-Weight'].describe())\n\n# kde plot of Physical-Weight in train data\nsns.kdeplot(train_data['Physical-Weight'])\nplt.show()","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2024-12-24T10:42:11.540097Z","iopub.execute_input":"2024-12-24T10:42:11.540438Z","iopub.status.idle":"2024-12-24T10:42:11.823981Z","shell.execute_reply.started":"2024-12-24T10:42:11.540407Z","shell.execute_reply":"2024-12-24T10:42:11.822878Z"}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"# fill the missing values in Physical-weight in train_data with median\ntrain_data['Physical-Weight'].fillna(train_data['Physical-Weight'].median(), inplace=True)","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2024-12-24T10:42:11.827615Z","iopub.execute_input":"2024-12-24T10:42:11.827924Z","iopub.status.idle":"2024-12-24T10:42:11.834754Z","shell.execute_reply.started":"2024-12-24T10:42:11.827900Z","shell.execute_reply":"2024-12-24T10:42:11.833514Z"}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"# missing values, skewness, median, mode, describe, kde of Physical-Weight in test data\nprint(test_data['Physical-Weight'].isnull().sum())\nprint(test_data['Physical-Weight'].skew())\nprint(test_data['Physical-Weight'].median())\nprint(test_data['Physical-Weight'].mode())\nprint(test_data['Physical-Weight'].describe())\nsns.kdeplot(test_data['Physical-Weight'])\nplt.show()","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2024-12-24T10:42:11.835843Z","iopub.execute_input":"2024-12-24T10:42:11.836224Z","iopub.status.idle":"2024-12-24T10:42:12.125277Z","shell.execute_reply.started":"2024-12-24T10:42:11.836194Z","shell.execute_reply":"2024-12-24T10:42:12.124323Z"}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"# fill the missing values in Physical-Weight in test_data with median\ntest_data['Physical-Weight'].fillna(test_data['Physical-Weight'].median(), inplace=True)","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2024-12-24T10:42:12.126235Z","iopub.execute_input":"2024-12-24T10:42:12.126645Z","iopub.status.idle":"2024-12-24T10:42:12.132681Z","shell.execute_reply.started":"2024-12-24T10:42:12.126604Z","shell.execute_reply":"2024-12-24T10:42:12.131621Z"}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"# missing values in Physical-Waist_Circumference in train data\nprint(train_data['Physical-Waist_Circumference'].isnull().sum())\n\n#skewness of Physical-Waist_Circumference in train data\nprint(train_data['Physical-Waist_Circumference'].skew())\n\n#median of Physical-Waist_Circumference in train data\nprint(train_data['Physical-Waist_Circumference'].median())\n\n# mode of Physical-Waist_Circumference in train data\nprint(train_data['Physical-Waist_Circumference'].mode())\n\n# describe the data of Physical-Waist_Circumference\nprint(train_data['Physical-Waist_Circumference'].describe())\n\n# kde plot of Physical-Waist_Circumference in train data\nsns.kdeplot(train_data['Physical-Waist_Circumference'])\nplt.show()","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2024-12-24T10:42:12.133860Z","iopub.execute_input":"2024-12-24T10:42:12.134142Z","iopub.status.idle":"2024-12-24T10:42:12.419715Z","shell.execute_reply.started":"2024-12-24T10:42:12.134116Z","shell.execute_reply":"2024-12-24T10:42:12.418583Z"}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"# fill the missing values in Physical-Waist_Circumference in train_data with median\ntrain_data['Physical-Waist_Circumference'].fillna(train_data['Physical-Waist_Circumference'].median(), inplace=True)","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2024-12-24T10:42:12.420901Z","iopub.execute_input":"2024-12-24T10:42:12.421227Z","iopub.status.idle":"2024-12-24T10:42:12.427652Z","shell.execute_reply.started":"2024-12-24T10:42:12.421200Z","shell.execute_reply":"2024-12-24T10:42:12.426462Z"}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"# missing values in Physical-Waist_Circumference in test data\nprint(test_data['Physical-Waist_Circumference'].isnull().sum())\n\n#skewness of Physical-Waist_Circumference in test data\nprint(test_data['Physical-Waist_Circumference'].skew())\n\n#median of Physical-Waist_Circumference in test data\nprint(test_data['Physical-Waist_Circumference'].median())\n\n# mode of Physical-Waist_Circumference in test data\nprint(test_data['Physical-Waist_Circumference'].mode())\n\n# describe the data of Physical-Waist_Circumference\nprint(test_data['Physical-Waist_Circumference'].describe())\n\n# kde plot of Physical-Waist_Circumference in test data\nsns.kdeplot(test_data['Physical-Waist_Circumference'])\nplt.show()","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2024-12-24T10:42:12.428614Z","iopub.execute_input":"2024-12-24T10:42:12.428939Z","iopub.status.idle":"2024-12-24T10:42:12.646101Z","shell.execute_reply.started":"2024-12-24T10:42:12.428912Z","shell.execute_reply":"2024-12-24T10:42:12.645100Z"}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"# fill the missing values in Physical-Waist_Circumference in test_data with median\ntest_data['Physical-Waist_Circumference'].fillna(test_data['Physical-Waist_Circumference'].median(), inplace=True)","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2024-12-24T10:42:12.647192Z","iopub.execute_input":"2024-12-24T10:42:12.647548Z","iopub.status.idle":"2024-12-24T10:42:12.653344Z","shell.execute_reply.started":"2024-12-24T10:42:12.647514Z","shell.execute_reply":"2024-12-24T10:42:12.652384Z"}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"# missing values in Physical-Diastolic_BP in train data\nprint(train_data['Physical-Diastolic_BP'].isnull().sum())\n\n#skewness of Physical-Diastolic_BP in train data\nprint(train_data['Physical-Diastolic_BP'].skew())\n\n#median of Physical-Diastolic_BP in train data\nprint(train_data['Physical-Diastolic_BP'].median())\n\n# mode of Physical-Diastolic_BP in train data\nprint(train_data['Physical-Diastolic_BP'].mode())\n\n# describe the data of Physical-Diastolic_BP\nprint(train_data['Physical-Diastolic_BP'].describe())\n\n# kde plot of Physical-Diastolic_BP in train data\nsns.kdeplot(train_data['Physical-Diastolic_BP'])\nplt.show()","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2024-12-24T10:42:12.654587Z","iopub.execute_input":"2024-12-24T10:42:12.654970Z","iopub.status.idle":"2024-12-24T10:42:13.043547Z","shell.execute_reply.started":"2024-12-24T10:42:12.654933Z","shell.execute_reply":"2024-12-24T10:42:13.042396Z"}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"# fill the missing values in Physical-Diastolic_BP in train_data with median\ntrain_data['Physical-Diastolic_BP'].fillna(train_data['Physical-Diastolic_BP'].median(), inplace=True)","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2024-12-24T10:42:13.044676Z","iopub.execute_input":"2024-12-24T10:42:13.045076Z","iopub.status.idle":"2024-12-24T10:42:13.051811Z","shell.execute_reply.started":"2024-12-24T10:42:13.045038Z","shell.execute_reply":"2024-12-24T10:42:13.050576Z"}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"# missing values in Physical-Diastolic_BP in test data\nprint(test_data['Physical-Diastolic_BP'].isnull().sum())\n\n#skewness of Physical-Diastolic_BP in test data\nprint(test_data['Physical-Diastolic_BP'].skew())\n\n#median of Physical-Diastolic_BP in test data\nprint(test_data['Physical-Diastolic_BP'].median())\n\n# mode of Physical-Diastolic_BP in test data\nprint(test_data['Physical-Diastolic_BP'].mode())\n\n# describe the data of Physical-Diastolic_BP\nprint(test_data['Physical-Diastolic_BP'].describe())\n\n# kde plot of Physical-Diastolic_BP in test data\nsns.kdeplot(test_data['Physical-Diastolic_BP'])\nplt.show()","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2024-12-24T10:42:13.052794Z","iopub.execute_input":"2024-12-24T10:42:13.053064Z","iopub.status.idle":"2024-12-24T10:42:13.311373Z","shell.execute_reply.started":"2024-12-24T10:42:13.053041Z","shell.execute_reply":"2024-12-24T10:42:13.310295Z"}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"# fill the missing values in Physical-Diastolic_BP in test_data with median\ntest_data['Physical-Diastolic_BP'].fillna(test_data['Physical-Diastolic_BP'].median(), inplace=True)","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2024-12-24T10:42:13.312275Z","iopub.execute_input":"2024-12-24T10:42:13.312666Z","iopub.status.idle":"2024-12-24T10:42:13.317930Z","shell.execute_reply.started":"2024-12-24T10:42:13.312639Z","shell.execute_reply":"2024-12-24T10:42:13.316903Z"}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"# missing values in Physical-HeartRate in train data\nprint(train_data['Physical-HeartRate'].isnull().sum())\n\n#skewness of Physical-HeartRate in train data\nprint(train_data['Physical-HeartRate'].skew())\n\n#median of Physical-HeartRate in train data\nprint(train_data['Physical-HeartRate'].median())\n\n# mode of Physical-HeartRate in train data\nprint(train_data['Physical-HeartRate'].mode())\n\n# describe the data of Physical-HeartRate\nprint(train_data['Physical-HeartRate'].describe())\n\n# kde plot of Physical-HeartRate in train data\nsns.kdeplot(train_data['Physical-HeartRate'])\nplt.show()","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2024-12-24T10:42:13.319038Z","iopub.execute_input":"2024-12-24T10:42:13.319696Z","iopub.status.idle":"2024-12-24T10:42:13.562819Z","shell.execute_reply.started":"2024-12-24T10:42:13.319653Z","shell.execute_reply":"2024-12-24T10:42:13.561685Z"}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"# fill the missing values in Physical-HeartRate in train_data with median\ntrain_data['Physical-HeartRate'].fillna(train_data['Physical-HeartRate'].median(), inplace=True)","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2024-12-24T10:42:13.563836Z","iopub.execute_input":"2024-12-24T10:42:13.564169Z","iopub.status.idle":"2024-12-24T10:42:13.570094Z","shell.execute_reply.started":"2024-12-24T10:42:13.564129Z","shell.execute_reply":"2024-12-24T10:42:13.569157Z"}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"# missing values in Physical-HeartRate in test data\nprint(test_data['Physical-HeartRate'].isnull().sum())\n\n#skewness of Physical-HeartRate in test data\nprint(test_data['Physical-HeartRate'].skew())\n\n#median of Physical-HeartRate in test data\nprint(test_data['Physical-HeartRate'].median())\n\n# mode of Physical-HeartRate in test data\nprint(test_data['Physical-HeartRate'].mode())\n\n# describe the data of Physical-HeartRate\nprint(test_data['Physical-HeartRate'].describe())\n\n# kde plot of Physical-HeartRate in test data\nsns.kdeplot(test_data['Physical-HeartRate'])\nplt.show()","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2024-12-24T10:42:13.570967Z","iopub.execute_input":"2024-12-24T10:42:13.571236Z","iopub.status.idle":"2024-12-24T10:42:13.833263Z","shell.execute_reply.started":"2024-12-24T10:42:13.571212Z","shell.execute_reply":"2024-12-24T10:42:13.831819Z"}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"# fill the missing values in Physical-HeartRate in test_data with median\ntest_data['Physical-HeartRate'].fillna(test_data['Physical-HeartRate'].median(), inplace=True)","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2024-12-24T10:42:13.834451Z","iopub.execute_input":"2024-12-24T10:42:13.834818Z","iopub.status.idle":"2024-12-24T10:42:13.841036Z","shell.execute_reply.started":"2024-12-24T10:42:13.834790Z","shell.execute_reply":"2024-12-24T10:42:13.839597Z"}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"# missing values in Physical-Systolic_BP in train data\nprint(train_data['Physical-Systolic_BP'].isnull().sum())\n\n#skewness of Physical-Systolic_BP in train data\nprint(train_data['Physical-Systolic_BP'].skew())\n\n#median of Physical-Systolic_BP in train data\nprint(train_data['Physical-Systolic_BP'].median())\n\n# mode of Physical-Systolic_BP in train data\nprint(train_data['Physical-Systolic_BP'].mode())\n\n# describe the data of Physical-Systolic_BP\nprint(train_data['Physical-Systolic_BP'].describe())\n\n# kde plot of Physical-Systolic_BP in train data\nsns.kdeplot(train_data['Physical-Systolic_BP'])\nplt.show()","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2024-12-24T10:42:13.842073Z","iopub.execute_input":"2024-12-24T10:42:13.842593Z","iopub.status.idle":"2024-12-24T10:42:14.103132Z","shell.execute_reply.started":"2024-12-24T10:42:13.842550Z","shell.execute_reply":"2024-12-24T10:42:14.101961Z"}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"# fill the missing values in Physical-Systolic_BP in train_data with median\ntrain_data['Physical-Systolic_BP'].fillna(train_data['Physical-Systolic_BP'].median(), inplace=True)","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2024-12-24T10:42:14.104241Z","iopub.execute_input":"2024-12-24T10:42:14.104655Z","iopub.status.idle":"2024-12-24T10:42:14.111229Z","shell.execute_reply.started":"2024-12-24T10:42:14.104615Z","shell.execute_reply":"2024-12-24T10:42:14.110208Z"}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"# missing values in Physical-Systolic_BP in test data\nprint(test_data['Physical-Systolic_BP'].isnull().sum())\n\n#skewness of Physical-Systolic_BP in test data\nprint(test_data['Physical-Systolic_BP'].skew())\n\n#median of Physical-Systolic_BP in test data\nprint(test_data['Physical-Systolic_BP'].median())\n\n# mode of Physical-Systolic_BP in test data\nprint(test_data['Physical-Systolic_BP'].mode())\n\n# describe the data of Physical-Systolic_BP\nprint(test_data['Physical-Systolic_BP'].describe())\n\n# kde plot of Physical-Systolic_BP in test data\nsns.kdeplot(test_data['Physical-Systolic_BP'])\nplt.show()","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2024-12-24T10:42:14.112137Z","iopub.execute_input":"2024-12-24T10:42:14.112439Z","iopub.status.idle":"2024-12-24T10:42:14.369503Z","shell.execute_reply.started":"2024-12-24T10:42:14.112412Z","shell.execute_reply":"2024-12-24T10:42:14.368494Z"}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"# fill the missing values in Physical-Systolic_BP in test_data with median\ntest_data['Physical-Systolic_BP'].fillna(test_data['Physical-Systolic_BP'].median(), inplace=True)  ","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2024-12-24T10:42:14.370391Z","iopub.execute_input":"2024-12-24T10:42:14.370700Z","iopub.status.idle":"2024-12-24T10:42:14.375996Z","shell.execute_reply.started":"2024-12-24T10:42:14.370665Z","shell.execute_reply":"2024-12-24T10:42:14.374948Z"}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"# missing values in Fitness_Endurance-Season in train data\nprint(train_data['Fitness_Endurance-Season'].isnull().sum())\n\n#category in Fitness_Endurance-Season in train data\nprint(train_data['Fitness_Endurance-Season'].value_counts())\n\n# Fill n/a in 'Fitness_Endurance-Season' with 'Missing' in train_data\ntrain_data['Fitness_Endurance-Season'].fillna('Missing', inplace=True)\nprint(train_data['Fitness_Endurance-Season'].value_counts())\n\n# label encoding of Fitness_Endurance-Season in train data\ntrain_data['Fitness_Endurance-Season'] = le.fit_transform(train_data['Fitness_Endurance-Season'])\ntrain_data['Fitness_Endurance-Season'].value_counts()","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2024-12-24T10:42:14.377044Z","iopub.execute_input":"2024-12-24T10:42:14.377329Z","iopub.status.idle":"2024-12-24T10:42:14.403333Z","shell.execute_reply.started":"2024-12-24T10:42:14.377290Z","shell.execute_reply":"2024-12-24T10:42:14.402353Z"}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"# missing values in Fitness_Endurance-Season in test data\nprint(test_data['Fitness_Endurance-Season'].isnull().sum())\n\n#category in Fitness_Endurance-Season in test data\nprint(test_data['Fitness_Endurance-Season'].value_counts())\n\n# Fill n/a in 'Fitness_Endurance-Season' with 'Missing' in test_data\ntest_data['Fitness_Endurance-Season'].fillna('Missing', inplace=True)\nprint(test_data['Fitness_Endurance-Season'].value_counts())\n\n# label encoding of Fitness_Endurance-Season in test data\ntest_data['Fitness_Endurance-Season'] = le.fit_transform(test_data['Fitness_Endurance-Season'])\ntest_data['Fitness_Endurance-Season'].value_counts()","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2024-12-24T10:42:14.404643Z","iopub.execute_input":"2024-12-24T10:42:14.405051Z","iopub.status.idle":"2024-12-24T10:42:14.434883Z","shell.execute_reply.started":"2024-12-24T10:42:14.405011Z","shell.execute_reply":"2024-12-24T10:42:14.433831Z"}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"# missing values in Fitness_Endurance-Max_Stage in train data\nprint(train_data['Fitness_Endurance-Max_Stage'].isnull().sum())\n\n#skewness of Fitness_Endurance-Max_Stage in train data\nprint(train_data['Fitness_Endurance-Max_Stage'].skew())\n\n#median of Fitness_Endurance-Max_Stage in train data\nprint(train_data['Fitness_Endurance-Max_Stage'].median())\n\n# mode of Fitness_Endurance-Max_Stage in train data\nprint(train_data['Fitness_Endurance-Max_Stage'].mode())\n\n# describe the data of Fitness_Endurance-Max_Stage\nprint(train_data['Fitness_Endurance-Max_Stage'].describe())\n\n# kde plot of Fitness_Endurance-Max_Stage in train data\nsns.kdeplot(train_data['Fitness_Endurance-Max_Stage'])\nplt.show()","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2024-12-24T10:42:14.436021Z","iopub.execute_input":"2024-12-24T10:42:14.436325Z","iopub.status.idle":"2024-12-24T10:42:14.696713Z","shell.execute_reply.started":"2024-12-24T10:42:14.436298Z","shell.execute_reply":"2024-12-24T10:42:14.695583Z"}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"# fill the missing values in Fitness_Endurance-Max_Stage in train_data with median\ntrain_data['Fitness_Endurance-Max_Stage'].fillna(train_data['Fitness_Endurance-Max_Stage'].median(), inplace=True)","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2024-12-24T10:42:14.697755Z","iopub.execute_input":"2024-12-24T10:42:14.698086Z","iopub.status.idle":"2024-12-24T10:42:14.703947Z","shell.execute_reply.started":"2024-12-24T10:42:14.698058Z","shell.execute_reply":"2024-12-24T10:42:14.702904Z"}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"# missing values in Fitness_Endurance-Max_Stage in test data\nprint(test_data['Fitness_Endurance-Max_Stage'].isnull().sum())\n\n#skewness of Fitness_Endurance-Max_Stage in test data\nprint(test_data['Fitness_Endurance-Max_Stage'].skew())\n\n#median of Fitness_Endurance-Max_Stage in test data\nprint(test_data['Fitness_Endurance-Max_Stage'].median())\n\n# mode of Fitness_Endurance-Max_Stage in test data\nprint(test_data['Fitness_Endurance-Max_Stage'].mode())\n\n# describe the data of Fitness_Endurance-Max_Stage\nprint(test_data['Fitness_Endurance-Max_Stage'].describe())\n\n# kde plot of Fitness_Endurance-Max_Stage in test data\nsns.kdeplot(test_data['Fitness_Endurance-Max_Stage'])\nplt.show()","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2024-12-24T10:42:14.705294Z","iopub.execute_input":"2024-12-24T10:42:14.705739Z","iopub.status.idle":"2024-12-24T10:42:14.967351Z","shell.execute_reply.started":"2024-12-24T10:42:14.705686Z","shell.execute_reply":"2024-12-24T10:42:14.966249Z"}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"# fill the missing values in Fitness_Endurance-Max_Stage in test_data with median\ntest_data['Fitness_Endurance-Max_Stage'].fillna(test_data['Fitness_Endurance-Max_Stage'].median(), inplace=True)","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2024-12-24T10:42:14.968633Z","iopub.execute_input":"2024-12-24T10:42:14.968912Z","iopub.status.idle":"2024-12-24T10:42:14.975080Z","shell.execute_reply.started":"2024-12-24T10:42:14.968887Z","shell.execute_reply":"2024-12-24T10:42:14.974185Z"}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"# missing values in Fitness_Endurance-Time_Mins in train data\nprint(train_data['Fitness_Endurance-Time_Mins'].isnull().sum())\n\n#skewness of Fitness_Endurance-Time_Mins in train data\nprint(train_data['Fitness_Endurance-Time_Mins'].skew())\n\n#median of Fitness_Endurance-Time_Mins in train data\nprint(train_data['Fitness_Endurance-Time_Mins'].median())\n\n# mode of Fitness_Endurance-Time_Mins in train data\nprint(train_data['Fitness_Endurance-Time_Mins'].mode())\n\n# describe the data of Fitness_Endurance-Time_Mins\nprint(train_data['Fitness_Endurance-Time_Mins'].describe())\n\n# kde plot of Fitness_Endurance-Time_Mins in train data\nsns.kdeplot(train_data['Fitness_Endurance-Time_Mins'])\nplt.show()","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2024-12-24T10:42:14.976193Z","iopub.execute_input":"2024-12-24T10:42:14.976610Z","iopub.status.idle":"2024-12-24T10:42:15.221294Z","shell.execute_reply.started":"2024-12-24T10:42:14.976570Z","shell.execute_reply":"2024-12-24T10:42:15.220382Z"}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"# fill the missing values in Fitness_Endurance-Time_Mins in train_data with median\ntrain_data['Fitness_Endurance-Time_Mins'].fillna(train_data['Fitness_Endurance-Time_Mins'].median(), inplace=True)","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2024-12-24T10:42:15.222352Z","iopub.execute_input":"2024-12-24T10:42:15.222763Z","iopub.status.idle":"2024-12-24T10:42:15.228872Z","shell.execute_reply.started":"2024-12-24T10:42:15.222723Z","shell.execute_reply":"2024-12-24T10:42:15.227843Z"}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"# missing values in Fitness_Endurance-Time_Mins in test data\nprint(test_data['Fitness_Endurance-Time_Mins'].isnull().sum())\n\n#skewness of Fitness_Endurance-Time_Mins in test data\nprint(test_data['Fitness_Endurance-Time_Mins'].skew())\n\n#median of Fitness_Endurance-Time_Mins in test data\nprint(test_data['Fitness_Endurance-Time_Mins'].median())\n\n# mode of Fitness_Endurance-Time_Mins in test data\nprint(test_data['Fitness_Endurance-Time_Mins'].mode())\n\n# describe the data of Fitness_Endurance-Time_Mins\nprint(test_data['Fitness_Endurance-Time_Mins'].describe())\n\n#kde plot of Fitness_Endurance-Time_Mins in test data\nsns.kdeplot(test_data['Fitness_Endurance-Time_Mins'])\nplt.show()","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2024-12-24T10:42:15.229812Z","iopub.execute_input":"2024-12-24T10:42:15.230052Z","iopub.status.idle":"2024-12-24T10:42:15.491703Z","shell.execute_reply.started":"2024-12-24T10:42:15.230031Z","shell.execute_reply":"2024-12-24T10:42:15.490502Z"}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"# fill the missing values in Fitness_Endurance-Time_Mins in test_data with median\ntest_data['Fitness_Endurance-Time_Mins'].fillna(test_data['Fitness_Endurance-Time_Mins'].median(), inplace=True)","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2024-12-24T10:42:15.492849Z","iopub.execute_input":"2024-12-24T10:42:15.493172Z","iopub.status.idle":"2024-12-24T10:42:15.498862Z","shell.execute_reply.started":"2024-12-24T10:42:15.493131Z","shell.execute_reply":"2024-12-24T10:42:15.497595Z"}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"# missing values in Fitness_Endurance-Time_Sec in train data\nprint(train_data['Fitness_Endurance-Time_Sec'].isnull().sum())\n\n#skewness of Fitness_Endurance-Time_Sec in train data\nprint(train_data['Fitness_Endurance-Time_Sec'].skew())\n\n#median of Fitness_Endurance-Time_Sec in train data\nprint(train_data['Fitness_Endurance-Time_Sec'].median())\n\n# mode of Fitness_Endurance-Time_Sec in train data\nprint(train_data['Fitness_Endurance-Time_Sec'].mode())\n\n# describe the data of Fitness_Endurance-Time_Sec\nprint(train_data['Fitness_Endurance-Time_Sec'].describe())\n\n# kde plot of Fitness_Endurance-Time_Sec in train data\nsns.kdeplot(train_data['Fitness_Endurance-Time_Sec'])\nplt.show()","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2024-12-24T10:42:15.499877Z","iopub.execute_input":"2024-12-24T10:42:15.500192Z","iopub.status.idle":"2024-12-24T10:42:15.750898Z","shell.execute_reply.started":"2024-12-24T10:42:15.500168Z","shell.execute_reply":"2024-12-24T10:42:15.749598Z"}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"# fill the missing values in Fitness_Endurance-Time_Sec in train_data with median\ntrain_data['Fitness_Endurance-Time_Sec'].fillna(train_data['Fitness_Endurance-Time_Sec'].median(), inplace=True)","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2024-12-24T10:42:15.751916Z","iopub.execute_input":"2024-12-24T10:42:15.752220Z","iopub.status.idle":"2024-12-24T10:42:15.758324Z","shell.execute_reply.started":"2024-12-24T10:42:15.752191Z","shell.execute_reply":"2024-12-24T10:42:15.757166Z"}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"# missing values in Fitness_Endurance-Time_Sec in test data\nprint(test_data['Fitness_Endurance-Time_Sec'].isnull().sum())\n\n#skewness of Fitness_Endurance-Time_Sec in test data\nprint(test_data['Fitness_Endurance-Time_Sec'].skew())\n\n#median of Fitness_Endurance-Time_Sec in test data\nprint(test_data['Fitness_Endurance-Time_Sec'].median())\n\n# mode of Fitness_Endurance-Time_Sec in test data\nprint(test_data['Fitness_Endurance-Time_Sec'].mode())\n\n# describe the data of Fitness_Endurance-Time_Sec\nprint(test_data['Fitness_Endurance-Time_Sec'].describe())\n\n# kde plot of Fitness_Endurance-Time_Sec in test data\nsns.kdeplot(test_data['Fitness_Endurance-Time_Sec'])\nplt.show()","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2024-12-24T10:42:15.759211Z","iopub.execute_input":"2024-12-24T10:42:15.759549Z","iopub.status.idle":"2024-12-24T10:42:15.994524Z","shell.execute_reply.started":"2024-12-24T10:42:15.759513Z","shell.execute_reply":"2024-12-24T10:42:15.993304Z"}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"# fill the missing values in Fitness_Endurance-Time_Sec in test_data with median\ntest_data['Fitness_Endurance-Time_Sec'].fillna(test_data['Fitness_Endurance-Time_Sec'].median(), inplace=True)","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2024-12-24T10:42:15.995317Z","iopub.execute_input":"2024-12-24T10:42:15.995641Z","iopub.status.idle":"2024-12-24T10:42:16.001035Z","shell.execute_reply.started":"2024-12-24T10:42:15.995616Z","shell.execute_reply":"2024-12-24T10:42:15.999761Z"}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"# missing values in FGC-Season in train data\nprint(train_data['FGC-Season'].isnull().sum())\n\n#category in FGC-Season in train data\nprint(train_data['FGC-Season'].value_counts())\n\n# Fill n/a in 'FGC-Season' with 'Missing' in train_data\ntrain_data['FGC-Season'].fillna('Missing', inplace=True)\nprint(train_data['FGC-Season'].value_counts())\n\n# label encoding of FGC-Season in train data\ntrain_data['FGC-Season'] = le.fit_transform(train_data['FGC-Season'])\ntrain_data['FGC-Season'].value_counts()","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2024-12-24T10:42:16.001996Z","iopub.execute_input":"2024-12-24T10:42:16.002362Z","iopub.status.idle":"2024-12-24T10:42:16.029385Z","shell.execute_reply.started":"2024-12-24T10:42:16.002324Z","shell.execute_reply":"2024-12-24T10:42:16.028484Z"}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"# missing values in FGC-Season in test data\nprint(test_data['FGC-Season'].isnull().sum())\n\n#category in FGC-Season in test data\nprint(test_data['FGC-Season'].value_counts())\n\n# Fill n/a in 'FGC-Season' with 'Missing' in test_data\ntest_data['FGC-Season'].fillna('Missing', inplace=True)\nprint(test_data['FGC-Season'].value_counts())\n\n# label encoding of FGC-Season in test data\ntest_data['FGC-Season'] = le.fit_transform(test_data['FGC-Season'])\ntest_data['FGC-Season'].value_counts()","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2024-12-24T10:42:16.030205Z","iopub.execute_input":"2024-12-24T10:42:16.030502Z","iopub.status.idle":"2024-12-24T10:42:16.055807Z","shell.execute_reply.started":"2024-12-24T10:42:16.030460Z","shell.execute_reply":"2024-12-24T10:42:16.054844Z"}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"# missing values in FGC-FGC_CU in train data\nprint(train_data['FGC-FGC_CU'].isnull().sum())\n\n#skewness of FGC-FGC_CU in train data\nprint(train_data['FGC-FGC_CU'].skew())\n\n#median of FGC-FGC_CU in train data\nprint(train_data['FGC-FGC_CU'].median())\n\n# mode of FGC-FGC_CU in train data\nprint(train_data['FGC-FGC_CU'].mode())\n\n# describe the data of FGC-FGC_CU\nprint(train_data['FGC-FGC_CU'].describe())\n\n# kde plot of FGC-FGC_CU in train data\nsns.kdeplot(train_data['FGC-FGC_CU'])\nplt.show()","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2024-12-24T10:42:16.056830Z","iopub.execute_input":"2024-12-24T10:42:16.057087Z","iopub.status.idle":"2024-12-24T10:42:16.306285Z","shell.execute_reply.started":"2024-12-24T10:42:16.057066Z","shell.execute_reply":"2024-12-24T10:42:16.305176Z"}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"# fill the missing values in FGC-FGC_CU in train_data with median\ntrain_data['FGC-FGC_CU'].fillna(train_data['FGC-FGC_CU'].median(), inplace=True)","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2024-12-24T10:42:16.307285Z","iopub.execute_input":"2024-12-24T10:42:16.307606Z","iopub.status.idle":"2024-12-24T10:42:16.313578Z","shell.execute_reply.started":"2024-12-24T10:42:16.307578Z","shell.execute_reply":"2024-12-24T10:42:16.312580Z"}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"# missing values in FGC-FGC_CU in test data\nprint(test_data['FGC-FGC_CU'].isnull().sum())\n\n#skewness of FGC-FGC_CU in test data\nprint(test_data['FGC-FGC_CU'].skew())\n\n#median of FGC-FGC_CU in test data\nprint(test_data['FGC-FGC_CU'].median())\n\n# mode of FGC-FGC_CU in test data\nprint(test_data['FGC-FGC_CU'].mode())\n\n# describe the data of FGC-FGC_CU\nprint(test_data['FGC-FGC_CU'].describe())\n\n# kde plot of FGC-FGC_CU in test data\nsns.kdeplot(test_data['FGC-FGC_CU'])\nplt.show()","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2024-12-24T10:42:16.314620Z","iopub.execute_input":"2024-12-24T10:42:16.314955Z","iopub.status.idle":"2024-12-24T10:42:16.566745Z","shell.execute_reply.started":"2024-12-24T10:42:16.314929Z","shell.execute_reply":"2024-12-24T10:42:16.565855Z"}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"# fill the missing values in FGC-FGC_CU in test_data with median\ntest_data['FGC-FGC_CU'].fillna(test_data['FGC-FGC_CU'].median(), inplace=True)","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2024-12-24T10:42:16.567629Z","iopub.execute_input":"2024-12-24T10:42:16.567886Z","iopub.status.idle":"2024-12-24T10:42:16.573433Z","shell.execute_reply.started":"2024-12-24T10:42:16.567864Z","shell.execute_reply":"2024-12-24T10:42:16.572364Z"}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"# missing values in FGC-FGC_CU_Zone in train_data\nprint(train_data['FGC-FGC_CU_Zone'].isnull().sum())\n\n#category in FGC-FGC_CU_Zone in train_data\nprint(train_data['FGC-FGC_CU_Zone'].value_counts())\n\n# Fill n/a in 'FGC-FGC_CU_Zone' with '3' in train_data\ntrain_data['FGC-FGC_CU_Zone'].fillna(3, inplace=True)\nprint(train_data['FGC-FGC_CU_Zone'].value_counts())\n\n# missing values in FGC-FGC_CU_Zone in train_data\nprint(train_data['FGC-FGC_CU_Zone'].isnull().sum())","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2024-12-24T10:42:16.574549Z","iopub.execute_input":"2024-12-24T10:42:16.574905Z","iopub.status.idle":"2024-12-24T10:42:16.597746Z","shell.execute_reply.started":"2024-12-24T10:42:16.574879Z","shell.execute_reply":"2024-12-24T10:42:16.596637Z"}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"# missing values in FGC-FGC_CU_Zone in test_data\nprint(test_data['FGC-FGC_CU_Zone'].isnull().sum())\n\n#category in FGC-FGC_CU_Zone in test_data\nprint(test_data['FGC-FGC_CU_Zone'].value_counts())\n\n# Fill n/a in 'FGC-FGC_CU_Zone' with '3' in test_data\ntest_data['FGC-FGC_CU_Zone'].fillna(3, inplace=True)\nprint(test_data['FGC-FGC_CU_Zone'].value_counts())\n\n# missing values in FGC-FGC_CU_Zone in test_data\nprint(test_data['FGC-FGC_CU_Zone'].isnull().sum())","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2024-12-24T10:42:16.598723Z","iopub.execute_input":"2024-12-24T10:42:16.599066Z","iopub.status.idle":"2024-12-24T10:42:16.618442Z","shell.execute_reply.started":"2024-12-24T10:42:16.599038Z","shell.execute_reply":"2024-12-24T10:42:16.617378Z"}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"# missing values in FGC-FGC_GSND in train data\nprint(train_data['FGC-FGC_GSND'].isnull().sum())\n\n#skewness of FGC-FGC_GSND in train data\nprint(train_data['FGC-FGC_GSND'].skew())\n\n#median of FGC-FGC_GSND in train data\nprint(train_data['FGC-FGC_GSND'].median())\n\n# mode of FGC-FGC_GSND in train data\nprint(train_data['FGC-FGC_GSND'].mode())\n\n# describe the data of FGC-FGC_GSND\nprint(train_data['FGC-FGC_GSND'].describe())\n\n# kde plot of FGC-FGC_GSND in train data\nsns.kdeplot(train_data['FGC-FGC_GSND'])\nplt.show()","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2024-12-24T10:42:16.619420Z","iopub.execute_input":"2024-12-24T10:42:16.619746Z","iopub.status.idle":"2024-12-24T10:42:16.854688Z","shell.execute_reply.started":"2024-12-24T10:42:16.619720Z","shell.execute_reply":"2024-12-24T10:42:16.853419Z"}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"# fill the missing values in FGC-FGC_GSND in train_data with median\ntrain_data['FGC-FGC_GSND'].fillna(train_data['FGC-FGC_GSND'].median(), inplace=True)","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2024-12-24T10:42:16.855519Z","iopub.execute_input":"2024-12-24T10:42:16.855780Z","iopub.status.idle":"2024-12-24T10:42:16.861999Z","shell.execute_reply.started":"2024-12-24T10:42:16.855758Z","shell.execute_reply":"2024-12-24T10:42:16.860966Z"}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"# missing values in FGC-FGC_GSND in test data\nprint(test_data['FGC-FGC_GSND'].isnull().sum())\n\n#skewness of FGC-FGC_GSND in test data\nprint(test_data['FGC-FGC_GSND'].skew())\n\n#median of FGC-FGC_GSND in test data\nprint(test_data['FGC-FGC_GSND'].median())\n\n# mode of FGC-FGC_GSND in test data\nprint(test_data['FGC-FGC_GSND'].mode())\n\n# describe the data of FGC-FGC_GSND\nprint(test_data['FGC-FGC_GSND'].describe())\n\n# kde plot of FGC-FGC_GSND in test data\nsns.kdeplot(test_data['FGC-FGC_GSND'])","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2024-12-24T10:42:16.863087Z","iopub.execute_input":"2024-12-24T10:42:16.863438Z","iopub.status.idle":"2024-12-24T10:42:17.183020Z","shell.execute_reply.started":"2024-12-24T10:42:16.863366Z","shell.execute_reply":"2024-12-24T10:42:17.181812Z"}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"# fill the missing values in FGC-FGC_GSND in test_data with median\ntest_data['FGC-FGC_GSND'].fillna(test_data['FGC-FGC_GSND'].median(), inplace=True)","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2024-12-24T10:42:17.184131Z","iopub.execute_input":"2024-12-24T10:42:17.184568Z","iopub.status.idle":"2024-12-24T10:42:17.190291Z","shell.execute_reply.started":"2024-12-24T10:42:17.184534Z","shell.execute_reply":"2024-12-24T10:42:17.189242Z"}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"# missing values in FGC-FGC_GSND_Zone in train data\nprint(train_data['FGC-FGC_GSND_Zone'].isnull().sum())\n\n#category in FGC-FGC_GSND_Zone in train data\nprint(train_data['FGC-FGC_GSND_Zone'].value_counts())\n\n# Fill n/a in 'FGC-FGC_GSND_Zone' with '4' in train_data\ntrain_data['FGC-FGC_GSND_Zone'].fillna(4, inplace=True)\nprint(train_data['FGC-FGC_GSND_Zone'].value_counts())\n\n# missing values in FGC-FGC_GSND_Zone in train data\nprint(train_data['FGC-FGC_GSND_Zone'].isnull().sum())","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2024-12-24T10:42:17.191355Z","iopub.execute_input":"2024-12-24T10:42:17.192167Z","iopub.status.idle":"2024-12-24T10:42:17.214844Z","shell.execute_reply.started":"2024-12-24T10:42:17.192126Z","shell.execute_reply":"2024-12-24T10:42:17.213597Z"}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"# missing values in FGC-FGC_GSND_Zone in test data\nprint(test_data['FGC-FGC_GSND_Zone'].isnull().sum())\n\n#category in FGC-FGC_GSND_Zone in test data\nprint(test_data['FGC-FGC_GSND_Zone'].value_counts())\n\n# Fill n/a in 'FGC-FGC_GSND_Zone' with '4' in test_data\ntest_data['FGC-FGC_GSND_Zone'].fillna(4, inplace=True)\nprint(test_data['FGC-FGC_GSND_Zone'].value_counts())\n\n# missing values in FGC-FGC_GSND_Zone in test data\nprint(test_data['FGC-FGC_GSND_Zone'].isnull().sum())","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2024-12-24T10:42:17.215910Z","iopub.execute_input":"2024-12-24T10:42:17.216273Z","iopub.status.idle":"2024-12-24T10:42:17.238798Z","shell.execute_reply.started":"2024-12-24T10:42:17.216243Z","shell.execute_reply":"2024-12-24T10:42:17.237671Z"}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"# missing values in FGC-FGC_GSD in train data\nprint(train_data['FGC-FGC_GSD'].isnull().sum())\n\n#skewness of FGC-FGC_GSD in train data\nprint(train_data['FGC-FGC_GSD'].skew())\n\n#median of FGC-FGC_GSD in train data\nprint(train_data['FGC-FGC_GSD'].median())\n\n# mode of FGC-FGC_GSD in train data\nprint(train_data['FGC-FGC_GSD'].mode())\n\n# describe the data of FGC-FGC_GSD\nprint(train_data['FGC-FGC_GSD'].describe())\n\n# kde plot of FGC-FGC_GSD in train data \nsns.kdeplot(train_data['FGC-FGC_GSD'])","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2024-12-24T10:42:17.239823Z","iopub.execute_input":"2024-12-24T10:42:17.240187Z","iopub.status.idle":"2024-12-24T10:42:17.529223Z","shell.execute_reply.started":"2024-12-24T10:42:17.240158Z","shell.execute_reply":"2024-12-24T10:42:17.528001Z"}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"# fill the missing values in FGC-FGC_GSD in train_data with median\ntrain_data['FGC-FGC_GSD'].fillna(train_data['FGC-FGC_GSD'].median(), inplace=True)","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2024-12-24T10:42:17.530268Z","iopub.execute_input":"2024-12-24T10:42:17.530679Z","iopub.status.idle":"2024-12-24T10:42:17.537010Z","shell.execute_reply.started":"2024-12-24T10:42:17.530636Z","shell.execute_reply":"2024-12-24T10:42:17.535931Z"}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"# missing values in FGC-FGC_GSD in test data\nprint(test_data['FGC-FGC_GSD'].isnull().sum())\n\n#skewness of FGC-FGC_GSD in test data\nprint(test_data['FGC-FGC_GSD'].skew())\n\n#median of FGC-FGC_GSD in test data\nprint(test_data['FGC-FGC_GSD'].median())\n\n# mode of FGC-FGC_GSD in test data\nprint(test_data['FGC-FGC_GSD'].mode())\n\n# describe the data of FGC-FGC_GSD\nprint(test_data['FGC-FGC_GSD'].describe())\n\n# kde plot of FGC-FGC_GSD in test data\nsns.kdeplot(test_data['FGC-FGC_GSD'])\nplt.show()","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2024-12-24T10:42:17.538230Z","iopub.execute_input":"2024-12-24T10:42:17.538694Z","iopub.status.idle":"2024-12-24T10:42:17.806390Z","shell.execute_reply.started":"2024-12-24T10:42:17.538653Z","shell.execute_reply":"2024-12-24T10:42:17.805229Z"}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"# fill the missing values in FGC-FGC_GSD in test_data with median\ntest_data['FGC-FGC_GSD'].fillna(test_data['FGC-FGC_GSD'].median(), inplace=True)","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2024-12-24T10:42:17.807612Z","iopub.execute_input":"2024-12-24T10:42:17.807957Z","iopub.status.idle":"2024-12-24T10:42:17.814164Z","shell.execute_reply.started":"2024-12-24T10:42:17.807929Z","shell.execute_reply":"2024-12-24T10:42:17.813153Z"}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"# missing values in FGC-FGC_GSD_Zone in train data \nprint(train_data['FGC-FGC_GSD_Zone'].isnull().sum())    \n\n#category in FGC-FGC_GSD_Zone in train data\nprint(train_data['FGC-FGC_GSD_Zone'].value_counts())\n\n# Fill n/a in 'FGC-FGC_GSD_Zone' with '4' in train_data\ntrain_data['FGC-FGC_GSD_Zone'].fillna(4, inplace=True)\n\n# missing values in FGC-FGC_GSD_Zone in train data\nprint(train_data['FGC-FGC_GSD_Zone'].isnull().sum())","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2024-12-24T10:42:17.815206Z","iopub.execute_input":"2024-12-24T10:42:17.815694Z","iopub.status.idle":"2024-12-24T10:42:17.837434Z","shell.execute_reply.started":"2024-12-24T10:42:17.815649Z","shell.execute_reply":"2024-12-24T10:42:17.836293Z"}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"# missing values in FGC-FGC_GSD_Zone in test data\nprint(test_data['FGC-FGC_GSD_Zone'].isnull().sum())\n\n#category in FGC-FGC_GSD_Zone in test data\nprint(test_data['FGC-FGC_GSD_Zone'].value_counts())\n\n# Fill n/a in 'FGC-FGC_GSD_Zone' with '4' in test_data\ntest_data['FGC-FGC_GSD_Zone'].fillna(4, inplace=True)\n\n# missing values in FGC-FGC_GSD_Zone in test data\nprint(test_data['FGC-FGC_GSD_Zone'].isnull().sum())\n\n# category in FGC-FGC_GSD_Zone in test data\nprint(test_data['FGC-FGC_GSD_Zone'].value_counts())","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2024-12-24T10:42:17.838374Z","iopub.execute_input":"2024-12-24T10:42:17.838768Z","iopub.status.idle":"2024-12-24T10:42:17.857992Z","shell.execute_reply.started":"2024-12-24T10:42:17.838727Z","shell.execute_reply":"2024-12-24T10:42:17.856884Z"}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"# missing values in FGC-FGC_PU in train data\nprint(train_data['FGC-FGC_PU'].isnull().sum())\n\n#skewness of FGC-FGC_PU in train data\nprint(train_data['FGC-FGC_PU'].skew())\n\n#median of FGC-FGC_PU in train data\nprint(train_data['FGC-FGC_PU'].median())\n\n# mode of FGC-FGC_PU in train data\nprint(train_data['FGC-FGC_PU'].mode())\n\n# describe the data of FGC-FGC_PU\nprint(train_data['FGC-FGC_PU'].describe())\n\n# kde plot of FGC-FGC_PU in train data\nsns.kdeplot(train_data['FGC-FGC_PU'])\nplt.show()","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2024-12-24T10:42:17.859141Z","iopub.execute_input":"2024-12-24T10:42:17.859447Z","iopub.status.idle":"2024-12-24T10:42:18.130951Z","shell.execute_reply.started":"2024-12-24T10:42:17.859422Z","shell.execute_reply":"2024-12-24T10:42:18.129871Z"}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"# fill the missing values in FGC-FGC_PU in train_data with median\ntrain_data['FGC-FGC_PU'].fillna(train_data['FGC-FGC_PU'].median(), inplace=True)","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2024-12-24T10:42:18.131906Z","iopub.execute_input":"2024-12-24T10:42:18.132269Z","iopub.status.idle":"2024-12-24T10:42:18.139130Z","shell.execute_reply.started":"2024-12-24T10:42:18.132240Z","shell.execute_reply":"2024-12-24T10:42:18.137720Z"}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"# missing values in FGC-FGC_PU in test data\nprint(test_data['FGC-FGC_PU'].isnull().sum())\n\n#skewness of FGC-FGC_PU in test data\nprint(test_data['FGC-FGC_PU'].skew())\n\n#median of FGC-FGC_PU in test data\nprint(test_data['FGC-FGC_PU'].median())\n\n# mode of FGC-FGC_PU in test data\nprint(test_data['FGC-FGC_PU'].mode())\n\n# describe the data of FGC-FGC_PU\nprint(test_data['FGC-FGC_PU'].describe())\n\n# kde plot of FGC-FGC_PU in test data\nsns.kdeplot(test_data['FGC-FGC_PU'])\nplt.show()","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2024-12-24T10:42:18.140184Z","iopub.execute_input":"2024-12-24T10:42:18.140573Z","iopub.status.idle":"2024-12-24T10:42:18.585322Z","shell.execute_reply.started":"2024-12-24T10:42:18.140543Z","shell.execute_reply":"2024-12-24T10:42:18.584300Z"}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"# fill the missing values in FGC-FGC_PU in test_data with median\ntest_data['FGC-FGC_PU'].fillna(test_data['FGC-FGC_PU'].median(), inplace=True)","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2024-12-24T10:42:18.586234Z","iopub.execute_input":"2024-12-24T10:42:18.586592Z","iopub.status.idle":"2024-12-24T10:42:18.592129Z","shell.execute_reply.started":"2024-12-24T10:42:18.586565Z","shell.execute_reply":"2024-12-24T10:42:18.590937Z"}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"# missing values in FGC-FGC_PU_Zone in train data\nprint(train_data['FGC-FGC_PU_Zone'].isnull().sum())      \n\n#category in FGC-FGC_PU_Zone in train data\nprint(train_data['FGC-FGC_PU_Zone'].value_counts())\n\n# Fill n/a in 'FGC-FGC_PU_Zone' with '2' in train_data\ntrain_data['FGC-FGC_PU_Zone'].fillna(2, inplace=True)\n\n# missing values in FGC-FGC_PU_Zone in train data\nprint(train_data['FGC-FGC_PU_Zone'].isnull().sum())\n\n# category in FGC-FGC_PU_Zone in train data\nprint(train_data['FGC-FGC_PU_Zone'].value_counts())","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2024-12-24T10:42:18.593226Z","iopub.execute_input":"2024-12-24T10:42:18.593623Z","iopub.status.idle":"2024-12-24T10:42:18.619091Z","shell.execute_reply.started":"2024-12-24T10:42:18.593585Z","shell.execute_reply":"2024-12-24T10:42:18.617936Z"}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"# missing values in FGC-FGC_PU_Zone in test data\nprint(test_data['FGC-FGC_PU_Zone'].isnull().sum())\n\n#category in FGC-FGC_PU_Zone in test data\nprint(test_data['FGC-FGC_PU_Zone'].value_counts())\n\n# Fill n/a in 'FGC-FGC_PU_Zone' with '2' in test_data\ntest_data['FGC-FGC_PU_Zone'].fillna(2, inplace=True)\n\n# missing values in FGC-FGC_PU_Zone in test data\nprint(test_data['FGC-FGC_PU_Zone'].isnull().sum())\n\n# category in FGC-FGC_PU_Zone in test data\nprint(test_data['FGC-FGC_PU_Zone'].value_counts())","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2024-12-24T10:42:18.620158Z","iopub.execute_input":"2024-12-24T10:42:18.620437Z","iopub.status.idle":"2024-12-24T10:42:18.641119Z","shell.execute_reply.started":"2024-12-24T10:42:18.620414Z","shell.execute_reply":"2024-12-24T10:42:18.640030Z"}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"# missing values in FGC-FGC_SRL in train data\nprint(train_data['FGC-FGC_SRL'].isnull().sum())\n\n#skewness of FGC-FGC_SRL in train data\nprint(train_data['FGC-FGC_SRL'].skew())\n\n#median of FGC-FGC_SRL in train data\nprint(train_data['FGC-FGC_SRL'].median())\n\n# mode of FGC-FGC_SRL in train data\nprint(train_data['FGC-FGC_SRL'].mode())\n\n# describe the data of FGC-FGC_SRL\nprint(train_data['FGC-FGC_SRL'].describe())\n\n# kde plot of FGC-FGC_SRL in train data\nsns.kdeplot(train_data['FGC-FGC_SRL'])\nplt.show()","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2024-12-24T10:42:18.642073Z","iopub.execute_input":"2024-12-24T10:42:18.642332Z","iopub.status.idle":"2024-12-24T10:42:18.898141Z","shell.execute_reply.started":"2024-12-24T10:42:18.642309Z","shell.execute_reply":"2024-12-24T10:42:18.897048Z"}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"# fill the missing values in FGC-FGC_SRL in train_data with median\ntrain_data['FGC-FGC_SRL'].fillna(train_data['FGC-FGC_SRL'].median(), inplace=True)","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2024-12-24T10:42:18.899184Z","iopub.execute_input":"2024-12-24T10:42:18.899626Z","iopub.status.idle":"2024-12-24T10:42:18.906401Z","shell.execute_reply.started":"2024-12-24T10:42:18.899595Z","shell.execute_reply":"2024-12-24T10:42:18.905421Z"}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"# missing values in FGC-FGC_SRL in test data\nprint(test_data['FGC-FGC_SRL'].isnull().sum())\n\n#skewness of FGC-FGC_SRL in test data\nprint(test_data['FGC-FGC_SRL'].skew())\n\n#median of FGC-FGC_SRL in test data\nprint(test_data['FGC-FGC_SRL'].median())\n\n# mode of FGC-FGC_SRL in test data\nprint(test_data['FGC-FGC_SRL'].mode())\n\n# describe the data of FGC-FGC_SRL\nprint(test_data['FGC-FGC_SRL'].describe())\n\n# kde plot of FGC-FGC_SRL in test data\nsns.kdeplot(test_data['FGC-FGC_SRL'])\nplt.show()","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2024-12-24T10:42:18.907707Z","iopub.execute_input":"2024-12-24T10:42:18.907995Z","iopub.status.idle":"2024-12-24T10:42:19.156807Z","shell.execute_reply.started":"2024-12-24T10:42:18.907970Z","shell.execute_reply":"2024-12-24T10:42:19.155689Z"}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"# fill the missing values in FGC-FGC_SRL in test_data with median\ntest_data['FGC-FGC_SRL'].fillna(test_data['FGC-FGC_SRL'].median(), inplace=True)","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2024-12-24T10:42:19.157839Z","iopub.execute_input":"2024-12-24T10:42:19.158146Z","iopub.status.idle":"2024-12-24T10:42:19.163938Z","shell.execute_reply.started":"2024-12-24T10:42:19.158118Z","shell.execute_reply":"2024-12-24T10:42:19.162939Z"}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"# missing values in FGC-FGC_SRL_Zone in train data    \nprint(train_data['FGC-FGC_SRL_Zone'].isnull().sum())\n\n#category in FGC-FGC_SRL_Zone in train data\nprint(train_data['FGC-FGC_SRL_Zone'].value_counts())\n\n# Fill n/a in 'FGC-FGC_SRL_Zone' with '2' in train_data\ntrain_data['FGC-FGC_SRL_Zone'].fillna(2, inplace=True)\n\n#value counts of FGC-FGC_SRL_Zone in train data\nprint(train_data['FGC-FGC_SRL_Zone'].value_counts())\n\n# missing values in FGC-FGC_SRL_Zone in train data\nprint(train_data['FGC-FGC_SRL_Zone'].isnull().sum())","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2024-12-24T10:42:19.164937Z","iopub.execute_input":"2024-12-24T10:42:19.165325Z","iopub.status.idle":"2024-12-24T10:42:19.189792Z","shell.execute_reply.started":"2024-12-24T10:42:19.165284Z","shell.execute_reply":"2024-12-24T10:42:19.188429Z"}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"# missing values in FGC-FGC_SRL_Zone in test data\nprint(test_data['FGC-FGC_SRL_Zone'].isnull().sum())\n\n#category in FGC-FGC_SRL_Zone in test data\nprint(test_data['FGC-FGC_SRL_Zone'].value_counts())\n\n# Fill n/a in 'FGC-FGC_SRL_Zone' with '2' in test_data\ntest_data['FGC-FGC_SRL_Zone'].fillna(2, inplace=True)\n\n#value counts of FGC-FGC_SRL_Zone in test data\nprint(test_data['FGC-FGC_SRL_Zone'].value_counts())\n\n# missing values in FGC-FGC_SRL_Zone in test data\nprint(test_data['FGC-FGC_SRL_Zone'].isnull().sum())","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2024-12-24T10:42:19.190898Z","iopub.execute_input":"2024-12-24T10:42:19.191203Z","iopub.status.idle":"2024-12-24T10:42:19.219511Z","shell.execute_reply.started":"2024-12-24T10:42:19.191173Z","shell.execute_reply":"2024-12-24T10:42:19.218419Z"}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"# missing values in FGC-FGC_SRR in train data\nprint(train_data['FGC-FGC_SRR'].isnull().sum())\n\n#skewness of FGC-FGC_SRR in train data\nprint(train_data['FGC-FGC_SRR'].skew())\n\n#median of FGC-FGC_SRR in train data\nprint(train_data['FGC-FGC_SRR'].median())\n\n# mode of FGC-FGC_SRR in train data\nprint(train_data['FGC-FGC_SRR'].mode())\n\n# describe the data of FGC-FGC_SRR\nprint(train_data['FGC-FGC_SRR'].describe())\n\n# kde plot of FGC-FGC_SRR in train data\nsns.kdeplot(train_data['FGC-FGC_SRR'])\nplt.show()","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2024-12-24T10:42:19.220748Z","iopub.execute_input":"2024-12-24T10:42:19.221061Z","iopub.status.idle":"2024-12-24T10:42:19.497269Z","shell.execute_reply.started":"2024-12-24T10:42:19.221030Z","shell.execute_reply":"2024-12-24T10:42:19.495731Z"}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"# fill the missing values in FGC-FGC_SRR in train_data with median\ntrain_data['FGC-FGC_SRR'].fillna(train_data['FGC-FGC_SRR'].median(), inplace=True)","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2024-12-24T10:42:19.498409Z","iopub.execute_input":"2024-12-24T10:42:19.498867Z","iopub.status.idle":"2024-12-24T10:42:19.505643Z","shell.execute_reply.started":"2024-12-24T10:42:19.498823Z","shell.execute_reply":"2024-12-24T10:42:19.504441Z"}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"# missing values in FGC-FGC_SRR in test data\nprint(test_data['FGC-FGC_SRR'].isnull().sum())\n\n#skewness of FGC-FGC_SRR in test data\nprint(test_data['FGC-FGC_SRR'].skew())\n\n#median of FGC-FGC_SRR in test data\nprint(test_data['FGC-FGC_SRR'].median())\n\n# mode of FGC-FGC_SRR in test data\nprint(test_data['FGC-FGC_SRR'].mode())\n\n# describe the data of FGC-FGC_SRR\nprint(test_data['FGC-FGC_SRR'].describe())\n\n# kde plot of FGC-FGC_SRR in test data\nsns.kdeplot(test_data['FGC-FGC_SRR'])\nplt.show()","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2024-12-24T10:42:19.506794Z","iopub.execute_input":"2024-12-24T10:42:19.507136Z","iopub.status.idle":"2024-12-24T10:42:19.777626Z","shell.execute_reply.started":"2024-12-24T10:42:19.507108Z","shell.execute_reply":"2024-12-24T10:42:19.776535Z"}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"# fill the missing values in FGC-FGC_SRR in test_data with median\ntest_data['FGC-FGC_SRR'].fillna(test_data['FGC-FGC_SRR'].median(), inplace=True)","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2024-12-24T10:42:19.778958Z","iopub.execute_input":"2024-12-24T10:42:19.779300Z","iopub.status.idle":"2024-12-24T10:42:19.786255Z","shell.execute_reply.started":"2024-12-24T10:42:19.779271Z","shell.execute_reply":"2024-12-24T10:42:19.784546Z"}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"# missing values in FGC-FGC_SRR_Zone in train data\nprint(train_data['FGC-FGC_SRR_Zone'].isnull().sum())\n\n#category in FGC-FGC_SRR_Zone in train data\nprint(train_data['FGC-FGC_SRR_Zone'].value_counts())\n\n# Fill n/a in 'FGC-FGC_SRR_Zone' with '2' in train_data\ntrain_data['FGC-FGC_SRR_Zone'].fillna(2, inplace=True)\n\n#value counts of FGC-FGC_SRR_Zone in train data\nprint(train_data['FGC-FGC_SRR_Zone'].value_counts())","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2024-12-24T10:42:19.787911Z","iopub.execute_input":"2024-12-24T10:42:19.788322Z","iopub.status.idle":"2024-12-24T10:42:19.810892Z","shell.execute_reply.started":"2024-12-24T10:42:19.788281Z","shell.execute_reply":"2024-12-24T10:42:19.809541Z"}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"# missing values in FGC-FGC_SRR_Zone in test data\nprint(test_data['FGC-FGC_SRR_Zone'].isnull().sum())\n\n#category in FGC-FGC_SRR_Zone in test data\nprint(test_data['FGC-FGC_SRR_Zone'].value_counts())\n\n# Fill n/a in 'FGC-FGC_SRR_Zone' with '2' in test_data\ntest_data['FGC-FGC_SRR_Zone'].fillna(2, inplace=True)\n\n#value counts of FGC-FGC_SRR_Zone in test data\nprint(test_data['FGC-FGC_SRR_Zone'].value_counts())","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2024-12-24T10:42:19.812029Z","iopub.execute_input":"2024-12-24T10:42:19.812377Z","iopub.status.idle":"2024-12-24T10:42:19.833927Z","shell.execute_reply.started":"2024-12-24T10:42:19.812343Z","shell.execute_reply":"2024-12-24T10:42:19.832870Z"}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"# missing values in FGC-FGC_TL in train data\nprint(train_data['FGC-FGC_TL'].isnull().sum())\n\n#skewness of FGC-FGC_TL in train data\nprint(train_data['FGC-FGC_TL'].skew())\n\n#median of FGC-FGC_TL in train data\nprint(train_data['FGC-FGC_TL'].median())\n\n# mode of FGC-FGC_TL in train data\nprint(train_data['FGC-FGC_TL'].mode())\n\n# describe the data of FGC-FGC_TL\nprint(train_data['FGC-FGC_TL'].describe())\n\n# kde plot of FGC-FGC_TL in train data\nsns.kdeplot(train_data['FGC-FGC_TL'])\nplt.show()","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2024-12-24T10:42:19.834753Z","iopub.execute_input":"2024-12-24T10:42:19.835078Z","iopub.status.idle":"2024-12-24T10:42:20.163116Z","shell.execute_reply.started":"2024-12-24T10:42:19.835038Z","shell.execute_reply":"2024-12-24T10:42:20.162119Z"}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"# fill the missing values in FGC-FGC_TL in train_data with median\ntrain_data['FGC-FGC_TL'].fillna(train_data['FGC-FGC_TL'].median(), inplace=True)","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2024-12-24T10:42:20.164080Z","iopub.execute_input":"2024-12-24T10:42:20.164393Z","iopub.status.idle":"2024-12-24T10:42:20.170792Z","shell.execute_reply.started":"2024-12-24T10:42:20.164365Z","shell.execute_reply":"2024-12-24T10:42:20.169677Z"}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"# missing values in FGC-FGC_TL in test data\nprint(test_data['FGC-FGC_TL'].isnull().sum())\n\n#skewness of FGC-FGC_TL in test data\nprint(test_data['FGC-FGC_TL'].skew())\n\n#median of FGC-FGC_TL in test data\nprint(test_data['FGC-FGC_TL'].median())\n\n# mode of FGC-FGC_TL in test data\nprint(test_data['FGC-FGC_TL'].mode())\n\n# describe the data of FGC-FGC_TL\nprint(test_data['FGC-FGC_TL'].describe())\n\n# kde plot of FGC-FGC_TL in test data\nsns.kdeplot(test_data['FGC-FGC_TL'])\nplt.show()","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2024-12-24T10:42:20.171970Z","iopub.execute_input":"2024-12-24T10:42:20.172380Z","iopub.status.idle":"2024-12-24T10:42:20.385746Z","shell.execute_reply.started":"2024-12-24T10:42:20.172334Z","shell.execute_reply":"2024-12-24T10:42:20.384417Z"}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"# fill the missing values in FGC-FGC_TL in test_data with median\ntest_data['FGC-FGC_TL'].fillna(test_data['FGC-FGC_TL'].median(), inplace=True)","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2024-12-24T10:42:20.386646Z","iopub.execute_input":"2024-12-24T10:42:20.387080Z","iopub.status.idle":"2024-12-24T10:42:20.393032Z","shell.execute_reply.started":"2024-12-24T10:42:20.387046Z","shell.execute_reply":"2024-12-24T10:42:20.391831Z"}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"# missing values in FGC-FGC_TL_Zone in train data   \nprint(train_data['FGC-FGC_TL_Zone'].isnull().sum())\n\n#category in FGC-FGC_TL_Zone in train data\nprint(train_data['FGC-FGC_TL_Zone'].value_counts())\n\n# Fill n/a in 'FGC-FGC_TL_Zone' with '2' in train_data\ntrain_data['FGC-FGC_TL_Zone'].fillna(2, inplace=True)\n\n#value counts of FGC-FGC_TL_Zone in train data\nprint(train_data['FGC-FGC_TL_Zone'].value_counts())","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2024-12-24T10:42:20.394033Z","iopub.execute_input":"2024-12-24T10:42:20.394379Z","iopub.status.idle":"2024-12-24T10:42:20.417176Z","shell.execute_reply.started":"2024-12-24T10:42:20.394354Z","shell.execute_reply":"2024-12-24T10:42:20.416088Z"}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"# missing values in FGC-FGC_TL_Zone in test data\nprint(test_data['FGC-FGC_TL_Zone'].isnull().sum())\n\n#category in FGC-FGC_TL_Zone in test data\nprint(test_data['FGC-FGC_TL_Zone'].value_counts())\n\n# Fill n/a in 'FGC-FGC_TL_Zone' with '2' in test_data\ntest_data['FGC-FGC_TL_Zone'].fillna(2, inplace=True)\n\n#value counts of FGC-FGC_TL_Zone in test data\nprint(test_data['FGC-FGC_TL_Zone'].value_counts())","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2024-12-24T10:42:20.418530Z","iopub.execute_input":"2024-12-24T10:42:20.418980Z","iopub.status.idle":"2024-12-24T10:42:20.440918Z","shell.execute_reply.started":"2024-12-24T10:42:20.418941Z","shell.execute_reply":"2024-12-24T10:42:20.439729Z"}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"# missing values in BIA-Season in train data\nprint(train_data['BIA-Season'].isnull().sum())\n\n#category in BIA-Season in train data\nprint(train_data['BIA-Season'].value_counts())\n\n# Fill n/a in 'BIA-Season' with 'Missing' in train_data\ntrain_data['BIA-Season'].fillna('Missing', inplace=True)\n\n#value counts of BIA-Season in train data\nprint(train_data['BIA-Season'].value_counts())\n\n# label encoding of BIA-Season in train data\ntrain_data['BIA-Season'] = le.fit_transform(train_data['BIA-Season'])\n\n#value counts of BIA-Season in train data\nprint(train_data['BIA-Season'].value_counts())","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2024-12-24T10:42:20.442248Z","iopub.execute_input":"2024-12-24T10:42:20.442703Z","iopub.status.idle":"2024-12-24T10:42:20.466108Z","shell.execute_reply.started":"2024-12-24T10:42:20.442662Z","shell.execute_reply":"2024-12-24T10:42:20.464996Z"}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"# missing values in BIA-Season in test data\nprint(test_data['BIA-Season'].isnull().sum())\n\n#category in BIA-Season in test data\nprint(test_data['BIA-Season'].value_counts())\n\n# Fill n/a in 'BIA-Season' with 'Missing' in test_data\ntest_data['BIA-Season'].fillna('Missing', inplace=True)\n\n#value counts of BIA-Season in test data\nprint(test_data['BIA-Season'].value_counts())\n\n# label encoding of BIA-Season in test data\ntest_data['BIA-Season'] = le.fit_transform(test_data['BIA-Season'])\n\n#value counts of BIA-Season in test data\nprint(test_data['BIA-Season'].value_counts())","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2024-12-24T10:42:20.467732Z","iopub.execute_input":"2024-12-24T10:42:20.468072Z","iopub.status.idle":"2024-12-24T10:42:20.494387Z","shell.execute_reply.started":"2024-12-24T10:42:20.468034Z","shell.execute_reply":"2024-12-24T10:42:20.493376Z"}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"# missing values in BIA-BIA_Activity_Level_num in train data\nprint(train_data['BIA-BIA_Activity_Level_num'].isnull().sum())\n\n# category in BIA-BIA_Activity_Level_num in train data\nprint(train_data['BIA-BIA_Activity_Level_num'].value_counts())\n\n","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2024-12-24T10:42:20.495521Z","iopub.execute_input":"2024-12-24T10:42:20.495922Z","iopub.status.idle":"2024-12-24T10:42:20.513457Z","shell.execute_reply.started":"2024-12-24T10:42:20.495892Z","shell.execute_reply":"2024-12-24T10:42:20.512041Z"}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"# Fill n/a in 'BIA-BIA_Activity_Level_num' with '6' in train_data\ntrain_data['BIA-BIA_Activity_Level_num'].fillna(6, inplace=True)\n\n# missing values in BIA-BIA_Activity_Level_num in train data\nprint(train_data['BIA-BIA_Activity_Level_num'].isnull().sum())","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2024-12-24T10:42:20.532757Z","iopub.execute_input":"2024-12-24T10:42:20.533143Z","iopub.status.idle":"2024-12-24T10:42:20.540972Z","shell.execute_reply.started":"2024-12-24T10:42:20.533112Z","shell.execute_reply":"2024-12-24T10:42:20.539887Z"}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"# missing values in BIA-BIA_Activity_Level_num in test data\nprint(test_data['BIA-BIA_Activity_Level_num'].isnull().sum())\n\n# category in BIA-BIA_Activity_Level_num in test data\nprint(test_data['BIA-BIA_Activity_Level_num'].value_counts())","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2024-12-24T10:42:20.546378Z","iopub.execute_input":"2024-12-24T10:42:20.546792Z","iopub.status.idle":"2024-12-24T10:42:20.560257Z","shell.execute_reply.started":"2024-12-24T10:42:20.546756Z","shell.execute_reply":"2024-12-24T10:42:20.559068Z"}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"# Fill n/a in 'BIA-BIA_Activity_Level_num' with '6' in test_data\ntest_data['BIA-BIA_Activity_Level_num'].fillna(6, inplace=True)\n\n# missing values in BIA-BIA_Activity_Level_num in test data\nprint(test_data['BIA-BIA_Activity_Level_num'].isnull().sum())","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2024-12-24T10:42:20.561403Z","iopub.execute_input":"2024-12-24T10:42:20.561785Z","iopub.status.idle":"2024-12-24T10:42:20.580163Z","shell.execute_reply.started":"2024-12-24T10:42:20.561756Z","shell.execute_reply":"2024-12-24T10:42:20.578767Z"}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"# missing values in BIA-BIA_BMC in train data\nprint(train_data['BIA-BIA_BMC'].isnull().sum())\n\n#skewness of BIA-BIA_BMC in train data\nprint(train_data['BIA-BIA_BMC'].skew())\n\n#median of BIA-BIA_BMC in train data\nprint(train_data['BIA-BIA_BMC'].median())\n\n# mode of BIA-BIA_BMC in train data\nprint(train_data['BIA-BIA_BMC'].mode())\n\n# describe the data of BIA-BIA_BMC\nprint(train_data['BIA-BIA_BMC'].describe())\n\n# kde plot of BIA-BIA_BMC\nsns.kdeplot(train_data['BIA-BIA_BMC'], shade=True)\n","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2024-12-24T10:42:20.581422Z","iopub.execute_input":"2024-12-24T10:42:20.581943Z","iopub.status.idle":"2024-12-24T10:42:20.909767Z","shell.execute_reply.started":"2024-12-24T10:42:20.581868Z","shell.execute_reply":"2024-12-24T10:42:20.908516Z"}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"# fill the missing values in BIA-BIA_BMC in train_data with median\ntrain_data['BIA-BIA_BMC'].fillna(train_data['BIA-BIA_BMC'].median(), inplace=True)","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2024-12-24T10:42:20.911013Z","iopub.execute_input":"2024-12-24T10:42:20.911428Z","iopub.status.idle":"2024-12-24T10:42:20.918403Z","shell.execute_reply.started":"2024-12-24T10:42:20.911387Z","shell.execute_reply":"2024-12-24T10:42:20.917069Z"}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"# missing values in BIA-BIA_BMC in test data\nprint(test_data['BIA-BIA_BMC'].isnull().sum())\n\n#skewness of BIA-BIA_BMC in test data\nprint(test_data['BIA-BIA_BMC'].skew())\n\n#median of BIA-BIA_BMC in test data\nprint(test_data['BIA-BIA_BMC'].median())\n\n# mode of BIA-BIA_BMC in test data\nprint(test_data['BIA-BIA_BMC'].mode())\n\n# describe the data of BIA-BIA_BMC\nprint(test_data['BIA-BIA_BMC'].describe())\n\n# kde plot of BIA-BIA_BMC\nsns.kdeplot(test_data['BIA-BIA_BMC'], shade=True)\nplt.show()","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2024-12-24T10:42:20.919712Z","iopub.execute_input":"2024-12-24T10:42:20.920143Z","iopub.status.idle":"2024-12-24T10:42:21.180295Z","shell.execute_reply.started":"2024-12-24T10:42:20.920112Z","shell.execute_reply":"2024-12-24T10:42:21.179153Z"}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"# fill the missing values in BIA-BIA_BMC in test_data with median\ntest_data['BIA-BIA_BMC'].fillna(test_data['BIA-BIA_BMC'].median(), inplace=True)","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2024-12-24T10:42:21.181418Z","iopub.execute_input":"2024-12-24T10:42:21.181811Z","iopub.status.idle":"2024-12-24T10:42:21.187519Z","shell.execute_reply.started":"2024-12-24T10:42:21.181771Z","shell.execute_reply":"2024-12-24T10:42:21.186595Z"}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"# missing values in BIA-BIA_BMI in train data\nprint(train_data['BIA-BIA_BMI'].isnull().sum())\n\n#skewness of BIA-BIA_BMI in train data\nprint(train_data['BIA-BIA_BMI'].skew())\n\n#median of BIA-BIA_BMI in train data\nprint(train_data['BIA-BIA_BMI'].median())\n\n# mode of BIA-BIA_BMI in train data\nprint(train_data['BIA-BIA_BMI'].mode())\n\n# describe the data of BIA-BIA_BMI\nprint(train_data['BIA-BIA_BMI'].describe())\n\n# kde plot of BIA-BIA_BMI\nsns.kdeplot(train_data['BIA-BIA_BMI'], shade=True)\nplt.show()","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2024-12-24T10:42:21.188576Z","iopub.execute_input":"2024-12-24T10:42:21.188977Z","iopub.status.idle":"2024-12-24T10:42:21.473604Z","shell.execute_reply.started":"2024-12-24T10:42:21.188940Z","shell.execute_reply":"2024-12-24T10:42:21.472659Z"}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"# fill the missing values in BIA-BIA_BMI in train_data with median\ntrain_data['BIA-BIA_BMI'].fillna(train_data['BIA-BIA_BMI'].median(), inplace=True)","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2024-12-24T10:42:21.474488Z","iopub.execute_input":"2024-12-24T10:42:21.474762Z","iopub.status.idle":"2024-12-24T10:42:21.481152Z","shell.execute_reply.started":"2024-12-24T10:42:21.474738Z","shell.execute_reply":"2024-12-24T10:42:21.480013Z"}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"# missing values in BIA-BIA_BMI in test data\nprint(test_data['BIA-BIA_BMI'].isnull().sum())\n\n#skewness of BIA-BIA_BMI in test data\nprint(test_data['BIA-BIA_BMI'].skew())\n\n#median of BIA-BIA_BMI in test data\nprint(test_data['BIA-BIA_BMI'].median())\n\n# mode of BIA-BIA_BMI in test data\nprint(test_data['BIA-BIA_BMI'].mode())\n\n# describe the data of BIA-BIA_BMI\nprint(test_data['BIA-BIA_BMI'].describe())\n\n# kde plot of BIA-BIA_BMI\nsns.kdeplot(test_data['BIA-BIA_BMI'], shade=True)\nplt.show()","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2024-12-24T10:42:21.482251Z","iopub.execute_input":"2024-12-24T10:42:21.482675Z","iopub.status.idle":"2024-12-24T10:42:21.727540Z","shell.execute_reply.started":"2024-12-24T10:42:21.482641Z","shell.execute_reply":"2024-12-24T10:42:21.726370Z"}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"# fill the missing values in BIA-BIA_BMI in test_data with median\ntest_data['BIA-BIA_BMI'].fillna(test_data['BIA-BIA_BMI'].median(), inplace=True)","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2024-12-24T10:42:21.728726Z","iopub.execute_input":"2024-12-24T10:42:21.729137Z","iopub.status.idle":"2024-12-24T10:42:21.734715Z","shell.execute_reply.started":"2024-12-24T10:42:21.729094Z","shell.execute_reply":"2024-12-24T10:42:21.733678Z"}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"# missing values in BIA-BIA_BMR in train data\nprint(train_data['BIA-BIA_BMR'].isnull().sum())\n\n#skewness of BIA-BIA_BMR in train data\nprint(train_data['BIA-BIA_BMR'].skew())\n\n#median of BIA-BIA_BMR in train data\nprint(train_data['BIA-BIA_BMR'].median())\n\n# mode of BIA-BIA_BMR in train data\nprint(train_data['BIA-BIA_BMR'].mode())\n\n# describe the data of BIA-BIA_BMR\nprint(train_data['BIA-BIA_BMR'].describe())\n\n# kde plot of BIA-BIA_BMR\nsns.kdeplot(train_data['BIA-BIA_BMR'], shade=True)\nplt.show()","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2024-12-24T10:42:21.736036Z","iopub.execute_input":"2024-12-24T10:42:21.736312Z","iopub.status.idle":"2024-12-24T10:42:22.011129Z","shell.execute_reply.started":"2024-12-24T10:42:21.736283Z","shell.execute_reply":"2024-12-24T10:42:22.010116Z"}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"# fill the missing values in BIA-BIA_BMR in train_data with median\ntrain_data['BIA-BIA_BMR'].fillna(train_data['BIA-BIA_BMR'].median(), inplace=True)","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2024-12-24T10:42:22.012083Z","iopub.execute_input":"2024-12-24T10:42:22.012388Z","iopub.status.idle":"2024-12-24T10:42:22.018331Z","shell.execute_reply.started":"2024-12-24T10:42:22.012362Z","shell.execute_reply":"2024-12-24T10:42:22.017256Z"}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"# missing values in BIA-BIA_BMR in test data\nprint(test_data['BIA-BIA_BMR'].isnull().sum())\n\n#skewness of BIA-BIA_BMR in test data\nprint(test_data['BIA-BIA_BMR'].skew())\n\n#median of BIA-BIA_BMR in test data\nprint(test_data['BIA-BIA_BMR'].median())\n\n# mode of BIA-BIA_BMR in test data\nprint(test_data['BIA-BIA_BMR'].mode())\n\n# describe the data of BIA-BIA_BMR\nprint(test_data['BIA-BIA_BMR'].describe())\n\n# kde plot of BIA-BIA_BMR\nsns.kdeplot(test_data['BIA-BIA_BMR'], shade=True)\nplt.show()","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2024-12-24T10:42:22.019584Z","iopub.execute_input":"2024-12-24T10:42:22.019998Z","iopub.status.idle":"2024-12-24T10:42:22.263639Z","shell.execute_reply.started":"2024-12-24T10:42:22.019957Z","shell.execute_reply":"2024-12-24T10:42:22.262729Z"}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"# fill the missing values in BIA-BIA_BMR in test_data with median\ntest_data['BIA-BIA_BMR'].fillna(test_data['BIA-BIA_BMR'].median(), inplace=True)","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2024-12-24T10:42:22.264618Z","iopub.execute_input":"2024-12-24T10:42:22.264883Z","iopub.status.idle":"2024-12-24T10:42:22.270337Z","shell.execute_reply.started":"2024-12-24T10:42:22.264860Z","shell.execute_reply":"2024-12-24T10:42:22.269569Z"}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"# missing values in BIA-BIA_DEE in train data\nprint(train_data['BIA-BIA_DEE'].isnull().sum())\n\n#skewness of BIA-BIA_DEE in train data\nprint(train_data['BIA-BIA_DEE'].skew())\n\n#median of BIA-BIA_DEE in train data\nprint(train_data['BIA-BIA_DEE'].median())\n\n# mode of BIA-BIA_DEE in train data\nprint(train_data['BIA-BIA_DEE'].mode())\n\n# describe the data of BIA-BIA_DEE\nprint(train_data['BIA-BIA_DEE'].describe())\n\n# kde plot of BIA-BIA_DEE\nsns.kdeplot(train_data['BIA-BIA_DEE'], shade=True)\nplt.show()","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2024-12-24T10:42:22.271512Z","iopub.execute_input":"2024-12-24T10:42:22.271895Z","iopub.status.idle":"2024-12-24T10:42:22.563706Z","shell.execute_reply.started":"2024-12-24T10:42:22.271857Z","shell.execute_reply":"2024-12-24T10:42:22.562589Z"}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"# fill the missing values in BIA-BIA_DEE in train_data with median\ntrain_data['BIA-BIA_DEE'].fillna(train_data['BIA-BIA_DEE'].median(), inplace=True)","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2024-12-24T10:42:22.564713Z","iopub.execute_input":"2024-12-24T10:42:22.565050Z","iopub.status.idle":"2024-12-24T10:42:22.571203Z","shell.execute_reply.started":"2024-12-24T10:42:22.565022Z","shell.execute_reply":"2024-12-24T10:42:22.570070Z"}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"# missing values in BIA-BIA_DEE in test data\nprint(test_data['BIA-BIA_DEE'].isnull().sum())\n\n#skewness of BIA-BIA_DEE in test data\nprint(test_data['BIA-BIA_DEE'].skew())\n\n#median of BIA-BIA_DEE in test data\nprint(test_data['BIA-BIA_DEE'].median())\n\n# mode of BIA-BIA_DEE in test data\nprint(test_data['BIA-BIA_DEE'].mode())\n\n# describe the data of BIA-BIA_DEE\nprint(test_data['BIA-BIA_DEE'].describe())\n\n# kde plot of BIA-BIA_DEE\nsns.kdeplot(test_data['BIA-BIA_DEE'], shade=True)\nplt.show()","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2024-12-24T10:42:22.572211Z","iopub.execute_input":"2024-12-24T10:42:22.572566Z","iopub.status.idle":"2024-12-24T10:42:22.823716Z","shell.execute_reply.started":"2024-12-24T10:42:22.572523Z","shell.execute_reply":"2024-12-24T10:42:22.822580Z"}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"# fill the missing values in BIA-BIA_DEE in test_data with median\ntest_data['BIA-BIA_DEE'].fillna(test_data['BIA-BIA_DEE'].median(), inplace=True)","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2024-12-24T10:42:22.824669Z","iopub.execute_input":"2024-12-24T10:42:22.825109Z","iopub.status.idle":"2024-12-24T10:42:22.831154Z","shell.execute_reply.started":"2024-12-24T10:42:22.825066Z","shell.execute_reply":"2024-12-24T10:42:22.830099Z"}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"# missing values in BIA-BIA_ECW in train data\nprint(train_data['BIA-BIA_ECW'].isnull().sum())\n\n#skewness of BIA-BIA_ECW in train data\nprint(train_data['BIA-BIA_ECW'].skew())\n\n#median of BIA-BIA_ECW in train data\nprint(train_data['BIA-BIA_ECW'].median())\n\n# mode of BIA-BIA_ECW in train data\nprint(train_data['BIA-BIA_ECW'].mode())\n\n# describe the data of BIA-BIA_ECW\nprint(train_data['BIA-BIA_ECW'].describe())\n\n# kde plot of BIA-BIA_ECW\nsns.kdeplot(train_data['BIA-BIA_ECW'], shade=True)","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2024-12-24T10:42:22.832208Z","iopub.execute_input":"2024-12-24T10:42:22.832532Z","iopub.status.idle":"2024-12-24T10:42:23.143986Z","shell.execute_reply.started":"2024-12-24T10:42:22.832498Z","shell.execute_reply":"2024-12-24T10:42:23.142862Z"}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"# fill the missing values in BIA-BIA_ECW in train_data with median\ntrain_data['BIA-BIA_ECW'].fillna(train_data['BIA-BIA_ECW'].median(), inplace=True)","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2024-12-24T10:42:23.145089Z","iopub.execute_input":"2024-12-24T10:42:23.145419Z","iopub.status.idle":"2024-12-24T10:42:23.151419Z","shell.execute_reply.started":"2024-12-24T10:42:23.145377Z","shell.execute_reply":"2024-12-24T10:42:23.150579Z"}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"# missing values in BIA-BIA_ECW in test data\nprint(test_data['BIA-BIA_ECW'].isnull().sum())\n\n#skewness of BIA-BIA_ECW in test data\nprint(test_data['BIA-BIA_ECW'].skew())\n\n#median of BIA-BIA_ECW in test data\nprint(test_data['BIA-BIA_ECW'].median())\n\n# mode of BIA-BIA_ECW in test data\nprint(test_data['BIA-BIA_ECW'].mode())\n\n# describe the data of BIA-BIA_ECW\nprint(test_data['BIA-BIA_ECW'].describe())\n\n# kde plot of BIA-BIA_ECW\nsns.kdeplot(test_data['BIA-BIA_ECW'], shade=True)","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2024-12-24T10:42:23.152578Z","iopub.execute_input":"2024-12-24T10:42:23.152923Z","iopub.status.idle":"2024-12-24T10:42:23.438899Z","shell.execute_reply.started":"2024-12-24T10:42:23.152895Z","shell.execute_reply":"2024-12-24T10:42:23.437778Z"}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"# fill the missing values in BIA-BIA_ECW in test_data with median\ntest_data['BIA-BIA_ECW'].fillna(test_data['BIA-BIA_ECW'].median(), inplace=True)","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2024-12-24T10:42:23.439877Z","iopub.execute_input":"2024-12-24T10:42:23.440189Z","iopub.status.idle":"2024-12-24T10:42:23.445727Z","shell.execute_reply.started":"2024-12-24T10:42:23.440164Z","shell.execute_reply":"2024-12-24T10:42:23.444824Z"}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"# missing values in BIA-BIA_FFM in train data\nprint(train_data['BIA-BIA_FFM'].isnull().sum())\n\n#skewness of BIA-BIA_FFM in train data\nprint(train_data['BIA-BIA_FFM'].skew())\n\n#median of BIA-BIA_FFM in train data\nprint(train_data['BIA-BIA_FFM'].median())\n\n# mode of BIA-BIA_FFM in train data\nprint(train_data['BIA-BIA_FFM'].mode())\n\n# describe the data of BIA-BIA_FFM\nprint(train_data['BIA-BIA_FFM'].describe())\n\n# kde plot of BIA-BIA_FFM\nsns.kdeplot(train_data['BIA-BIA_FFM'], shade=True)","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2024-12-24T10:42:23.446711Z","iopub.execute_input":"2024-12-24T10:42:23.447307Z","iopub.status.idle":"2024-12-24T10:42:23.767799Z","shell.execute_reply.started":"2024-12-24T10:42:23.447257Z","shell.execute_reply":"2024-12-24T10:42:23.766799Z"}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"#fill the missing values in BIA-BIA_FFM in train_data with median\ntrain_data['BIA-BIA_FFM'].fillna(train_data['BIA-BIA_FFM'].median(), inplace=True)","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2024-12-24T10:42:23.768897Z","iopub.execute_input":"2024-12-24T10:42:23.769334Z","iopub.status.idle":"2024-12-24T10:42:23.775943Z","shell.execute_reply.started":"2024-12-24T10:42:23.769296Z","shell.execute_reply":"2024-12-24T10:42:23.774857Z"}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"# missing values in BIA-BIA_FFM in test data    \nprint(test_data['BIA-BIA_FFM'].isnull().sum())\n\n#skewness of BIA-BIA_FFM in test data\nprint(test_data['BIA-BIA_FFM'].skew())\n\n#median of BIA-BIA_FFM in test data\nprint(test_data['BIA-BIA_FFM'].median())\n\n# mode of BIA-BIA_FFM in test data\nprint(test_data['BIA-BIA_FFM'].mode())\n\n# describe the data of BIA-BIA_FFM\nprint(test_data['BIA-BIA_FFM'].describe())\n\n# kde plot of BIA-BIA_FFM\nsns.kdeplot(test_data['BIA-BIA_FFM'], shade=True)","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2024-12-24T10:42:23.776992Z","iopub.execute_input":"2024-12-24T10:42:23.777340Z","iopub.status.idle":"2024-12-24T10:42:24.093117Z","shell.execute_reply.started":"2024-12-24T10:42:23.777297Z","shell.execute_reply":"2024-12-24T10:42:24.091919Z"}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"# fill the missing values in BIA-BIA_FFM in test_data with median\ntest_data['BIA-BIA_FFM'].fillna(test_data['BIA-BIA_FFM'].median(), inplace=True)","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2024-12-24T10:42:24.094168Z","iopub.execute_input":"2024-12-24T10:42:24.094616Z","iopub.status.idle":"2024-12-24T10:42:24.100792Z","shell.execute_reply.started":"2024-12-24T10:42:24.094575Z","shell.execute_reply":"2024-12-24T10:42:24.099790Z"}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"# missing values in BIA-BIA_FFMI in train data\nprint(train_data['BIA-BIA_FFMI'].isnull().sum())\n\n#skewness of BIA-BIA_FFMI in train data\nprint(train_data['BIA-BIA_FFMI'].skew())\n\n#median of BIA-BIA_FFMI in train data\nprint(train_data['BIA-BIA_FFMI'].median())\n\n# mode of BIA-BIA_FFMI in train data\nprint(train_data['BIA-BIA_FFMI'].mode())\n\n# describe the data of BIA-BIA_FFMI\nprint(train_data['BIA-BIA_FFMI'].describe())\n\n# kde plot of BIA-BIA_FFMI\nsns.kdeplot(train_data['BIA-BIA_FFMI'], shade=True)","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2024-12-24T10:42:24.102156Z","iopub.execute_input":"2024-12-24T10:42:24.102633Z","iopub.status.idle":"2024-12-24T10:42:24.559379Z","shell.execute_reply.started":"2024-12-24T10:42:24.102601Z","shell.execute_reply":"2024-12-24T10:42:24.558420Z"}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"# fill the missing values in BIA-BIA_FFMI in train_data with median\ntrain_data['BIA-BIA_FFMI'].fillna(train_data['BIA-BIA_FFMI'].median(), inplace=True)","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2024-12-24T10:42:24.560313Z","iopub.execute_input":"2024-12-24T10:42:24.560641Z","iopub.status.idle":"2024-12-24T10:42:24.566824Z","shell.execute_reply.started":"2024-12-24T10:42:24.560613Z","shell.execute_reply":"2024-12-24T10:42:24.565942Z"}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"# missing values in BIA-BIA_FFMI in test data\nprint(test_data['BIA-BIA_FFMI'].isnull().sum())\n\n#skewness of BIA-BIA_FFMI in test data\nprint(test_data['BIA-BIA_FFMI'].skew())\n\n#median of BIA-BIA_FFMI in test data\nprint(test_data['BIA-BIA_FFMI'].median())\n\n# mode of BIA-BIA_FFMI in test data\nprint(test_data['BIA-BIA_FFMI'].mode())\n\n# describe the data of BIA-BIA_FFMI\nprint(test_data['BIA-BIA_FFMI'].describe())\n\n# kde plot of BIA-BIA_FFMI\nsns.kdeplot(test_data['BIA-BIA_FFMI'], shade=True)","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2024-12-24T10:42:24.567745Z","iopub.execute_input":"2024-12-24T10:42:24.568005Z","iopub.status.idle":"2024-12-24T10:42:24.837334Z","shell.execute_reply.started":"2024-12-24T10:42:24.567982Z","shell.execute_reply":"2024-12-24T10:42:24.836369Z"}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"# fill the missing values in BIA-BIA_FFMI in test_data with median\ntest_data['BIA-BIA_FFMI'].fillna(test_data['BIA-BIA_FFMI'].median(), inplace=True)","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2024-12-24T10:42:24.838303Z","iopub.execute_input":"2024-12-24T10:42:24.838662Z","iopub.status.idle":"2024-12-24T10:42:24.844964Z","shell.execute_reply.started":"2024-12-24T10:42:24.838632Z","shell.execute_reply":"2024-12-24T10:42:24.843499Z"}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"# missing values in BIA-BIA_FMI in train data\nprint(train_data['BIA-BIA_FMI'].isnull().sum())\n\n#skewness of BIA-BIA_FMI in train data\nprint(train_data['BIA-BIA_FMI'].skew())\n\n#median of BIA-BIA_FMI in train data\nprint(train_data['BIA-BIA_FMI'].median())\n\n# mode of BIA-BIA_FMI in train data\nprint(train_data['BIA-BIA_FMI'].mode())\n\n# describe the data of BIA-BIA_FMI\nprint(train_data['BIA-BIA_FMI'].describe())\n\n# kde plot of BIA-BIA_FMI\nsns.kdeplot(train_data['BIA-BIA_FMI'], shade=True)","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2024-12-24T10:42:24.845955Z","iopub.execute_input":"2024-12-24T10:42:24.846214Z","iopub.status.idle":"2024-12-24T10:42:25.141711Z","shell.execute_reply.started":"2024-12-24T10:42:24.846190Z","shell.execute_reply":"2024-12-24T10:42:25.140592Z"}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"# fill the missing values in BIA-BIA_FMI in train_data with median\ntrain_data['BIA-BIA_FMI'].fillna(train_data['BIA-BIA_FMI'].median(), inplace=True)","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2024-12-24T10:42:25.142717Z","iopub.execute_input":"2024-12-24T10:42:25.143087Z","iopub.status.idle":"2024-12-24T10:42:25.148970Z","shell.execute_reply.started":"2024-12-24T10:42:25.143044Z","shell.execute_reply":"2024-12-24T10:42:25.147977Z"}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"# missing values in BIA-BIA_FMI in test data\nprint(test_data['BIA-BIA_FMI'].isnull().sum())\n\n#skewness of BIA-BIA_FMI in test data\nprint(test_data['BIA-BIA_FMI'].skew())\n\n#median of BIA-BIA_FMI in test data\nprint(test_data['BIA-BIA_FMI'].median())\n\n# mode of BIA-BIA_FMI in test data\nprint(test_data['BIA-BIA_FMI'].mode())\n\n# describe the data of BIA-BIA_FMI\nprint(test_data['BIA-BIA_FMI'].describe())\n\n# kde plot of BIA-BIA_FMI\nsns.kdeplot(test_data['BIA-BIA_FMI'], shade=True)","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2024-12-24T10:42:25.150195Z","iopub.execute_input":"2024-12-24T10:42:25.150658Z","iopub.status.idle":"2024-12-24T10:42:25.451504Z","shell.execute_reply.started":"2024-12-24T10:42:25.150618Z","shell.execute_reply":"2024-12-24T10:42:25.450353Z"}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"#fill the missing values in BIA-BIA_FMI in test_data with median\ntest_data['BIA-BIA_FMI'].fillna(test_data['BIA-BIA_FMI'].median(), inplace=True)","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2024-12-24T10:42:25.452815Z","iopub.execute_input":"2024-12-24T10:42:25.453204Z","iopub.status.idle":"2024-12-24T10:42:25.460143Z","shell.execute_reply.started":"2024-12-24T10:42:25.453173Z","shell.execute_reply":"2024-12-24T10:42:25.458669Z"}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"# missing values in BIA-BIA_Fat in train data\nprint(train_data['BIA-BIA_Fat'].isnull().sum())\n\n#skewness of BIA-BIA_Fat in train data\nprint(train_data['BIA-BIA_Fat'].skew())\n\n#median of BIA-BIA_Fat in train data\nprint(train_data['BIA-BIA_Fat'].median())\n\n# mode of BIA-BIA_Fat in train data\nprint(train_data['BIA-BIA_Fat'].mode())\n\n# describe the data of BIA-BIA_Fat\nprint(train_data['BIA-BIA_Fat'].describe())\n\n# kde plot of BIA-BIA_Fat\nsns.kdeplot(train_data['BIA-BIA_Fat'], shade=True)","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2024-12-24T10:42:25.461362Z","iopub.execute_input":"2024-12-24T10:42:25.461817Z","iopub.status.idle":"2024-12-24T10:42:25.761459Z","shell.execute_reply.started":"2024-12-24T10:42:25.461771Z","shell.execute_reply":"2024-12-24T10:42:25.760607Z"}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"# fill the missing values in BIA-BIA_Fat in train_data with median\ntrain_data['BIA-BIA_Fat'].fillna(train_data['BIA-BIA_Fat'].median(), inplace=True)","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2024-12-24T10:42:25.762618Z","iopub.execute_input":"2024-12-24T10:42:25.763011Z","iopub.status.idle":"2024-12-24T10:42:25.769382Z","shell.execute_reply.started":"2024-12-24T10:42:25.762971Z","shell.execute_reply":"2024-12-24T10:42:25.768422Z"}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"# missing values in BIA-BIA_Fat in test data\nprint(test_data['BIA-BIA_Fat'].isnull().sum())\n\n#skewness of BIA-BIA_Fat in test data\nprint(test_data['BIA-BIA_Fat'].skew())\n\n#median of BIA-BIA_Fat in test data\nprint(test_data['BIA-BIA_Fat'].median())\n\n# mode of BIA-BIA_Fat in test data\nprint(test_data['BIA-BIA_Fat'].mode())\n\n# describe the data of BIA-BIA_Fat\nprint(test_data['BIA-BIA_Fat'].describe())\n\n# kde plot of BIA-BIA_Fat\nsns.kdeplot(test_data['BIA-BIA_Fat'], shade=True)","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2024-12-24T10:42:25.770488Z","iopub.execute_input":"2024-12-24T10:42:25.770796Z","iopub.status.idle":"2024-12-24T10:42:26.081811Z","shell.execute_reply.started":"2024-12-24T10:42:25.770771Z","shell.execute_reply":"2024-12-24T10:42:26.080699Z"}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"# fill the missing values in BIA-BIA_Fat in test_data with median\ntest_data['BIA-BIA_Fat'].fillna(test_data['BIA-BIA_Fat'].median(), inplace=True)","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2024-12-24T10:42:26.083103Z","iopub.execute_input":"2024-12-24T10:42:26.083442Z","iopub.status.idle":"2024-12-24T10:42:26.089590Z","shell.execute_reply.started":"2024-12-24T10:42:26.083398Z","shell.execute_reply":"2024-12-24T10:42:26.088191Z"}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"# missing values in BIA-BIA_Frame_num in train data\nprint(train_data['BIA-BIA_Frame_num'].isnull().sum())\n\n#category in BIA-BIA_Frame_num in train data\nprint(train_data['BIA-BIA_Frame_num'].value_counts())","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2024-12-24T10:42:26.090733Z","iopub.execute_input":"2024-12-24T10:42:26.091120Z","iopub.status.idle":"2024-12-24T10:42:26.113391Z","shell.execute_reply.started":"2024-12-24T10:42:26.091089Z","shell.execute_reply":"2024-12-24T10:42:26.112240Z"}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"# fill n/a in 'BIA-BIA_Frame_num' with 4 in train_data\ntrain_data['BIA-BIA_Frame_num'].fillna(4, inplace=True)\n\n#value counts of BIA-BIA_Frame_num in train data\nprint(train_data['BIA-BIA_Frame_num'].value_counts())","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2024-12-24T10:42:26.114560Z","iopub.execute_input":"2024-12-24T10:42:26.114836Z","iopub.status.idle":"2024-12-24T10:42:26.136698Z","shell.execute_reply.started":"2024-12-24T10:42:26.114811Z","shell.execute_reply":"2024-12-24T10:42:26.135435Z"}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"# # missing values in BIA-BIA_Frame_num in test data\nprint(test_data['BIA-BIA_Frame_num'].isnull().sum())\n\n#category in BIA-BIA_Frame_num in test data\nprint(test_data['BIA-BIA_Frame_num'].value_counts())","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2024-12-24T10:42:26.138202Z","iopub.execute_input":"2024-12-24T10:42:26.138638Z","iopub.status.idle":"2024-12-24T10:42:26.158952Z","shell.execute_reply.started":"2024-12-24T10:42:26.138586Z","shell.execute_reply":"2024-12-24T10:42:26.157861Z"}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"# fill n/a in 'BIA-BIA_Frame_num' with 4 in test_data\ntest_data['BIA-BIA_Frame_num'].fillna(4, inplace=True)\n\n#value counts of BIA-BIA_Frame_num in test data\nprint(test_data['BIA-BIA_Frame_num'].value_counts())","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2024-12-24T10:42:26.160021Z","iopub.execute_input":"2024-12-24T10:42:26.160459Z","iopub.status.idle":"2024-12-24T10:42:26.179440Z","shell.execute_reply.started":"2024-12-24T10:42:26.160410Z","shell.execute_reply":"2024-12-24T10:42:26.178277Z"}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"# missing values in BIA-BIA_ICW in train data\nprint(train_data['BIA-BIA_ICW'].isnull().sum())\n\n#skewness of BIA-BIA_ICW in train data\nprint(train_data['BIA-BIA_ICW'].skew())\n\n#median of BIA-BIA_ICW in train data\nprint(train_data['BIA-BIA_ICW'].median())\n\n# mode of BIA-BIA_ICW in train data\nprint(train_data['BIA-BIA_ICW'].mode())\n\n# describe the data of BIA-BIA_ICW\nprint(train_data['BIA-BIA_ICW'].describe())\n\n# kde plot of BIA-BIA_ICW\nsns.kdeplot(train_data['BIA-BIA_ICW'], shade=True)","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2024-12-24T10:42:26.180749Z","iopub.execute_input":"2024-12-24T10:42:26.181150Z","iopub.status.idle":"2024-12-24T10:42:26.488876Z","shell.execute_reply.started":"2024-12-24T10:42:26.181112Z","shell.execute_reply":"2024-12-24T10:42:26.487655Z"}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"# fill the missing values in BIA-BIA_ICW in train_data with median\ntrain_data['BIA-BIA_ICW'].fillna(train_data['BIA-BIA_ICW'].median(), inplace=True)","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2024-12-24T10:42:26.489860Z","iopub.execute_input":"2024-12-24T10:42:26.490172Z","iopub.status.idle":"2024-12-24T10:42:26.497366Z","shell.execute_reply.started":"2024-12-24T10:42:26.490146Z","shell.execute_reply":"2024-12-24T10:42:26.496121Z"}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"# missing values in BIA-BIA_ICW in test data\nprint(test_data['BIA-BIA_ICW'].isnull().sum())\n\n#skewness of BIA-BIA_ICW in test data\nprint(test_data['BIA-BIA_ICW'].skew())\n\n#median, median, mode, describe of BIA-BIA_ICW in test data\nprint(test_data['BIA-BIA_ICW'].median())\nprint(test_data['BIA-BIA_ICW'].mode())\nprint(test_data['BIA-BIA_ICW'].describe())\n# kde plot of BIA-BIA_ICW\nsns.kdeplot(test_data['BIA-BIA_ICW'], shade=True)","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2024-12-24T10:42:26.498412Z","iopub.execute_input":"2024-12-24T10:42:26.498762Z","iopub.status.idle":"2024-12-24T10:42:26.803241Z","shell.execute_reply.started":"2024-12-24T10:42:26.498723Z","shell.execute_reply":"2024-12-24T10:42:26.802198Z"}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"# fill the missing values in BIA-BIA_ICW in test_data with median\ntest_data['BIA-BIA_ICW'].fillna(test_data['BIA-BIA_ICW'].median(), inplace=True)","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2024-12-24T10:42:26.804346Z","iopub.execute_input":"2024-12-24T10:42:26.804751Z","iopub.status.idle":"2024-12-24T10:42:26.810703Z","shell.execute_reply.started":"2024-12-24T10:42:26.804716Z","shell.execute_reply":"2024-12-24T10:42:26.809728Z"}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"# missing values in BIA-BIA_LDM in train data\nprint(train_data['BIA-BIA_LDM'].isnull().sum())\n\n#skewness of BIA-BIA_LDM in train data\nprint(train_data['BIA-BIA_LDM'].skew())\n\n#median of BIA-BIA_LDM in train data\nprint(train_data['BIA-BIA_LDM'].median())\n\n# mode of BIA-BIA_LDM in train data\nprint(train_data['BIA-BIA_LDM'].mode())\n\n# describe the data of BIA-BIA_LDM\nprint(train_data['BIA-BIA_LDM'].describe())\n\n# kde plot of BIA-BIA_LDM\nsns.kdeplot(train_data['BIA-BIA_LDM'], shade=True)","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2024-12-24T10:42:26.811629Z","iopub.execute_input":"2024-12-24T10:42:26.811888Z"}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"# fill the missing values in BIA-BIA_LDM in train_data with median\ntrain_data['BIA-BIA_LDM'].fillna(train_data['BIA-BIA_LDM'].median(), inplace=True)","metadata":{"trusted":true},"outputs":[],"execution_count":null},{"cell_type":"code","source":"# missing values in BIA-BIA_LDM in test data\nprint(test_data['BIA-BIA_LDM'].isnull().sum())\n\n#skewness of BIA-BIA_LDM in test data\nprint(test_data['BIA-BIA_LDM'].skew())\n\n#median of BIA-BIA_LDM in test data\nprint(test_data['BIA-BIA_LDM'].median())\n\n# mode of BIA-BIA_LDM in test data\nprint(test_data['BIA-BIA_LDM'].mode())\n\n# describe the data of BIA-BIA_LDM\nprint(test_data['BIA-BIA_LDM'].describe())\n\n# kde plot of BIA-BIA_LDM\nsns.kdeplot(test_data['BIA-BIA_LDM'], shade=True)","metadata":{"trusted":true},"outputs":[],"execution_count":null},{"cell_type":"code","source":"# fill the missing values in BIA-BIA_LDM in test_data with median\ntest_data['BIA-BIA_LDM'].fillna(test_data['BIA-BIA_LDM'].median(), inplace=True)","metadata":{"trusted":true},"outputs":[],"execution_count":null},{"cell_type":"code","source":"# missing values in BIA-BIA_LST in train data\nprint(train_data['BIA-BIA_LST'].isnull().sum())\n\n#skewness, mean, madian, mode, describe kde of BIA-BIA_LST in train data\nprint(train_data['BIA-BIA_LST'].skew())\nprint(train_data['BIA-BIA_LST'].median())\nprint(train_data['BIA-BIA_LST'].mode())\nprint(train_data['BIA-BIA_LST'].describe())\nsns.kdeplot(train_data['BIA-BIA_LST'], shade=True)\n","metadata":{"trusted":true},"outputs":[],"execution_count":null},{"cell_type":"code","source":"# fill the missing values in BIA-BIA_LST in train_data with median\ntrain_data['BIA-BIA_LST'].fillna(train_data['BIA-BIA_LST'].median(), inplace=True)","metadata":{"trusted":true},"outputs":[],"execution_count":null},{"cell_type":"code","source":"# missing values,skewness, mean, madian, mode, describe, kde in BIA-BIA_LST in test data\nprint(test_data['BIA-BIA_LST'].isnull().sum())\nprint(test_data['BIA-BIA_LST'].skew())\nprint(test_data['BIA-BIA_LST'].median())\nprint(test_data['BIA-BIA_LST'].mode())\nprint(test_data['BIA-BIA_LST'].describe())\nsns.kdeplot(test_data['BIA-BIA_LST'], shade=True)","metadata":{"trusted":true},"outputs":[],"execution_count":null},{"cell_type":"code","source":"# fill the missing values in BIA-BIA_LST in test_data with median\ntest_data['BIA-BIA_LST'].fillna(test_data['BIA-BIA_LST'].median(), inplace=True)","metadata":{"trusted":true},"outputs":[],"execution_count":null},{"cell_type":"code","source":"# missing values, skewness, madian, mode, describe, kde in BIA-BIA_SMM in train data\nprint(train_data['BIA-BIA_SMM'].isnull().sum())\nprint(train_data['BIA-BIA_SMM'].skew())\nprint(train_data['BIA-BIA_SMM'].median())\nprint(train_data['BIA-BIA_SMM'].mode())\nprint(train_data['BIA-BIA_SMM'].describe())\nsns.kdeplot(train_data['BIA-BIA_SMM'], shade=True)","metadata":{"trusted":true},"outputs":[],"execution_count":null},{"cell_type":"code","source":"# fill the missing values in BIA-BIA_SMM in train_data with median\ntrain_data['BIA-BIA_SMM'].fillna(train_data['BIA-BIA_SMM'].median(), inplace=True)","metadata":{"trusted":true},"outputs":[],"execution_count":null},{"cell_type":"code","source":"# missing values, skewness, madian, mode, describe, kde in BIA-BIA_SMM in test data\nprint(test_data['BIA-BIA_SMM'].isnull().sum())\nprint(test_data['BIA-BIA_SMM'].skew())\nprint(test_data['BIA-BIA_SMM'].median())\nprint(test_data['BIA-BIA_SMM'].mode())\nprint(test_data['BIA-BIA_SMM'].describe())\nsns.kdeplot(test_data['BIA-BIA_SMM'], shade=True)","metadata":{"trusted":true},"outputs":[],"execution_count":null},{"cell_type":"code","source":"# fill the missing values in BIA-BIA_SMM in test_data with median\ntest_data['BIA-BIA_SMM'].fillna(test_data['BIA-BIA_SMM'].median(), inplace=True)","metadata":{"trusted":true},"outputs":[],"execution_count":null},{"cell_type":"code","source":"# missing values, skewness, madian, mode, describe, kde in BIA-BIA_TBW in train data\nprint(train_data['BIA-BIA_TBW'].isnull().sum())\nprint(train_data['BIA-BIA_TBW'].skew())\nprint(train_data['BIA-BIA_TBW'].median())\nprint(train_data['BIA-BIA_TBW'].mode())\nprint(train_data['BIA-BIA_TBW'].describe())\nsns.kdeplot(train_data['BIA-BIA_TBW'], shade=True)","metadata":{"trusted":true},"outputs":[],"execution_count":null},{"cell_type":"code","source":"# fill the missing values in BIA-BIA_TBW in train_data with median\ntrain_data['BIA-BIA_TBW'].fillna(train_data['BIA-BIA_TBW'].median(), inplace=True)","metadata":{"trusted":true},"outputs":[],"execution_count":null},{"cell_type":"code","source":"# missing values, skewness, madian, mode, describe, kde in BIA-BIA_TBW in test data\nprint(test_data['BIA-BIA_TBW'].isnull().sum())\nprint(test_data['BIA-BIA_TBW'].skew())\nprint(test_data['BIA-BIA_TBW'].median())\nprint(test_data['BIA-BIA_TBW'].mode())\nprint(test_data['BIA-BIA_TBW'].describe())\nsns.kdeplot(test_data['BIA-BIA_TBW'], shade=True)","metadata":{"trusted":true},"outputs":[],"execution_count":null},{"cell_type":"code","source":"# fill the missing values in BIA-BIA_TBW in test_data with median\ntest_data['BIA-BIA_TBW'].fillna(test_data['BIA-BIA_TBW'].median(), inplace=True)","metadata":{"trusted":true},"outputs":[],"execution_count":null},{"cell_type":"code","source":"# missing values,\nprint(train_data['PAQ_A-Season'].isnull().sum())\n#category in PAQ_A-Season in train data\nprint(train_data['PAQ_A-Season'].value_counts())","metadata":{"trusted":true},"outputs":[],"execution_count":null},{"cell_type":"code","source":"# fill n/a in 'PAQ_A-Season' with 'Missing' in train_data\ntrain_data['PAQ_A-Season'].fillna('Missing', inplace=True)\n\n#value counts of PAQ_A-Season in train data\nprint(train_data['PAQ_A-Season'].value_counts())","metadata":{"trusted":true},"outputs":[],"execution_count":null},{"cell_type":"code","source":"# label encoding of PAQ_A-Season in train data\nlabel_encoder = LabelEncoder()\ntrain_data['PAQ_A-Season'] = label_encoder.fit_transform(train_data['PAQ_A-Season'])\n\n# missing values in PAQ_A-Season in train data\nprint(train_data['PAQ_A-Season'].isnull().sum())\n#category in PAQ_A-Season in train data\nprint(train_data['PAQ_A-Season'].value_counts())","metadata":{"trusted":true},"outputs":[],"execution_count":null},{"cell_type":"code","source":"# # missing values in PAQ_A-Season in test data\nprint(test_data['PAQ_A-Season'].isnull().sum())\n\n#category in PAQ_A-Season in test data\nprint(test_data['PAQ_A-Season'].value_counts())\n\n# fill n/a in 'PAQ_A-Season' with 'Missing' in test_data\ntest_data['PAQ_A-Season'].fillna('Missing', inplace=True)\n\n#value counts of PAQ_A-Season in test data\nprint(test_data['PAQ_A-Season'].value_counts())","metadata":{"trusted":true},"outputs":[],"execution_count":null},{"cell_type":"code","source":"# label encoding of PAQ_A-Season in test data\nlabel_encoder = LabelEncoder()\ntest_data['PAQ_A-Season'] = label_encoder.fit_transform(test_data['PAQ_A-Season'])\n\n# category in PAQ_A-Season in test data\nprint(test_data['PAQ_A-Season'].value_counts())","metadata":{"trusted":true},"outputs":[],"execution_count":null},{"cell_type":"code","source":"# missing values,skewness, median, mode, describe, kde in PAQ_A-PAQ_A_Total in train data\nprint(train_data['PAQ_A-PAQ_A_Total'].isnull().sum())\nprint(train_data['PAQ_A-PAQ_A_Total'].skew())\nprint(train_data['PAQ_A-PAQ_A_Total'].median())\nprint(train_data['PAQ_A-PAQ_A_Total'].mode())\nprint(train_data['PAQ_A-PAQ_A_Total'].describe())\nsns.kdeplot(train_data['PAQ_A-PAQ_A_Total'], shade=True)","metadata":{"trusted":true},"outputs":[],"execution_count":null},{"cell_type":"code","source":"# fill the missing values in PAQ_A-PAQ_A_Total in train_data with median\ntrain_data['PAQ_A-PAQ_A_Total'].fillna(train_data['PAQ_A-PAQ_A_Total'].median(), inplace=True)","metadata":{"trusted":true},"outputs":[],"execution_count":null},{"cell_type":"code","source":"# missing values,skeewness, median, mode, describe, kde in PAQ_A-PAQ_A_Total in test data\nprint(test_data['PAQ_A-PAQ_A_Total'].isnull().sum())\nprint(test_data['PAQ_A-PAQ_A_Total'].skew())\nprint(test_data['PAQ_A-PAQ_A_Total'].median())\nprint(test_data['PAQ_A-PAQ_A_Total'].mode())\nprint(test_data['PAQ_A-PAQ_A_Total'].describe())\nsns.kdeplot(test_data['PAQ_A-PAQ_A_Total'], shade=True)","metadata":{"trusted":true},"outputs":[],"execution_count":null},{"cell_type":"code","source":"# fill the missing values in PAQ_A-PAQ_A_Total in test_data with mean   \ntest_data['PAQ_A-PAQ_A_Total'].fillna(test_data['PAQ_A-PAQ_A_Total'].mean(), inplace=True)","metadata":{"trusted":true},"outputs":[],"execution_count":null},{"cell_type":"code","source":"# missing values in PAQ_C-Season in train data\nprint(train_data['PAQ_C-Season'].isnull().sum())\n#category   in PAQ_C-Season in train data\nprint(train_data['PAQ_C-Season'].value_counts())","metadata":{"trusted":true},"outputs":[],"execution_count":null},{"cell_type":"code","source":"# fill n/a in 'PAQ_C-Season' with 'Missing' in train_data\ntrain_data['PAQ_C-Season'].fillna('Missing', inplace=True)\n\n#value counts of PAQ_C-Season in train data\nprint(train_data['PAQ_C-Season'].value_counts())\n\n#label encoding of PAQ_C-Season in train data\nlabel_encoder = LabelEncoder()\ntrain_data['PAQ_C-Season'] = label_encoder.fit_transform(train_data['PAQ_C-Season'])\n\n# category in PAQ_C-Season in train data\nprint(train_data['PAQ_C-Season'].value_counts())","metadata":{"trusted":true},"outputs":[],"execution_count":null},{"cell_type":"code","source":"# missing values in PAQ_C-Season in test data\nprint(test_data['PAQ_C-Season'].isnull().sum())\n\n#category in PAQ_C-Season in test data\nprint(test_data['PAQ_C-Season'].value_counts())\n\n# fill n/a in 'PAQ_C-Season' with 'Missing' in test_data\ntest_data['PAQ_C-Season'].fillna('Missing', inplace=True)\n\n#value counts of PAQ_C-Season in test data\nprint(test_data['PAQ_C-Season'].value_counts())\n\n# label encoding of PAQ_C-Season in test data\nlabel_encoder = LabelEncoder()\ntest_data['PAQ_C-Season'] = label_encoder.fit_transform(test_data['PAQ_C-Season'])\n\n# category in PAQ_C-Season in test data\nprint(test_data['PAQ_C-Season'].value_counts())","metadata":{"trusted":true},"outputs":[],"execution_count":null},{"cell_type":"code","source":"# missing values, skewness, median, mode, describe, kde in PAQ_C-PAQ_C_Total in train data\nprint(train_data['PAQ_C-PAQ_C_Total'].isnull().sum())\nprint(train_data['PAQ_C-PAQ_C_Total'].skew())\nprint(train_data['PAQ_C-PAQ_C_Total'].median())\nprint(train_data['PAQ_C-PAQ_C_Total'].mode())\nprint(train_data['PAQ_C-PAQ_C_Total'].describe())\nsns.kdeplot(train_data['PAQ_C-PAQ_C_Total'], shade=True)","metadata":{"trusted":true},"outputs":[],"execution_count":null},{"cell_type":"code","source":"# fill the missing values in PAQ_C-PAQ_C_Total in train_data with median\ntrain_data['PAQ_C-PAQ_C_Total'].fillna(train_data['PAQ_C-PAQ_C_Total'].median(), inplace=True)","metadata":{"trusted":true},"outputs":[],"execution_count":null},{"cell_type":"code","source":"# missing values, skewness, median, mode, describe, kde in PAQ_C-PAQ_C_Total in test data\nprint(test_data['PAQ_C-PAQ_C_Total'].isnull().sum())\nprint(test_data['PAQ_C-PAQ_C_Total'].skew())\nprint(test_data['PAQ_C-PAQ_C_Total'].median())\nprint(test_data['PAQ_C-PAQ_C_Total'].mode())\nprint(test_data['PAQ_C-PAQ_C_Total'].describe())\nsns.kdeplot(test_data['PAQ_C-PAQ_C_Total'], shade=True)","metadata":{"trusted":true},"outputs":[],"execution_count":null},{"cell_type":"code","source":"# fill the missing values in PAQ_C-PAQ_C_Total in test_data with median\ntest_data['PAQ_C-PAQ_C_Total'].fillna(test_data['PAQ_C-PAQ_C_Total'].median(), inplace=True)","metadata":{"trusted":true},"outputs":[],"execution_count":null},{"cell_type":"code","source":"# missing values, SDS-Season in train data\nprint(train_data['SDS-Season'].isnull().sum())  \n#category in SDS-Season in train data\nprint(train_data['SDS-Season'].value_counts())","metadata":{"trusted":true},"outputs":[],"execution_count":null},{"cell_type":"code","source":"# fill n/a in 'SDS-Season' with 'Missing' in train_data\ntrain_data['SDS-Season'].fillna('Missing', inplace=True)\n\n#value counts of SDS-Season in train data\nprint(train_data['SDS-Season'].value_counts())\n\n# label encoding of SDS-Season in train data\nlabel_encoder = LabelEncoder()\ntrain_data['SDS-Season'] = label_encoder.fit_transform(train_data['SDS-Season'])\n\n# category in SDS-Season in train data\nprint(train_data['SDS-Season'].value_counts())","metadata":{"trusted":true},"outputs":[],"execution_count":null},{"cell_type":"code","source":"# missing values in SDS-Season in test data\nprint(test_data['SDS-Season'].isnull().sum())\n\n#category in SDS-Season in test data\nprint(test_data['SDS-Season'].value_counts())\n\n# fill n/a in 'SDS-Season' with 'Missing' in test_data\ntest_data['SDS-Season'].fillna('Missing', inplace=True)\n\n#value counts of SDS-Season in test data\nprint(test_data['SDS-Season'].value_counts())\n\n# label encoding of SDS-Season in test data\nlabel_encoder = LabelEncoder()\ntest_data['SDS-Season'] = label_encoder.fit_transform(test_data['SDS-Season'])\n","metadata":{"trusted":true},"outputs":[],"execution_count":null},{"cell_type":"code","source":"# category in SDS-Season in test data\nprint(test_data['SDS-Season'].value_counts())","metadata":{"trusted":true},"outputs":[],"execution_count":null},{"cell_type":"code","source":"# missing values, skewness, median, mode, describe, kde in SDS-SDS_Total_Raw in train data\nprint(train_data['SDS-SDS_Total_Raw'].isnull().sum())\nprint(train_data['SDS-SDS_Total_Raw'].skew())\nprint(train_data['SDS-SDS_Total_Raw'].median())\nprint(train_data['SDS-SDS_Total_Raw'].mode())\nprint(train_data['SDS-SDS_Total_Raw'].describe())\nsns.kdeplot(train_data['SDS-SDS_Total_Raw'], shade=True)","metadata":{"trusted":true},"outputs":[],"execution_count":null},{"cell_type":"code","source":"# fill the missing values in SDS-SDS_Total_Raw in train_data with median\ntrain_data['SDS-SDS_Total_Raw'].fillna(train_data['SDS-SDS_Total_Raw'].median(), inplace=True)","metadata":{"trusted":true},"outputs":[],"execution_count":null},{"cell_type":"code","source":"# missing values, skewness,median, mode, describe, kde in SDS-SDS_Total_Raw in test data\nprint(test_data['SDS-SDS_Total_Raw'].isnull().sum())\nprint(test_data['SDS-SDS_Total_Raw'].skew())\nprint(test_data['SDS-SDS_Total_Raw'].median())\nprint(test_data['SDS-SDS_Total_Raw'].mode())\nprint(test_data['SDS-SDS_Total_Raw'].describe())\nsns.kdeplot(test_data['SDS-SDS_Total_Raw'], shade=True)","metadata":{"trusted":true},"outputs":[],"execution_count":null},{"cell_type":"code","source":"# fill the missing values in SDS-SDS_Total_Raw in test_data with median\ntest_data['SDS-SDS_Total_Raw'].fillna(test_data['SDS-SDS_Total_Raw'].median(), inplace=True)","metadata":{"trusted":true},"outputs":[],"execution_count":null},{"cell_type":"code","source":"# missing values, skewness, median, mode, describe, kde in SDS-SDS_Total_T in train data\nprint(train_data['SDS-SDS_Total_T'].isnull().sum())\nprint(train_data['SDS-SDS_Total_T'].skew())\nprint(train_data['SDS-SDS_Total_T'].median())\nprint(train_data['SDS-SDS_Total_T'].mode())\nprint(train_data['SDS-SDS_Total_T'].describe())\nsns.kdeplot(train_data['SDS-SDS_Total_T'], shade=True)\n","metadata":{"trusted":true},"outputs":[],"execution_count":null},{"cell_type":"code","source":"# fill the missing values in SDS-SDS_Total_T in train_data with median\ntrain_data['SDS-SDS_Total_T'].fillna(train_data['SDS-SDS_Total_T'].median(), inplace=True)","metadata":{"trusted":true},"outputs":[],"execution_count":null},{"cell_type":"code","source":"# missing values, skewness, mean, median, mode, describe, kde in SDS-SDS_Total_T in test data\nprint(test_data['SDS-SDS_Total_T'].isnull().sum())\nprint(test_data['SDS-SDS_Total_T'].skew())\nprint(test_data['SDS-SDS_Total_T'].mean())\nprint(test_data['SDS-SDS_Total_T'].median())\nprint(test_data['SDS-SDS_Total_T'].mode())\nprint(test_data['SDS-SDS_Total_T'].describe())\nsns.kdeplot(test_data['SDS-SDS_Total_T'], shade=True)","metadata":{"trusted":true},"outputs":[],"execution_count":null},{"cell_type":"code","source":"# fill the missing values in SDS-SDS_Total_T in test_data with median\ntest_data['SDS-SDS_Total_T'].fillna(test_data['SDS-SDS_Total_T'].median(), inplace=True)","metadata":{"trusted":true},"outputs":[],"execution_count":null},{"cell_type":"code","source":"# missing values in PreInt_EduHx-Season in train data\nprint(train_data['PreInt_EduHx-Season'].isnull().sum())\n#category in PreInt_EduHx-Season in train data\nprint(train_data['PreInt_EduHx-Season'].value_counts())","metadata":{"trusted":true},"outputs":[],"execution_count":null},{"cell_type":"code","source":"# fill n/a in 'PreInt_EduHx-Season' with 'Missing' in train_data\ntrain_data['PreInt_EduHx-Season'].fillna('Missing', inplace=True)\n\n#value counts of PreInt_EduHx-Season in train data\nprint(train_data['PreInt_EduHx-Season'].value_counts())\n\n# label encoding of PreInt_EduHx-Season in train data\nlabel_encoder = LabelEncoder()\ntrain_data['PreInt_EduHx-Season'] = label_encoder.fit_transform(train_data['PreInt_EduHx-Season'])  \n\n# category in PreInt_EduHx-Season in train data\nprint(train_data['PreInt_EduHx-Season'].value_counts())","metadata":{"trusted":true},"outputs":[],"execution_count":null},{"cell_type":"code","source":"# missing values in PreInt_EduHx-Season in test data\nprint(test_data['PreInt_EduHx-Season'].isnull().sum())\n\n#category in PreInt_EduHx-Season in test data\nprint(test_data['PreInt_EduHx-Season'].value_counts())","metadata":{"trusted":true},"outputs":[],"execution_count":null},{"cell_type":"code","source":"# fill n/a in 'PreInt_EduHx-Season' with 'Missing' in test_data\ntest_data['PreInt_EduHx-Season'].fillna('Missing', inplace=True)\n\n#value counts of PreInt_EduHx-Season in test data\nprint(test_data['PreInt_EduHx-Season'].value_counts())\n\n# label encoding of PreInt_EduHx-Season in test data\nlabel_encoder = LabelEncoder()\ntest_data['PreInt_EduHx-Season'] = label_encoder.fit_transform(test_data['PreInt_EduHx-Season'])\n\n# category in PreInt_EduHx-Season in test data\nprint(test_data['PreInt_EduHx-Season'].value_counts())","metadata":{"trusted":true},"outputs":[],"execution_count":null},{"cell_type":"code","source":"# missing values in PreInt_EduHx-computerinternet_hoursday in train data\nprint(train_data['PreInt_EduHx-computerinternet_hoursday'].isnull().sum())\n# category in PreInt_EduHx-computerinternet_hoursday in train data\nprint(train_data['PreInt_EduHx-computerinternet_hoursday'].value_counts())","metadata":{"trusted":true},"outputs":[],"execution_count":null},{"cell_type":"code","source":"# fill n/a in 'PreInt_EduHx-computerinternet_hoursday' with 4.0 train_data\ntrain_data['PreInt_EduHx-computerinternet_hoursday'].fillna(4.0, inplace=True)\n\n# category in PreInt_EduHx-computerinternet_hoursday in train data\nprint(train_data['PreInt_EduHx-computerinternet_hoursday'].value_counts())","metadata":{"trusted":true},"outputs":[],"execution_count":null},{"cell_type":"code","source":"# missing values in PreInt_EduHx-computerinternet_hoursday in test data\nprint(test_data['PreInt_EduHx-computerinternet_hoursday'].isnull().sum())\n\n# category in PreInt_EduHx-computerinternet_hoursday in test data\nprint(test_data['PreInt_EduHx-computerinternet_hoursday'].value_counts())","metadata":{"trusted":true},"outputs":[],"execution_count":null},{"cell_type":"code","source":"# fill n/a in 'PreInt_EduHx-computerinternet_hoursday' with 4.0 in test_data\ntest_data['PreInt_EduHx-computerinternet_hoursday'].fillna(4.0, inplace=True)\n\n# category in PreInt_EduHx-computerinternet_hoursday in test data\nprint(test_data['PreInt_EduHx-computerinternet_hoursday'].value_counts())","metadata":{"trusted":true},"outputs":[],"execution_count":null},{"cell_type":"code","source":"# missing values in 'sii' in train\nprint(train_data['sii'].isnull().sum())\n# category in sii in train data\nprint(train_data['sii'].value_counts())","metadata":{"trusted":true},"outputs":[],"execution_count":null},{"cell_type":"code","source":"# forward fill in 'sii' in train_data\ntrain_data['sii'].fillna(method='ffill', inplace=True)","metadata":{"trusted":true},"outputs":[],"execution_count":null},{"cell_type":"code","source":"# category in sii in train data\nprint(train_data['sii'].value_counts())","metadata":{"trusted":true},"outputs":[],"execution_count":null},{"cell_type":"code","source":"# missing values in sii in train data\nprint(train_data['sii'].isnull().sum())","metadata":{"trusted":true},"outputs":[],"execution_count":null},{"cell_type":"code","source":"# data type of 'sii' in train data\nprint(train_data['sii'].dtype)","metadata":{"trusted":true},"outputs":[],"execution_count":null},{"cell_type":"code","source":"# convert 'sii' from float to int in train data\ntrain_data['sii'] = train_data['sii'].astype(int)","metadata":{"trusted":true},"outputs":[],"execution_count":null},{"cell_type":"code","source":"# data type of 'sii' in train data\nprint(train_data['sii'].dtype)","metadata":{"trusted":true},"outputs":[],"execution_count":null},{"cell_type":"code","source":"# In the train data keep the columns which are present in test data and \"sii\" column and drop the rest\ntrain_data = train_data[test_data.columns.tolist() + ['sii']]\n# train data shape\nprint(train_data.shape)","metadata":{"trusted":true},"outputs":[],"execution_count":null},{"cell_type":"code","source":"# test data shape\nprint(test_data.shape)","metadata":{"trusted":true},"outputs":[],"execution_count":null},{"cell_type":"code","source":"# prepare the data for training\nfrom sklearn.model_selection import train_test_split\nX = train_data.drop(columns=[\"id\",\"sii\"]) \ny = train_data[\"sii\"]","metadata":{"trusted":true},"outputs":[],"execution_count":null},{"cell_type":"code","source":"# Split the data into training and validation sets\nX_train, X_valid, y_train, y_valid = train_test_split(X, y, test_size=0.2, random_state=42)","metadata":{"trusted":true},"outputs":[],"execution_count":null},{"cell_type":"code","source":"# Random Forest\nfrom sklearn.ensemble import RandomForestClassifier\nmodel = RandomForestClassifier(random_state=42)\n\n#grid search for optimal parameters\nfrom sklearn.model_selection import GridSearchCV\nparam_grid = {'n_estimators': range(100, 1000, 100)}\nmodel = GridSearchCV(RandomForestClassifier(random_state=42), param_grid, cv=5)","metadata":{"trusted":true},"outputs":[],"execution_count":null},{"cell_type":"code","source":"# fit the model\nmodel.fit(X_train, y_train)","metadata":{"trusted":true},"outputs":[],"execution_count":null},{"cell_type":"code","source":"# Validate the model\ny_pred = model.predict(X_valid)","metadata":{"trusted":true},"outputs":[],"execution_count":null},{"cell_type":"code","source":"# Calculate the cohen kappa score\nfrom sklearn.metrics import cohen_kappa_score\nkappa = cohen_kappa_score(y_valid, y_pred)\nprint(f\"Kappa: {kappa}\")","metadata":{"trusted":true},"outputs":[],"execution_count":null},{"cell_type":"code","source":"# Prepare the test data for predictions\nX_test = test_data.drop(columns=[\"id\"]) ","metadata":{"trusted":true},"outputs":[],"execution_count":null},{"cell_type":"code","source":"# X data show with all the columns in the test data with 10 rows in scrolable window \nXhd=X.head(10)  \ndisplay(HTML(Xhd.to_html()))","metadata":{"trusted":true},"outputs":[],"execution_count":null},{"cell_type":"code","source":"from IPython.display import display, HTML\nXhead = X_test.head(10)\ndisplay(HTML(Xhead.to_html()))","metadata":{"trusted":true},"outputs":[],"execution_count":null},{"cell_type":"code","source":"# check clumn with N/A values in X_test\nprint(X_test.isnull().sum())","metadata":{"trusted":true},"outputs":[],"execution_count":null},{"cell_type":"code","source":"# Make predictions on the test data\ntest_predictions = model.predict(X_test)","metadata":{"trusted":true},"outputs":[],"execution_count":null},{"cell_type":"code","source":"# Update the submission file with predictions\nsubmission_data[\"sii\"] = test_predictions","metadata":{"trusted":true},"outputs":[],"execution_count":null},{"cell_type":"code","source":"submission_file_path_updated = \"submission.csv\"\nsubmission_data.to_csv(submission_file_path_updated, index=False)\nprint(f\"Predictions saved to: {submission_file_path_updated}\")","metadata":{"trusted":true},"outputs":[],"execution_count":null}]}