{"metadata":{"kernelspec":{"language":"python","display_name":"Python 3","name":"python3"},"language_info":{"name":"python","version":"3.10.14","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"}],"dockerImageVersionId":30786,"isInternetEnabled":true,"language":"python","sourceType":"notebook","isGpuEnabled":false}},"nbformat_minor":4,"nbformat":4,"cells":[{"cell_type":"code","source":"# This Python 3 environment comes with many helpful analytics libraries installed\n# It is defined by the kaggle/python Docker image: https://github.com/kaggle/docker-python\n# For example, here's several helpful packages to load\n\nimport numpy as np # linear algebra\nimport pandas as pd # data processing, CSV file I/O (e.g. pd.read_csv)\n\n# Input data files are available in the read-only \"../input/\" directory\n# For example, running this (by clicking run or pressing Shift+Enter) will list all files under the input directory\n\nimport os\nfor dirname, _, filenames in os.walk('/kaggle/input'):\n    for filename in filenames:\n        print(os.path.join(dirname, filename))\n\n# You can write up to 20GB to the current directory (/kaggle/working/) that gets preserved as output when you create a version using \"Save & Run All\" \n# You can also write temporary files to /kaggle/temp/, but they won't be saved outside of the current session","metadata":{"_uuid":"8f2839f25d086af736a60e9eeb907d3b93b6e0e5","_cell_guid":"b1076dfc-b9ad-4769-8c92-a6c4dae69d19","trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"import pandas as pd\nimport numpy as np \nimport matplotlib.pyplot as plt","metadata":{"execution":{"iopub.status.busy":"2024-10-23T18:48:13.824657Z","iopub.execute_input":"2024-10-23T18:48:13.825443Z","iopub.status.idle":"2024-10-23T18:48:14.852367Z","shell.execute_reply.started":"2024-10-23T18:48:13.825386Z","shell.execute_reply":"2024-10-23T18:48:14.851230Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"df_train = pd.read_csv('/kaggle/input/child-mind-institute-problematic-internet-use/train.csv')\ndf_test = pd.read_csv('/kaggle/input/child-mind-institute-problematic-internet-use/test.csv')\ndf_dict = pd.read_csv('/kaggle/input/child-mind-institute-problematic-internet-use/data_dictionary.csv')","metadata":{"execution":{"iopub.status.busy":"2024-10-23T18:48:14.854431Z","iopub.execute_input":"2024-10-23T18:48:14.855117Z","iopub.status.idle":"2024-10-23T18:48:14.953632Z","shell.execute_reply.started":"2024-10-23T18:48:14.855064Z","shell.execute_reply":"2024-10-23T18:48:14.952486Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"df_dict.head(60)","metadata":{"execution":{"iopub.status.busy":"2024-10-23T18:48:20.964872Z","iopub.execute_input":"2024-10-23T18:48:20.965282Z","iopub.status.idle":"2024-10-23T18:48:20.996398Z","shell.execute_reply.started":"2024-10-23T18:48:20.965246Z","shell.execute_reply":"2024-10-23T18:48:20.994886Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"df_dict['Value Labels'].value_counts()","metadata":{"execution":{"iopub.status.busy":"2024-10-23T18:48:21.570829Z","iopub.execute_input":"2024-10-23T18:48:21.571258Z","iopub.status.idle":"2024-10-23T18:48:21.586315Z","shell.execute_reply.started":"2024-10-23T18:48:21.571220Z","shell.execute_reply":"2024-10-23T18:48:21.585138Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"df_dict['Description'].value_counts().head(60)","metadata":{"execution":{"iopub.status.busy":"2024-10-23T18:48:22.101972Z","iopub.execute_input":"2024-10-23T18:48:22.103067Z","iopub.status.idle":"2024-10-23T18:48:22.113225Z","shell.execute_reply.started":"2024-10-23T18:48:22.103019Z","shell.execute_reply":"2024-10-23T18:48:22.111994Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"Demographics => Basic_Demos-Sex => Sex of participant => 0=Male, 1=Female\n\n    CGAS-Season => Season of enrollment => Spring, Summer, Fall, Winter\nFitnessGram Child\t => FGC-FGC_CU_Zone => Curl up fitness zone => 0=Needs Improvement, 1=Healthy Fitness Zone\n\n    FGC-FGC_GSND_Zone => Grip Strength fitness zone (non-dominant) => 1=Weak, 2=Normal, 3=Strong\n    FGC-FGC_GSD_Zone => Grip Strength fitness zone (dominant) => 1=Weak, 2=Normal, 3=Strong\n    FGC-FGC_PU_Zone\t => Push-up fitness zon => 0=Needs Improvement, 1=Healthy Fitness Zone\n    FGC-FGC_SRL_Zone => Sit & Reach fitness zone (left side) => 0=Needs Improvement, 1=Healthy Fitness Zone\n    FGC-FGC_SRR_Zone => Sit & Reach fitness zone (right side) => 0=Needs Improvement, 1=Healthy Fitness Zone\n    FGC-FGC_TL_Zone => Trunk lift fitness zone => 0=Needs Improvement, 1=Healthy Fitness Zone\nBio-electric Impedance Analysis => BIA-BIA_Activity_Level_num => Activity Level => 1=Very Light, 2=Light, 3=Moderate, 4=Heavy, 5=Very Heavy\n\n    BIA-BIA_Frame_num => Body Frame => 1=Small, 2=Medium, 3=Large\nParent-Child Internet Addiction Test => PCIAT-PCIAT_01 => 0=Does Not Apply, 1=Rarely, 2=Occasionally, 3=Frequently, 4=Often, 5=Always\n   \n       PCIAT-PCIAT_Total => Total Score => Severity Impairment Index: 0-30=None; 31-49=Mild; 50-79=Moderate; 80-100=Severe\n\nInternet Use => PreInt_EduHx-computerinternet_hoursday => Hours of using computer/internet => 0=Less than 1h/day, 1=Around 1h/day, 2=Around 2hs/day, 3=More than 3hs/day ","metadata":{}},{"cell_type":"code","source":"df_dict.columns","metadata":{"execution":{"iopub.status.busy":"2024-10-23T18:48:24.906284Z","iopub.execute_input":"2024-10-23T18:48:24.906800Z","iopub.status.idle":"2024-10-23T18:48:24.916494Z","shell.execute_reply.started":"2024-10-23T18:48:24.906736Z","shell.execute_reply":"2024-10-23T18:48:24.915147Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"df_dict.tail(22)","metadata":{"execution":{"iopub.status.busy":"2024-10-23T18:48:25.520134Z","iopub.execute_input":"2024-10-23T18:48:25.520534Z","iopub.status.idle":"2024-10-23T18:48:25.536982Z","shell.execute_reply.started":"2024-10-23T18:48:25.520497Z","shell.execute_reply":"2024-10-23T18:48:25.535688Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"df_dict['Description'].value_counts().tail(22)","metadata":{"execution":{"iopub.status.busy":"2024-10-23T18:48:29.592387Z","iopub.execute_input":"2024-10-23T18:48:29.592781Z","iopub.status.idle":"2024-10-23T18:48:29.603154Z","shell.execute_reply.started":"2024-10-23T18:48:29.592740Z","shell.execute_reply":"2024-10-23T18:48:29.601820Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"df_train.head()","metadata":{"execution":{"iopub.status.busy":"2024-10-23T18:48:32.220494Z","iopub.execute_input":"2024-10-23T18:48:32.220938Z","iopub.status.idle":"2024-10-23T18:48:32.256522Z","shell.execute_reply.started":"2024-10-23T18:48:32.220885Z","shell.execute_reply":"2024-10-23T18:48:32.255464Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"df_train['PCIAT-PCIAT_Total'].value_counts()","metadata":{"execution":{"iopub.status.busy":"2024-10-23T18:48:34.641149Z","iopub.execute_input":"2024-10-23T18:48:34.642191Z","iopub.status.idle":"2024-10-23T18:48:34.653518Z","shell.execute_reply.started":"2024-10-23T18:48:34.642143Z","shell.execute_reply":"2024-10-23T18:48:34.652436Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"df_train['PCIAT-PCIAT_Total'].max()","metadata":{"execution":{"iopub.status.busy":"2024-10-23T18:48:37.308964Z","iopub.execute_input":"2024-10-23T18:48:37.309365Z","iopub.status.idle":"2024-10-23T18:48:37.318227Z","shell.execute_reply.started":"2024-10-23T18:48:37.309329Z","shell.execute_reply":"2024-10-23T18:48:37.316835Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"df_train['PCIAT-PCIAT_Total'].min()","metadata":{"execution":{"iopub.status.busy":"2024-10-23T18:48:39.185786Z","iopub.execute_input":"2024-10-23T18:48:39.186212Z","iopub.status.idle":"2024-10-23T18:48:39.194436Z","shell.execute_reply.started":"2024-10-23T18:48:39.186170Z","shell.execute_reply":"2024-10-23T18:48:39.193266Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"df_train['sii'].value_counts()","metadata":{"execution":{"iopub.status.busy":"2024-10-23T18:48:41.862811Z","iopub.execute_input":"2024-10-23T18:48:41.863553Z","iopub.status.idle":"2024-10-23T18:48:41.872969Z","shell.execute_reply.started":"2024-10-23T18:48:41.863503Z","shell.execute_reply":"2024-10-23T18:48:41.871718Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"df_train.shape","metadata":{"execution":{"iopub.status.busy":"2024-10-23T18:49:03.360432Z","iopub.execute_input":"2024-10-23T18:49:03.360858Z","iopub.status.idle":"2024-10-23T18:49:03.367946Z","shell.execute_reply.started":"2024-10-23T18:49:03.360771Z","shell.execute_reply":"2024-10-23T18:49:03.366889Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"df_train.columns","metadata":{"execution":{"iopub.status.busy":"2024-10-23T18:49:05.714850Z","iopub.execute_input":"2024-10-23T18:49:05.715846Z","iopub.status.idle":"2024-10-23T18:49:05.723069Z","shell.execute_reply.started":"2024-10-23T18:49:05.715798Z","shell.execute_reply":"2024-10-23T18:49:05.721869Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"df_train.describe()","metadata":{"execution":{"iopub.status.busy":"2024-10-23T18:49:10.144975Z","iopub.execute_input":"2024-10-23T18:49:10.145938Z","iopub.status.idle":"2024-10-23T18:49:10.297613Z","shell.execute_reply.started":"2024-10-23T18:49:10.145875Z","shell.execute_reply":"2024-10-23T18:49:10.296507Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"df_train.info()","metadata":{"execution":{"iopub.status.busy":"2024-10-23T18:49:10.632036Z","iopub.execute_input":"2024-10-23T18:49:10.632440Z","iopub.status.idle":"2024-10-23T18:49:10.658143Z","shell.execute_reply.started":"2024-10-23T18:49:10.632403Z","shell.execute_reply":"2024-10-23T18:49:10.657092Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"print(3960 - 2736)","metadata":{"execution":{"iopub.status.busy":"2024-10-23T18:49:20.667167Z","iopub.execute_input":"2024-10-23T18:49:20.667558Z","iopub.status.idle":"2024-10-23T18:49:20.673325Z","shell.execute_reply.started":"2024-10-23T18:49:20.667526Z","shell.execute_reply":"2024-10-23T18:49:20.672053Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"df_train['Fitness_Endurance-Season'].value_counts()","metadata":{"execution":{"iopub.status.busy":"2024-10-23T18:49:20.997618Z","iopub.execute_input":"2024-10-23T18:49:20.998610Z","iopub.status.idle":"2024-10-23T18:49:21.007502Z","shell.execute_reply.started":"2024-10-23T18:49:20.998566Z","shell.execute_reply":"2024-10-23T18:49:21.006310Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"df_train.isnull().sum()","metadata":{"execution":{"iopub.status.busy":"2024-10-23T18:49:25.770631Z","iopub.execute_input":"2024-10-23T18:49:25.771061Z","iopub.status.idle":"2024-10-23T18:49:25.783079Z","shell.execute_reply.started":"2024-10-23T18:49:25.771021Z","shell.execute_reply":"2024-10-23T18:49:25.781969Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"df_train.isnull().sum().sum()","metadata":{"execution":{"iopub.status.busy":"2024-10-23T18:49:26.524672Z","iopub.execute_input":"2024-10-23T18:49:26.525743Z","iopub.status.idle":"2024-10-23T18:49:26.535875Z","shell.execute_reply.started":"2024-10-23T18:49:26.525696Z","shell.execute_reply":"2024-10-23T18:49:26.534634Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"df_train['sii'].head()","metadata":{"execution":{"iopub.status.busy":"2024-10-23T18:49:27.385331Z","iopub.execute_input":"2024-10-23T18:49:27.385722Z","iopub.status.idle":"2024-10-23T18:49:27.394122Z","shell.execute_reply.started":"2024-10-23T18:49:27.385685Z","shell.execute_reply":"2024-10-23T18:49:27.392987Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"df_test.head()","metadata":{"execution":{"iopub.status.busy":"2024-10-23T18:50:34.428241Z","iopub.execute_input":"2024-10-23T18:50:34.428626Z","iopub.status.idle":"2024-10-23T18:50:34.455094Z","shell.execute_reply.started":"2024-10-23T18:50:34.428587Z","shell.execute_reply":"2024-10-23T18:50:34.453979Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"df_test.shape","metadata":{"execution":{"iopub.status.busy":"2024-10-23T18:51:22.798510Z","iopub.execute_input":"2024-10-23T18:51:22.798992Z","iopub.status.idle":"2024-10-23T18:51:22.805431Z","shell.execute_reply.started":"2024-10-23T18:51:22.798913Z","shell.execute_reply":"2024-10-23T18:51:22.804425Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"df_test.info()","metadata":{"execution":{"iopub.status.busy":"2024-10-23T18:51:34.110906Z","iopub.execute_input":"2024-10-23T18:51:34.111998Z","iopub.status.idle":"2024-10-23T18:51:34.126355Z","shell.execute_reply.started":"2024-10-23T18:51:34.111950Z","shell.execute_reply":"2024-10-23T18:51:34.124772Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"","metadata":{},"execution_count":null,"outputs":[]}]}