{"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 numpy as np # linear algebra\nimport pandas as pd # data processing, CSV file I/O (e.g. pd.read_csv)\nimport glob\nfrom tqdm import tqdm\nimport matplotlib.pyplot as plt\nimport seaborn as sns\nimport os","metadata":{"_uuid":"8f2839f25d086af736a60e9eeb907d3b93b6e0e5","_cell_guid":"b1076dfc-b9ad-4769-8c92-a6c4dae69d19","execution":{"iopub.status.busy":"2023-03-11T01:04:49.824375Z","iopub.execute_input":"2023-03-11T01:04:49.825195Z","iopub.status.idle":"2023-03-11T01:04:51.048480Z","shell.execute_reply.started":"2023-03-11T01:04:49.825098Z","shell.execute_reply":"2023-03-11T01:04:51.047367Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"BASE_DIR = \"/kaggle/input/tlvmc-parkinsons-freezing-gait-prediction\"","metadata":{"execution":{"iopub.status.busy":"2023-03-11T01:04:51.051051Z","iopub.execute_input":"2023-03-11T01:04:51.051892Z","iopub.status.idle":"2023-03-11T01:04:51.057409Z","shell.execute_reply.started":"2023-03-11T01:04:51.051832Z","shell.execute_reply":"2023-03-11T01:04:51.056185Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"defog_train_files = list(glob.glob(os.path.join(BASE_DIR, \"train\", \"defog\", \"*.csv\")))\ntdcs_train_files = list(glob.glob(os.path.join(BASE_DIR, \"train\", \"tdcsfog\", \"*.csv\")))\nnotype_train_files = list(glob.glob(os.path.join(BASE_DIR, \"train\", \"notype\", \"*.csv\")))\nlen(defog_train_files), len(tdcs_train_files), len(notype_train_files)","metadata":{"execution":{"iopub.status.busy":"2023-03-11T01:04:51.059539Z","iopub.execute_input":"2023-03-11T01:04:51.060015Z","iopub.status.idle":"2023-03-11T01:04:51.147728Z","shell.execute_reply.started":"2023-03-11T01:04:51.059965Z","shell.execute_reply":"2023-03-11T01:04:51.146378Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"for i, train_file in enumerate(tqdm(tdcs_train_files)):\n    train_df = pd.read_csv(train_file)\n    assert \"Task\" not in train_df.columns\n    assert \"Valid\" not in train_df.columns\npd.read_csv(tdcs_train_files[0]).head(1)","metadata":{"execution":{"iopub.status.busy":"2023-03-11T01:04:51.150427Z","iopub.execute_input":"2023-03-11T01:04:51.151526Z","iopub.status.idle":"2023-03-11T01:05:10.452276Z","shell.execute_reply.started":"2023-03-11T01:04:51.151468Z","shell.execute_reply":"2023-03-11T01:05:10.450993Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"for i, train_file in enumerate(tqdm(defog_train_files)):\n    train_df = pd.read_csv(train_file)\n    assert \"Task\" in train_df.columns\n    assert \"Valid\" in train_df.columns\npd.read_csv(defog_train_files[0]).head(1)","metadata":{"execution":{"iopub.status.busy":"2023-03-11T01:05:10.455086Z","iopub.execute_input":"2023-03-11T01:05:10.456310Z","iopub.status.idle":"2023-03-11T01:05:34.703446Z","shell.execute_reply.started":"2023-03-11T01:05:10.456256Z","shell.execute_reply":"2023-03-11T01:05:34.701994Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"notype_data = []\nfor i, train_file in enumerate(tqdm(notype_train_files)):\n    train_df = pd.read_csv(train_file)\n    assert \"Task\" in train_df.columns\n    assert \"Valid\" in train_df.columns\n    notype_data.append(train_df)\npd.read_csv(notype_train_files[0]).head(1)\nnotype_data_df = pd.concat(notype_data)","metadata":{"execution":{"iopub.status.busy":"2023-03-11T01:05:34.705219Z","iopub.execute_input":"2023-03-11T01:05:34.706538Z","iopub.status.idle":"2023-03-11T01:05:53.690648Z","shell.execute_reply.started":"2023-03-11T01:05:34.706495Z","shell.execute_reply":"2023-03-11T01:05:53.689330Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"notype_data_df.describe()","metadata":{"execution":{"iopub.status.busy":"2023-03-11T01:06:18.594435Z","iopub.execute_input":"2023-03-11T01:06:18.595678Z","iopub.status.idle":"2023-03-11T01:06:20.669562Z","shell.execute_reply.started":"2023-03-11T01:06:18.595618Z","shell.execute_reply":"2023-03-11T01:06:20.668381Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"from collections import Counter\nCounter(notype_data_df['Event'])","metadata":{"execution":{"iopub.status.busy":"2023-03-11T01:06:50.944296Z","iopub.execute_input":"2023-03-11T01:06:50.944729Z","iopub.status.idle":"2023-03-11T01:06:52.249773Z","shell.execute_reply.started":"2023-03-11T01:06:50.944691Z","shell.execute_reply":"2023-03-11T01:06:52.248587Z"},"trusted":true},"execution_count":null,"outputs":[]}]}