{"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":"# 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","execution":{"iopub.status.busy":"2023-03-26T06:37:29.834405Z","iopub.execute_input":"2023-03-26T06:37:29.834784Z","iopub.status.idle":"2023-03-26T06:37:30.076613Z","shell.execute_reply.started":"2023-03-26T06:37:29.834752Z","shell.execute_reply":"2023-03-26T06:37:30.075761Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"defog = pd.read_csv(\"/kaggle/input/tlvmc-parkinsons-freezing-gait-prediction/defog_metadata.csv\")\npd.set_option('display.max_columns', None)\ndefog.head()","metadata":{"execution":{"iopub.status.busy":"2023-03-26T06:41:24.744983Z","iopub.execute_input":"2023-03-26T06:41:24.745447Z","iopub.status.idle":"2023-03-26T06:41:24.783730Z","shell.execute_reply.started":"2023-03-26T06:41:24.745390Z","shell.execute_reply":"2023-03-26T06:41:24.782605Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"day = pd.read_csv(\"/kaggle/input/tlvmc-parkinsons-freezing-gait-prediction/daily_metadata.csv\")\npd.set_option('display.max_columns', None)\nday.head()","metadata":{"execution":{"iopub.status.busy":"2023-03-26T06:41:43.525096Z","iopub.execute_input":"2023-03-26T06:41:43.525489Z","iopub.status.idle":"2023-03-26T06:41:43.543966Z","shell.execute_reply.started":"2023-03-26T06:41:43.525455Z","shell.execute_reply":"2023-03-26T06:41:43.542605Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"tas = pd.read_csv(\"/kaggle/input/tlvmc-parkinsons-freezing-gait-prediction/tasks.csv\")\npd.set_option('display.max_columns', None)\ntas.head()","metadata":{"execution":{"iopub.status.busy":"2023-03-26T06:41:55.744273Z","iopub.execute_input":"2023-03-26T06:41:55.745400Z","iopub.status.idle":"2023-03-26T06:41:55.768669Z","shell.execute_reply.started":"2023-03-26T06:41:55.745359Z","shell.execute_reply":"2023-03-26T06:41:55.767474Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"subj = pd.read_csv(\"/kaggle/input/tlvmc-parkinsons-freezing-gait-prediction/subjects.csv\")\npd.set_option('display.max_columns', None)\nsubj.head()","metadata":{"execution":{"iopub.status.busy":"2023-03-26T06:44:00.269078Z","iopub.execute_input":"2023-03-26T06:44:00.270274Z","iopub.status.idle":"2023-03-26T06:44:00.291636Z","shell.execute_reply.started":"2023-03-26T06:44:00.270200Z","shell.execute_reply":"2023-03-26T06:44:00.290518Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"import matplotlib.pyplot as plt\nimport seaborn as sns","metadata":{"execution":{"iopub.status.busy":"2023-03-26T06:46:37.070207Z","iopub.execute_input":"2023-03-26T06:46:37.070662Z","iopub.status.idle":"2023-03-26T06:46:37.076550Z","shell.execute_reply.started":"2023-03-26T06:46:37.070625Z","shell.execute_reply":"2023-03-26T06:46:37.074997Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"#Code by Puru Behl https://www.kaggle.com/accountstatus/mt-cars-data-analysis\n\nsns.distplot(subj['Age'])\nplt.axvline(subj['Age'].values.mean(), color='red', linestyle='dashed', linewidth=1)\nplt.title('Age Distribution');","metadata":{"execution":{"iopub.status.busy":"2023-03-26T06:46:42.740157Z","iopub.execute_input":"2023-03-26T06:46:42.741407Z","iopub.status.idle":"2023-03-26T06:46:42.963542Z","shell.execute_reply.started":"2023-03-26T06:46:42.741356Z","shell.execute_reply":"2023-03-26T06:46:42.962298Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"#Code by Puru Behl https://www.kaggle.com/accountstatus/mt-cars-data-analysis\n\nsns.distplot(subj['UPDRSIII_On'], color = 'g')\nplt.axvline(subj['UPDRSIII_On'].values.mean(), color='red', linestyle='dashed', linewidth=1)\nplt.title('Unified Parkinson s Disease Rating Scale score ON');","metadata":{"execution":{"iopub.status.busy":"2023-03-26T06:47:22.630619Z","iopub.execute_input":"2023-03-26T06:47:22.631051Z","iopub.status.idle":"2023-03-26T06:47:22.844212Z","shell.execute_reply.started":"2023-03-26T06:47:22.631011Z","shell.execute_reply":"2023-03-26T06:47:22.843014Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"plt.figure(figsize=(10, 6))\nplt.title('Unified Parkinson s Disease Rating Scale score OFF')\nsns.despine()\nsns.set_context(\"notebook\", font_scale=1.5, rc={\"lines.linewidth\": 2.5})\n\nsns.distplot(subj['UPDRSIII_Off'], hist=True, rug=False,norm_hist=True, color='yellow');","metadata":{"execution":{"iopub.status.busy":"2023-03-26T06:49:50.660130Z","iopub.execute_input":"2023-03-26T06:49:50.660558Z","iopub.status.idle":"2023-03-26T06:49:50.904710Z","shell.execute_reply.started":"2023-03-26T06:49:50.660523Z","shell.execute_reply":"2023-03-26T06:49:50.903343Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"!pip install pywaffle","metadata":{"execution":{"iopub.status.busy":"2023-03-26T06:51:57.609774Z","iopub.execute_input":"2023-03-26T06:51:57.610366Z","iopub.status.idle":"2023-03-26T06:52:15.274819Z","shell.execute_reply.started":"2023-03-26T06:51:57.610322Z","shell.execute_reply":"2023-03-26T06:52:15.273671Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"from pywaffle import Waffle\nimport random","metadata":{"execution":{"iopub.status.busy":"2023-03-26T06:52:30.609652Z","iopub.execute_input":"2023-03-26T06:52:30.610996Z","iopub.status.idle":"2023-03-26T06:52:30.628130Z","shell.execute_reply.started":"2023-03-26T06:52:30.610941Z","shell.execute_reply":"2023-03-26T06:52:30.626774Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"gender = subj[\"Sex\"].value_counts()","metadata":{"execution":{"iopub.status.busy":"2023-03-26T06:52:42.209760Z","iopub.execute_input":"2023-03-26T06:52:42.210872Z","iopub.status.idle":"2023-03-26T06:52:42.219983Z","shell.execute_reply.started":"2023-03-26T06:52:42.210830Z","shell.execute_reply":"2023-03-26T06:52:42.218764Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"plt.figure(\n    FigureClass=Waffle,\n    rows=5,\n    columns=10,\n    values=gender,\n    title={'label': 'Gender Distribution', 'loc': 'left'},\n    labels=[\"{}({})\".format(a, b) for a, b in zip(gender.index, gender) ],\n    # Set the position of the legend\n    legend={'loc': 'upper left', 'bbox_to_anchor': (1, 1)},\n    dpi=100\n)\nplt.show()","metadata":{"execution":{"iopub.status.busy":"2023-03-26T06:52:55.780010Z","iopub.execute_input":"2023-03-26T06:52:55.780456Z","iopub.status.idle":"2023-03-26T06:52:56.026213Z","shell.execute_reply.started":"2023-03-26T06:52:55.780419Z","shell.execute_reply":"2023-03-26T06:52:56.024559Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"eve = pd.read_csv(\"/kaggle/input/tlvmc-parkinsons-freezing-gait-prediction/events.csv\")\npd.set_option('display.max_columns', None)\neve.head()","metadata":{"execution":{"iopub.status.busy":"2023-03-26T06:53:11.469290Z","iopub.execute_input":"2023-03-26T06:53:11.469920Z","iopub.status.idle":"2023-03-26T06:53:11.495737Z","shell.execute_reply.started":"2023-03-26T06:53:11.469862Z","shell.execute_reply":"2023-03-26T06:53:11.494462Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"tdc = pd.read_csv(\"/kaggle/input/tlvmc-parkinsons-freezing-gait-prediction/tdcsfog_metadata.csv\")\npd.set_option('display.max_columns', None)\ntdc.head()","metadata":{"execution":{"iopub.status.busy":"2023-03-26T06:53:28.729166Z","iopub.execute_input":"2023-03-26T06:53:28.729623Z","iopub.status.idle":"2023-03-26T06:53:28.749534Z","shell.execute_reply.started":"2023-03-26T06:53:28.729575Z","shell.execute_reply":"2023-03-26T06:53:28.748601Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"train = pd.read_csv(\"/kaggle/input/tlvmc-parkinsons-freezing-gait-prediction/train/defog/68e7e02a47.csv\")\npd.set_option('display.max_columns', None)\ntrain.head()","metadata":{"execution":{"iopub.status.busy":"2023-03-26T06:53:42.339802Z","iopub.execute_input":"2023-03-26T06:53:42.340232Z","iopub.status.idle":"2023-03-26T06:53:42.655192Z","shell.execute_reply.started":"2023-03-26T06:53:42.340181Z","shell.execute_reply":"2023-03-26T06:53:42.654022Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"sns.distplot(train['StartHesitation'])\nplt.axvline(train['StartHesitation'].values.mean(), color='red', linestyle='dashed', linewidth=1)\nplt.title('Start Hesitation Distribution');","metadata":{"execution":{"iopub.status.busy":"2023-03-26T06:53:58.820559Z","iopub.execute_input":"2023-03-26T06:53:58.821655Z","iopub.status.idle":"2023-03-26T06:53:59.709763Z","shell.execute_reply.started":"2023-03-26T06:53:58.821596Z","shell.execute_reply":"2023-03-26T06:53:59.708613Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"plt.figure(figsize=(10, 6))\nplt.title('Walking Distribution')\nsns.despine()\nsns.set_context(\"notebook\", font_scale=1.5, rc={\"lines.linewidth\": 2.5})\n\nsns.distplot(train['Walking'], hist=True, rug=False,norm_hist=True, color='brown');","metadata":{"execution":{"iopub.status.busy":"2023-03-26T06:54:22.681605Z","iopub.execute_input":"2023-03-26T06:54:22.683171Z","iopub.status.idle":"2023-03-26T06:54:23.687688Z","shell.execute_reply.started":"2023-03-26T06:54:22.683120Z","shell.execute_reply":"2023-03-26T06:54:23.686483Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"plt.figure(figsize=(10, 6))\nplt.title('Turn Distribution')\nsns.despine()\nsns.set_context(\"notebook\", font_scale=1.5, rc={\"lines.linewidth\": 2.5})\n\nsns.distplot(train['Turn'], hist=True, rug=False,norm_hist=True, color='orange');","metadata":{"execution":{"iopub.status.busy":"2023-03-26T06:54:41.140322Z","iopub.execute_input":"2023-03-26T06:54:41.140723Z","iopub.status.idle":"2023-03-26T06:54:42.164996Z","shell.execute_reply.started":"2023-03-26T06:54:41.140687Z","shell.execute_reply":"2023-03-26T06:54:42.163349Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"","metadata":{"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"","metadata":{},"execution_count":null,"outputs":[]}]}