{"metadata":{"kernelspec":{"language":"python","display_name":"Python 3","name":"python3"},"language_info":{"pygments_lexer":"ipython3","nbconvert_exporter":"python","version":"3.6.4","file_extension":".py","codemirror_mode":{"name":"ipython","version":3},"name":"python","mimetype":"text/x-python"}},"nbformat_minor":4,"nbformat":4,"cells":[{"cell_type":"code","source":"import os\nimport random\nimport cv2\nimport pandas as pd\nimport numpy as np\nimport plotly.express as px\nimport matplotlib.pyplot as plt","metadata":{"_uuid":"8f2839f25d086af736a60e9eeb907d3b93b6e0e5","_cell_guid":"b1076dfc-b9ad-4769-8c92-a6c4dae69d19","execution":{"iopub.status.busy":"2023-03-10T07:14:56.033260Z","iopub.execute_input":"2023-03-10T07:14:56.033682Z","iopub.status.idle":"2023-03-10T07:14:56.983385Z","shell.execute_reply.started":"2023-03-10T07:14:56.033640Z","shell.execute_reply":"2023-03-10T07:14:56.981914Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"#Directory\nDATA_ROOT_DEFOG = '/kaggle/input/tlvmc-parkinsons-freezing-gait-prediction/train/defog/'\ndefog = pd.DataFrame()\nfor root, dirs, files in os.walk(DATA_ROOT_DEFOG):\n    for name in files:       \n        f = os.path.join(root, name)\n        df_list= pd.read_csv(f)\n        words = name.split('.')[0]\n        df_list['file']= name.split('.')[0]\n        defog = pd.concat([defog, df_list], axis=0)\ndefog\n       ","metadata":{"execution":{"iopub.status.busy":"2023-03-10T07:14:59.931515Z","iopub.execute_input":"2023-03-10T07:14:59.931919Z","iopub.status.idle":"2023-03-10T07:15:21.391203Z","shell.execute_reply.started":"2023-03-10T07:14:59.931881Z","shell.execute_reply":"2023-03-10T07:15:21.389731Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"defog.query(\"file== '06414383cf'\")","metadata":{"execution":{"iopub.status.busy":"2023-03-10T07:15:27.654627Z","iopub.execute_input":"2023-03-10T07:15:27.655074Z","iopub.status.idle":"2023-03-10T07:15:27.932994Z","shell.execute_reply.started":"2023-03-10T07:15:27.655031Z","shell.execute_reply":"2023-03-10T07:15:27.932140Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"#Directory\nDATA_ROOT_NOTYPE = '/kaggle/input/tlvmc-parkinsons-freezing-gait-prediction/train/notype/'\nnotype = pd.DataFrame()\nfor root, dirs, files in os.walk(DATA_ROOT_NOTYPE):\n    for name in files:        \n        f = os.path.join(root, name)\n        df_list= pd.read_csv(f)\n        words = name.split('.')[0]\n        df_list['file']= name.split('.')[0]\n        notype = pd.concat([notype, df_list], axis=0)\nnotype","metadata":{"execution":{"iopub.status.busy":"2023-03-10T07:15:33.882664Z","iopub.execute_input":"2023-03-10T07:15:33.883067Z","iopub.status.idle":"2023-03-10T07:15:43.807729Z","shell.execute_reply.started":"2023-03-10T07:15:33.883030Z","shell.execute_reply":"2023-03-10T07:15:43.806633Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"notype.query(\"file== '02ab235146'\")","metadata":{"execution":{"iopub.status.busy":"2023-03-10T07:15:48.195810Z","iopub.execute_input":"2023-03-10T07:15:48.196205Z","iopub.status.idle":"2023-03-10T07:15:48.433380Z","shell.execute_reply.started":"2023-03-10T07:15:48.196166Z","shell.execute_reply":"2023-03-10T07:15:48.431245Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"#Directory\nDATA_ROOT_TDCSFOG = '/kaggle/input/tlvmc-parkinsons-freezing-gait-prediction/train/tdcsfog/'\ntdcsfog = pd.DataFrame()\nfor root, dirs, files in os.walk(DATA_ROOT_TDCSFOG):\n    for name in files:       \n        f = os.path.join(root, name)\n        df_list= pd.read_csv(f)\n        words = name.split('.')[0]\n        df_list['file']= name.split('.')[0]\n        tdcsfog = pd.concat([tdcsfog, df_list], axis=0)\ntdcsfog\n       ","metadata":{"execution":{"iopub.status.busy":"2023-03-10T07:15:51.209282Z","iopub.execute_input":"2023-03-10T07:15:51.209692Z","iopub.status.idle":"2023-03-10T07:16:57.819099Z","shell.execute_reply.started":"2023-03-10T07:15:51.209655Z","shell.execute_reply":"2023-03-10T07:16:57.818105Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"tdcsfog.query(\"file== '003f117e14'\")","metadata":{"execution":{"iopub.status.busy":"2023-03-10T07:16:57.820598Z","iopub.execute_input":"2023-03-10T07:16:57.821566Z","iopub.status.idle":"2023-03-10T07:16:58.055541Z","shell.execute_reply.started":"2023-03-10T07:16:57.821529Z","shell.execute_reply":"2023-03-10T07:16:58.053667Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"defog_metadata = pd.read_csv(\"/kaggle/input/tlvmc-parkinsons-freezing-gait-prediction/defog_metadata.csv\")\ndefog_metadata","metadata":{"execution":{"iopub.status.busy":"2023-03-10T07:16:58.057941Z","iopub.execute_input":"2023-03-10T07:16:58.058433Z","iopub.status.idle":"2023-03-10T07:16:58.075993Z","shell.execute_reply.started":"2023-03-10T07:16:58.058383Z","shell.execute_reply":"2023-03-10T07:16:58.074257Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"daily_metadata = pd.read_csv(\"/kaggle/input/tlvmc-parkinsons-freezing-gait-prediction/daily_metadata.csv\")\ndaily_metadata","metadata":{"execution":{"iopub.status.busy":"2023-03-10T07:17:03.193037Z","iopub.execute_input":"2023-03-10T07:17:03.193359Z","iopub.status.idle":"2023-03-10T07:17:03.212417Z","shell.execute_reply.started":"2023-03-10T07:17:03.193326Z","shell.execute_reply":"2023-03-10T07:17:03.210965Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"defog_m= defog_metadata.merge(defog, how = 'inner', left_on = 'Id', right_on = 'file')\ndefog_m.drop(['file'], axis = 1, inplace = True)\ndefog_m","metadata":{"execution":{"iopub.status.busy":"2023-03-10T07:16:58.103684Z","iopub.execute_input":"2023-03-10T07:16:58.104029Z","iopub.status.idle":"2023-03-10T07:17:03.190686Z","shell.execute_reply.started":"2023-03-10T07:16:58.103998Z","shell.execute_reply":"2023-03-10T07:17:03.189344Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"defog_m.query(\"Subject== 'bf608b' and Id== '02ea782681' \")","metadata":{"execution":{"iopub.status.busy":"2023-03-10T07:17:38.324884Z","iopub.execute_input":"2023-03-10T07:17:38.325327Z","iopub.status.idle":"2023-03-10T07:17:38.834903Z","shell.execute_reply.started":"2023-03-10T07:17:38.325287Z","shell.execute_reply":"2023-03-10T07:17:38.833759Z"},"trusted":true},"execution_count":null,"outputs":[]}]}