{"metadata":{"kernelspec":{"language":"python","display_name":"Python 3","name":"python3"},"language_info":{"name":"python","version":"3.10.13","mimetype":"text/x-python","codemirror_mode":{"name":"ipython","version":3},"pygments_lexer":"ipython3","nbconvert_exporter":"python","file_extension":".py"},"kaggle":{"accelerator":"none","dataSources":[{"sourceId":50160,"databundleVersionId":7602123,"sourceType":"competition"}],"dockerImageVersionId":30646,"isInternetEnabled":true,"language":"python","sourceType":"notebook","isGpuEnabled":false}},"nbformat_minor":4,"nbformat":4,"cells":[{"cell_type":"code","source":"import pandas as pd\nimport numpy as np\nimport seaborn as sns\nimport matplotlib.pyplot as plt","metadata":{"execution":{"iopub.status.busy":"2024-02-06T13:54:01.583092Z","iopub.execute_input":"2024-02-06T13:54:01.583519Z","iopub.status.idle":"2024-02-06T13:54:04.782438Z","shell.execute_reply.started":"2024-02-06T13:54:01.583488Z","shell.execute_reply":"2024-02-06T13:54:04.780875Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"import os\nfor dirname, _, filenames in os.walk('/kaggle/input'):\n    for filename in filenames:\n        print(os.path.join(dirname, filename))","metadata":{"execution":{"iopub.status.busy":"2024-02-06T13:54:09.951608Z","iopub.execute_input":"2024-02-06T13:54:09.952357Z","iopub.status.idle":"2024-02-06T13:54:09.990604Z","shell.execute_reply.started":"2024-02-06T13:54:09.952312Z","shell.execute_reply":"2024-02-06T13:54:09.989700Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"## train_base preview","metadata":{}},{"cell_type":"code","source":"train_base = pd.read_csv('/kaggle/input/home-credit-credit-risk-model-stability/csv_files/train/train_base.csv')","metadata":{"execution":{"iopub.status.busy":"2024-02-06T13:56:36.919377Z","iopub.execute_input":"2024-02-06T13:56:36.919788Z","iopub.status.idle":"2024-02-06T13:56:38.353865Z","shell.execute_reply.started":"2024-02-06T13:56:36.919757Z","shell.execute_reply":"2024-02-06T13:56:38.352140Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"train_base.head()","metadata":{"execution":{"iopub.status.busy":"2024-02-06T13:56:39.799983Z","iopub.execute_input":"2024-02-06T13:56:39.800429Z","iopub.status.idle":"2024-02-06T13:56:39.826244Z","shell.execute_reply.started":"2024-02-06T13:56:39.800397Z","shell.execute_reply":"2024-02-06T13:56:39.825359Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"train_base.info()","metadata":{"execution":{"iopub.status.busy":"2024-02-06T13:56:51.289872Z","iopub.execute_input":"2024-02-06T13:56:51.290326Z","iopub.status.idle":"2024-02-06T13:56:51.502012Z","shell.execute_reply.started":"2024-02-06T13:56:51.290292Z","shell.execute_reply":"2024-02-06T13:56:51.500904Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"pd.options.display.float_format = '{:.3f}'.format\ntrain_base.describe()","metadata":{"execution":{"iopub.status.busy":"2024-02-06T13:57:03.672976Z","iopub.execute_input":"2024-02-06T13:57:03.673603Z","iopub.status.idle":"2024-02-06T13:57:03.826336Z","shell.execute_reply.started":"2024-02-06T13:57:03.673565Z","shell.execute_reply":"2024-02-06T13:57:03.825200Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"train_base.WEEK_NUM.nunique()","metadata":{"execution":{"iopub.status.busy":"2024-02-06T13:57:14.369664Z","iopub.execute_input":"2024-02-06T13:57:14.370053Z","iopub.status.idle":"2024-02-06T13:57:14.388751Z","shell.execute_reply.started":"2024-02-06T13:57:14.370026Z","shell.execute_reply":"2024-02-06T13:57:14.387524Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"train_base.WEEK_NUM.unique()","metadata":{"execution":{"iopub.status.busy":"2024-02-06T13:58:11.474910Z","iopub.execute_input":"2024-02-06T13:58:11.475511Z","iopub.status.idle":"2024-02-06T13:58:11.491480Z","shell.execute_reply.started":"2024-02-06T13:58:11.475468Z","shell.execute_reply":"2024-02-06T13:58:11.490037Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"WEEK_NUM have 92 unique values.","metadata":{}},{"cell_type":"markdown","source":"## train_applprev_1","metadata":{}},{"cell_type":"code","source":"train_applprev_1_0 = pd.read_csv('/kaggle/input/home-credit-credit-risk-model-stability/csv_files/train/train_applprev_1_0.csv')\ntrain_applprev_1_1 = pd.read_csv('/kaggle/input/home-credit-credit-risk-model-stability/csv_files/train/train_applprev_1_1.csv')\ntrain_applprev_2 = pd.read_csv('/kaggle/input/home-credit-credit-risk-model-stability/csv_files/train/train_applprev_2.csv')","metadata":{"execution":{"iopub.status.busy":"2024-02-06T14:01:45.300559Z","iopub.execute_input":"2024-02-06T14:01:45.300998Z","iopub.status.idle":"2024-02-06T14:03:10.909524Z","shell.execute_reply.started":"2024-02-06T14:01:45.300969Z","shell.execute_reply":"2024-02-06T14:03:10.908250Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"train_applprev_1_0.head()","metadata":{"execution":{"iopub.status.busy":"2024-02-06T14:03:36.550973Z","iopub.execute_input":"2024-02-06T14:03:36.551634Z","iopub.status.idle":"2024-02-06T14:03:36.581381Z","shell.execute_reply.started":"2024-02-06T14:03:36.551595Z","shell.execute_reply":"2024-02-06T14:03:36.579172Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"print(f'{train_applprev_1_0.shape[0]} data exist')","metadata":{"execution":{"iopub.status.busy":"2024-02-06T14:03:41.901873Z","iopub.execute_input":"2024-02-06T14:03:41.902319Z","iopub.status.idle":"2024-02-06T14:03:41.907226Z","shell.execute_reply.started":"2024-02-06T14:03:41.902285Z","shell.execute_reply":"2024-02-06T14:03:41.906412Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"train_applprev_1_1.head()","metadata":{"execution":{"iopub.status.busy":"2024-02-06T14:03:52.091417Z","iopub.execute_input":"2024-02-06T14:03:52.091833Z","iopub.status.idle":"2024-02-06T14:03:52.116342Z","shell.execute_reply.started":"2024-02-06T14:03:52.091799Z","shell.execute_reply":"2024-02-06T14:03:52.115180Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"print(f'{train_applprev_1_1.shape[0]} data exist')","metadata":{"execution":{"iopub.status.busy":"2024-02-06T14:03:57.835782Z","iopub.execute_input":"2024-02-06T14:03:57.836196Z","iopub.status.idle":"2024-02-06T14:03:57.842110Z","shell.execute_reply.started":"2024-02-06T14:03:57.836166Z","shell.execute_reply":"2024-02-06T14:03:57.840862Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"train_applprev_1 = pd.concat([train_applprev_1_0, train_applprev_1_1])\nprint(f'{train_applprev_1.shape[0]} data exist')","metadata":{"execution":{"iopub.status.busy":"2024-02-06T14:05:12.503781Z","iopub.execute_input":"2024-02-06T14:05:12.504245Z","iopub.status.idle":"2024-02-06T14:05:15.778634Z","shell.execute_reply.started":"2024-02-06T14:05:12.504211Z","shell.execute_reply":"2024-02-06T14:05:15.777470Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"train_applprev_1.describe().T","metadata":{"execution":{"iopub.status.busy":"2024-02-06T14:05:29.020982Z","iopub.execute_input":"2024-02-06T14:05:29.021404Z","iopub.status.idle":"2024-02-06T14:05:36.514720Z","shell.execute_reply.started":"2024-02-06T14:05:29.021376Z","shell.execute_reply":"2024-02-06T14:05:36.513551Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"## train_applprev_2","metadata":{}},{"cell_type":"code","source":"train_applprev_2.head()","metadata":{"execution":{"iopub.status.busy":"2024-02-06T14:05:42.895421Z","iopub.execute_input":"2024-02-06T14:05:42.895821Z","iopub.status.idle":"2024-02-06T14:05:42.914506Z","shell.execute_reply.started":"2024-02-06T14:05:42.895793Z","shell.execute_reply":"2024-02-06T14:05:42.911838Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"train_applprev_2.shape[0]","metadata":{"execution":{"iopub.status.busy":"2024-02-06T14:05:52.056180Z","iopub.execute_input":"2024-02-06T14:05:52.058577Z","iopub.status.idle":"2024-02-06T14:05:52.069609Z","shell.execute_reply.started":"2024-02-06T14:05:52.058513Z","shell.execute_reply":"2024-02-06T14:05:52.067907Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"to be continued ...","metadata":{}},{"cell_type":"code","source":"","metadata":{},"execution_count":null,"outputs":[]}]}