{"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":{"execution":{"iopub.status.busy":"2023-03-10T14:40:54.529773Z","iopub.execute_input":"2023-03-10T14:40:54.530125Z","iopub.status.idle":"2023-03-10T14:40:57.662172Z","shell.execute_reply.started":"2023-03-10T14:40:54.530095Z","shell.execute_reply":"2023-03-10T14:40:57.660613Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"class color:\n   PURPLE = '\\033[95m'\n   CYAN = '\\033[96m'\n   DARKCYAN = '\\033[36m'\n   BLUE = '\\033[94m'\n   GREEN = '\\033[92m'\n   YELLOW = '\\033[93m'\n   RED = '\\033[91m'\n   BOLD = '\\033[1m'\n   UNDERLINE = '\\033[4m'\n   END = '\\033[0m'","metadata":{"execution":{"iopub.status.busy":"2023-03-10T14:40:57.664363Z","iopub.execute_input":"2023-03-10T14:40:57.664746Z","iopub.status.idle":"2023-03-10T14:40:57.675725Z","shell.execute_reply.started":"2023-03-10T14:40:57.664712Z","shell.execute_reply":"2023-03-10T14:40:57.671890Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"os.listdir(\"/kaggle/input/tlvmc-parkinsons-freezing-gait-prediction/train\")","metadata":{"execution":{"iopub.status.busy":"2023-03-10T14:40:57.680396Z","iopub.execute_input":"2023-03-10T14:40:57.681709Z","iopub.status.idle":"2023-03-10T14:40:57.701831Z","shell.execute_reply.started":"2023-03-10T14:40:57.681671Z","shell.execute_reply":"2023-03-10T14:40:57.700540Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"temp = len(os.listdir(\"/kaggle/input/tlvmc-parkinsons-freezing-gait-prediction/train/tdcsfog\"))\nprint(\n    f\"Number of files in folder tdcsfog/: {color.BLUE}{temp}{color.END}\",\n)","metadata":{"execution":{"iopub.status.busy":"2023-03-10T14:40:57.704137Z","iopub.execute_input":"2023-03-10T14:40:57.705674Z","iopub.status.idle":"2023-03-10T14:41:00.418493Z","shell.execute_reply.started":"2023-03-10T14:40:57.705637Z","shell.execute_reply":"2023-03-10T14:41:00.417210Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"train_tdcsfog_example_df = pd.read_csv(\"/kaggle/input/tlvmc-parkinsons-freezing-gait-prediction/train/tdcsfog/003f117e14.csv\")","metadata":{"execution":{"iopub.status.busy":"2023-03-10T14:41:00.419862Z","iopub.execute_input":"2023-03-10T14:41:00.420150Z","iopub.status.idle":"2023-03-10T14:41:00.447809Z","shell.execute_reply.started":"2023-03-10T14:41:00.420124Z","shell.execute_reply":"2023-03-10T14:41:00.446929Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"temp = len(train_tdcsfog_example_df)\nprint(\n    f\"Length of dataframe: {color.BLUE}{temp}{color.END}\",\n)","metadata":{"execution":{"iopub.status.busy":"2023-03-10T14:41:00.449057Z","iopub.execute_input":"2023-03-10T14:41:00.450263Z","iopub.status.idle":"2023-03-10T14:41:00.456524Z","shell.execute_reply.started":"2023-03-10T14:41:00.450211Z","shell.execute_reply":"2023-03-10T14:41:00.454798Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"train_tdcsfog_example_df.head()","metadata":{"execution":{"iopub.status.busy":"2023-03-10T14:41:00.458291Z","iopub.execute_input":"2023-03-10T14:41:00.459202Z","iopub.status.idle":"2023-03-10T14:41:00.488189Z","shell.execute_reply.started":"2023-03-10T14:41:00.459141Z","shell.execute_reply":"2023-03-10T14:41:00.486827Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"train_tdcsfog_example_df.describe()","metadata":{"execution":{"iopub.status.busy":"2023-03-10T14:41:00.489713Z","iopub.execute_input":"2023-03-10T14:41:00.490898Z","iopub.status.idle":"2023-03-10T14:41:00.533804Z","shell.execute_reply.started":"2023-03-10T14:41:00.490858Z","shell.execute_reply":"2023-03-10T14:41:00.532824Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"train_tdcsfog_example_df.tail()","metadata":{"execution":{"iopub.status.busy":"2023-03-10T14:41:00.534823Z","iopub.execute_input":"2023-03-10T14:41:00.535059Z","iopub.status.idle":"2023-03-10T14:41:00.547053Z","shell.execute_reply.started":"2023-03-10T14:41:00.535035Z","shell.execute_reply":"2023-03-10T14:41:00.545374Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"train_tdcsfog_example_df.hist()","metadata":{"execution":{"iopub.status.busy":"2023-03-10T14:43:16.359376Z","iopub.execute_input":"2023-03-10T14:43:16.359798Z","iopub.status.idle":"2023-03-10T14:43:17.070366Z","shell.execute_reply.started":"2023-03-10T14:43:16.359762Z","shell.execute_reply":"2023-03-10T14:43:17.069220Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"train_tdcsfog_example_df.isnull().sum()","metadata":{"execution":{"iopub.status.busy":"2023-03-10T14:41:00.551778Z","iopub.execute_input":"2023-03-10T14:41:00.552204Z","iopub.status.idle":"2023-03-10T14:41:00.563732Z","shell.execute_reply.started":"2023-03-10T14:41:00.552155Z","shell.execute_reply":"2023-03-10T14:41:00.562222Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"temp = len(os.listdir(\"/kaggle/input/tlvmc-parkinsons-freezing-gait-prediction/train/defog\"))\nprint(\n    f\"Number of files in folder defog/: {color.BLUE}{temp}{color.END}\",\n)","metadata":{"execution":{"iopub.status.busy":"2023-03-10T14:41:00.565552Z","iopub.execute_input":"2023-03-10T14:41:00.565901Z","iopub.status.idle":"2023-03-10T14:41:00.936711Z","shell.execute_reply.started":"2023-03-10T14:41:00.565841Z","shell.execute_reply":"2023-03-10T14:41:00.935171Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"temp = len(os.listdir(\"/kaggle/input/tlvmc-parkinsons-freezing-gait-prediction/train/notype\"))\nprint(\n    f\"Number of files in folder notype/: {color.BLUE}{temp}{color.END}\",\n)","metadata":{"execution":{"iopub.status.busy":"2023-03-10T14:41:00.938263Z","iopub.execute_input":"2023-03-10T14:41:00.938628Z","iopub.status.idle":"2023-03-10T14:41:01.113606Z","shell.execute_reply.started":"2023-03-10T14:41:00.938593Z","shell.execute_reply":"2023-03-10T14:41:01.112530Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"train_tdcsfog_example_df.columns","metadata":{"execution":{"iopub.status.busy":"2023-03-10T14:41:01.115076Z","iopub.execute_input":"2023-03-10T14:41:01.115962Z","iopub.status.idle":"2023-03-10T14:41:01.122009Z","shell.execute_reply.started":"2023-03-10T14:41:01.115923Z","shell.execute_reply":"2023-03-10T14:41:01.120745Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"corr_mat = np.round(train_tdcsfog_example_df.drop(\n    [\"StartHesitation\", \"Walking\"], axis=1\n).corr(), 3)\n\nfig = px.imshow(\n    corr_mat,\n    x=corr_mat.columns,\n    y=corr_mat.columns, \n    text_auto=True\n   )\nfig.update_xaxes(side=\"bottom\")\nfig.update_layout(\n    title={\n        'text': \"Correlation Matrix of edcsfog train instance\",\n        'y':0.95,\n        'x':0.5,\n        'xanchor': 'center',\n        'yanchor': 'top'\n    }\n)\n\nfig.show()","metadata":{"execution":{"iopub.status.busy":"2023-03-10T14:41:01.123190Z","iopub.execute_input":"2023-03-10T14:41:01.124273Z","iopub.status.idle":"2023-03-10T14:41:02.794937Z","shell.execute_reply.started":"2023-03-10T14:41:01.124233Z","shell.execute_reply":"2023-03-10T14:41:02.793811Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"os.listdir(\"/kaggle/input/tlvmc-parkinsons-freezing-gait-prediction/test\")","metadata":{"execution":{"iopub.status.busy":"2023-03-10T14:41:02.796811Z","iopub.execute_input":"2023-03-10T14:41:02.797208Z","iopub.status.idle":"2023-03-10T14:41:02.842035Z","shell.execute_reply.started":"2023-03-10T14:41:02.797170Z","shell.execute_reply":"2023-03-10T14:41:02.840876Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"temp = len(os.listdir(\"/kaggle/input/tlvmc-parkinsons-freezing-gait-prediction/test/tdcsfog\"))\nprint(\n    f\"Number of files in folder tdcsfog/: {color.BLUE}{temp}{color.END}\",\n)","metadata":{"execution":{"iopub.status.busy":"2023-03-10T14:41:02.843623Z","iopub.execute_input":"2023-03-10T14:41:02.843941Z","iopub.status.idle":"2023-03-10T14:41:02.857392Z","shell.execute_reply.started":"2023-03-10T14:41:02.843910Z","shell.execute_reply":"2023-03-10T14:41:02.856354Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"temp = len(os.listdir(\"/kaggle/input/tlvmc-parkinsons-freezing-gait-prediction/test/defog\"))\nprint(\n    f\"Number of files in folder defog/: {color.BLUE}{temp}{color.END}\",\n)","metadata":{"execution":{"iopub.status.busy":"2023-03-10T14:41:02.858846Z","iopub.execute_input":"2023-03-10T14:41:02.859389Z","iopub.status.idle":"2023-03-10T14:41:02.871618Z","shell.execute_reply.started":"2023-03-10T14:41:02.859346Z","shell.execute_reply":"2023-03-10T14:41:02.870057Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"test_tdcsfog_example_df = pd.read_csv(\"/kaggle/input/tlvmc-parkinsons-freezing-gait-prediction/test/tdcsfog/003f117e14.csv\")","metadata":{"execution":{"iopub.status.busy":"2023-03-10T14:41:02.873661Z","iopub.execute_input":"2023-03-10T14:41:02.874150Z","iopub.status.idle":"2023-03-10T14:41:02.895559Z","shell.execute_reply.started":"2023-03-10T14:41:02.874106Z","shell.execute_reply":"2023-03-10T14:41:02.894533Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"temp = len(test_tdcsfog_example_df)\nprint(\n    f\"Length of dataframe: {color.BLUE}{temp}{color.END}\",\n)","metadata":{"execution":{"iopub.status.busy":"2023-03-10T14:41:02.897121Z","iopub.execute_input":"2023-03-10T14:41:02.897786Z","iopub.status.idle":"2023-03-10T14:41:02.905189Z","shell.execute_reply.started":"2023-03-10T14:41:02.897743Z","shell.execute_reply":"2023-03-10T14:41:02.903055Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"test_tdcsfog_example_df.head()","metadata":{"execution":{"iopub.status.busy":"2023-03-10T14:41:02.907083Z","iopub.execute_input":"2023-03-10T14:41:02.907739Z","iopub.status.idle":"2023-03-10T14:41:02.925303Z","shell.execute_reply.started":"2023-03-10T14:41:02.907693Z","shell.execute_reply":"2023-03-10T14:41:02.923548Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"test_tdcsfog_example_df.describe()","metadata":{"execution":{"iopub.status.busy":"2023-03-10T14:41:02.926902Z","iopub.execute_input":"2023-03-10T14:41:02.927304Z","iopub.status.idle":"2023-03-10T14:41:02.955396Z","shell.execute_reply.started":"2023-03-10T14:41:02.927276Z","shell.execute_reply":"2023-03-10T14:41:02.954000Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"corr_mat = np.round(test_tdcsfog_example_df.corr(), 3)\n\nfig = px.imshow(\n    corr_mat,\n    x=corr_mat.columns,\n    y=corr_mat.columns, \n    text_auto=True\n   )\nfig.update_xaxes(side=\"bottom\")\nfig.update_layout(\n    title={\n        'text': \"Correlation Matrix of tdcsfog test instance\",\n        'y':0.95,\n        'x':0.5,\n        'xanchor': 'center',\n        'yanchor': 'top'\n    }\n)\n\nfig.show()","metadata":{"execution":{"iopub.status.busy":"2023-03-10T14:41:02.957032Z","iopub.execute_input":"2023-03-10T14:41:02.957484Z","iopub.status.idle":"2023-03-10T14:41:03.008514Z","shell.execute_reply.started":"2023-03-10T14:41:02.957409Z","shell.execute_reply":"2023-03-10T14:41:03.007517Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"temp = len(os.listdir(\"/kaggle/input/tlvmc-parkinsons-freezing-gait-prediction/unlabeled\"))\nprint(\n    f\"Number of files in folder unlabeled/: {color.BLUE}{temp}{color.END}\",\n)","metadata":{"execution":{"iopub.status.busy":"2023-03-10T14:41:03.010174Z","iopub.execute_input":"2023-03-10T14:41:03.011481Z","iopub.status.idle":"2023-03-10T14:41:03.211841Z","shell.execute_reply.started":"2023-03-10T14:41:03.011419Z","shell.execute_reply":"2023-03-10T14:41:03.210844Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"unlabeled_example_df = pd.read_parquet(\"/kaggle/input/tlvmc-parkinsons-freezing-gait-prediction/unlabeled/00c4c9313d.parquet\")","metadata":{"execution":{"iopub.status.busy":"2023-03-10T14:41:03.213519Z","iopub.execute_input":"2023-03-10T14:41:03.214404Z","iopub.status.idle":"2023-03-10T14:41:10.172972Z","shell.execute_reply.started":"2023-03-10T14:41:03.214364Z","shell.execute_reply":"2023-03-10T14:41:10.172179Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"unlabeled_example_df.head()","metadata":{"execution":{"iopub.status.busy":"2023-03-10T14:41:10.174059Z","iopub.execute_input":"2023-03-10T14:41:10.174420Z","iopub.status.idle":"2023-03-10T14:41:10.186778Z","shell.execute_reply.started":"2023-03-10T14:41:10.174385Z","shell.execute_reply":"2023-03-10T14:41:10.185753Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"unlabeled_example_df.describe()","metadata":{"execution":{"iopub.status.busy":"2023-03-10T14:41:10.188487Z","iopub.execute_input":"2023-03-10T14:41:10.188861Z","iopub.status.idle":"2023-03-10T14:41:15.768327Z","shell.execute_reply.started":"2023-03-10T14:41:10.188824Z","shell.execute_reply":"2023-03-10T14:41:15.767385Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"corr_mat = np.round(unlabeled_example_df.corr(), 3)\n\nfig = px.imshow(\n    corr_mat,\n    x=corr_mat.columns,\n    y=corr_mat.columns, \n    text_auto=True\n   )\nfig.update_xaxes(side=\"bottom\")\nfig.update_layout(\n    title={\n        'text': \"Correlation Matrix of unlabeled instance\",\n        'y':0.95,\n        'x':0.5,\n        'xanchor': 'center',\n        'yanchor': 'top'\n    }\n)\n\nfig.show()","metadata":{"execution":{"iopub.status.busy":"2023-03-10T14:41:15.769719Z","iopub.execute_input":"2023-03-10T14:41:15.770171Z","iopub.status.idle":"2023-03-10T14:41:18.898827Z","shell.execute_reply.started":"2023-03-10T14:41:15.770144Z","shell.execute_reply":"2023-03-10T14:41:18.897334Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"tdcsfog_metadata_df = pd.read_csv(\"/kaggle/input/tlvmc-parkinsons-freezing-gait-prediction/tdcsfog_metadata.csv\")","metadata":{"execution":{"iopub.status.busy":"2023-03-10T14:41:18.908542Z","iopub.execute_input":"2023-03-10T14:41:18.908928Z","iopub.status.idle":"2023-03-10T14:41:18.925926Z","shell.execute_reply.started":"2023-03-10T14:41:18.908895Z","shell.execute_reply":"2023-03-10T14:41:18.924056Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"tdcsfog_metadata_df.head()","metadata":{"execution":{"iopub.status.busy":"2023-03-10T14:41:18.927626Z","iopub.execute_input":"2023-03-10T14:41:18.928806Z","iopub.status.idle":"2023-03-10T14:41:18.972786Z","shell.execute_reply.started":"2023-03-10T14:41:18.928754Z","shell.execute_reply":"2023-03-10T14:41:18.971053Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"tdcsfog_metadata_df.describe()","metadata":{"execution":{"iopub.status.busy":"2023-03-10T14:41:18.974669Z","iopub.execute_input":"2023-03-10T14:41:18.975069Z","iopub.status.idle":"2023-03-10T14:41:18.996958Z","shell.execute_reply.started":"2023-03-10T14:41:18.975025Z","shell.execute_reply":"2023-03-10T14:41:18.995561Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"temp = len(tdcsfog_metadata_df)\nprint(\n    f\"Length of the tdcsfog_metadata.csv file is: {color.BLUE}{temp}{color.END}\",\n)","metadata":{"execution":{"iopub.status.busy":"2023-03-10T14:41:18.998695Z","iopub.execute_input":"2023-03-10T14:41:18.999038Z","iopub.status.idle":"2023-03-10T14:41:19.004030Z","shell.execute_reply.started":"2023-03-10T14:41:18.999007Z","shell.execute_reply":"2023-03-10T14:41:19.003207Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"temp = len(tdcsfog_metadata_df.Subject.unique())\nprint(\n    f\"Number of unique subjects: {color.BLUE}{temp}{color.END}\",\n)","metadata":{"execution":{"iopub.status.busy":"2023-03-10T14:41:19.004875Z","iopub.execute_input":"2023-03-10T14:41:19.005222Z","iopub.status.idle":"2023-03-10T14:41:19.023840Z","shell.execute_reply.started":"2023-03-10T14:41:19.005194Z","shell.execute_reply":"2023-03-10T14:41:19.022026Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"unique_subject_id = \"13abfd\"\ntdcsfog_metadata_df[tdcsfog_metadata_df.Subject == unique_subject_id]","metadata":{"execution":{"iopub.status.busy":"2023-03-10T14:41:19.026230Z","iopub.execute_input":"2023-03-10T14:41:19.026725Z","iopub.status.idle":"2023-03-10T14:41:19.044784Z","shell.execute_reply.started":"2023-03-10T14:41:19.026680Z","shell.execute_reply":"2023-03-10T14:41:19.043054Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"tdcsfog_metadata_df.isnull().sum()","metadata":{"execution":{"iopub.status.busy":"2023-03-10T14:41:19.046983Z","iopub.execute_input":"2023-03-10T14:41:19.047335Z","iopub.status.idle":"2023-03-10T14:41:19.054597Z","shell.execute_reply.started":"2023-03-10T14:41:19.047309Z","shell.execute_reply":"2023-03-10T14:41:19.053919Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"tdcsfog_visit_counts = tdcsfog_metadata_df.Visit.value_counts()\n\nfig = px.bar(x=tdcsfog_visit_counts.index, y=tdcsfog_visit_counts.values)\nfig.update_layout(xaxis_title=\"Visit\", yaxis_title=\"Count\")\nfig.show()","metadata":{"execution":{"iopub.status.busy":"2023-03-10T14:41:19.056658Z","iopub.execute_input":"2023-03-10T14:41:19.057237Z","iopub.status.idle":"2023-03-10T14:41:19.319636Z","shell.execute_reply.started":"2023-03-10T14:41:19.057196Z","shell.execute_reply":"2023-03-10T14:41:19.318870Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"tdcsfog_test_counts = tdcsfog_metadata_df.Test.value_counts()\n\nfig = px.bar(x=tdcsfog_test_counts.index, y=tdcsfog_test_counts.values)\nfig.update_layout(xaxis_title=\"Test\", yaxis_title=\"Count\")\nfig.show()","metadata":{"execution":{"iopub.status.busy":"2023-03-10T14:41:19.320791Z","iopub.execute_input":"2023-03-10T14:41:19.321058Z","iopub.status.idle":"2023-03-10T14:41:19.380379Z","shell.execute_reply.started":"2023-03-10T14:41:19.321033Z","shell.execute_reply":"2023-03-10T14:41:19.378575Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"tdcsfog_medication_counts = tdcsfog_metadata_df.Medication.value_counts()\n\nfig = px.bar(x=tdcsfog_medication_counts.index, y=tdcsfog_medication_counts.values)\nfig.update_layout(xaxis_title=\"Medication\", yaxis_title=\"Count\")\nfig.show()","metadata":{"execution":{"iopub.status.busy":"2023-03-10T14:41:19.381887Z","iopub.execute_input":"2023-03-10T14:41:19.382247Z","iopub.status.idle":"2023-03-10T14:41:19.438833Z","shell.execute_reply.started":"2023-03-10T14:41:19.382211Z","shell.execute_reply":"2023-03-10T14:41:19.437454Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"defog_metadata_df = pd.read_csv(\"/kaggle/input/tlvmc-parkinsons-freezing-gait-prediction/defog_metadata.csv\")","metadata":{"execution":{"iopub.status.busy":"2023-03-10T14:41:19.440208Z","iopub.execute_input":"2023-03-10T14:41:19.441199Z","iopub.status.idle":"2023-03-10T14:41:19.453632Z","shell.execute_reply.started":"2023-03-10T14:41:19.441161Z","shell.execute_reply":"2023-03-10T14:41:19.452101Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"defog_metadata_df.head()","metadata":{"execution":{"iopub.status.busy":"2023-03-10T14:41:19.455612Z","iopub.execute_input":"2023-03-10T14:41:19.457276Z","iopub.status.idle":"2023-03-10T14:41:19.467865Z","shell.execute_reply.started":"2023-03-10T14:41:19.457224Z","shell.execute_reply":"2023-03-10T14:41:19.466725Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"defog_metadata_df.isnull().sum()","metadata":{"execution":{"iopub.status.busy":"2023-03-10T14:41:19.469737Z","iopub.execute_input":"2023-03-10T14:41:19.470081Z","iopub.status.idle":"2023-03-10T14:41:19.479733Z","shell.execute_reply.started":"2023-03-10T14:41:19.470048Z","shell.execute_reply":"2023-03-10T14:41:19.478581Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"temp = len(defog_metadata_df)\nprint(\n    f\"Length of the defog_metadata.csv file is: {color.BLUE}{temp}{color.END}\",\n)","metadata":{"execution":{"iopub.status.busy":"2023-03-10T14:41:19.480940Z","iopub.execute_input":"2023-03-10T14:41:19.481214Z","iopub.status.idle":"2023-03-10T14:41:19.489158Z","shell.execute_reply.started":"2023-03-10T14:41:19.481189Z","shell.execute_reply":"2023-03-10T14:41:19.488316Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"temp = len(defog_metadata_df.Subject.unique())\nprint(\n    f\"Number of unique subjects: {color.BLUE}{temp}{color.END}\",\n)","metadata":{"execution":{"iopub.status.busy":"2023-03-10T14:41:19.490043Z","iopub.execute_input":"2023-03-10T14:41:19.491494Z","iopub.status.idle":"2023-03-10T14:41:19.504135Z","shell.execute_reply.started":"2023-03-10T14:41:19.491399Z","shell.execute_reply":"2023-03-10T14:41:19.502690Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"unique_subject_id = \"bf608b\"\ndefog_metadata_df[defog_metadata_df.Subject == unique_subject_id]","metadata":{"execution":{"iopub.status.busy":"2023-03-10T14:41:19.505579Z","iopub.execute_input":"2023-03-10T14:41:19.505893Z","iopub.status.idle":"2023-03-10T14:41:19.528538Z","shell.execute_reply.started":"2023-03-10T14:41:19.505863Z","shell.execute_reply":"2023-03-10T14:41:19.526687Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"defog_visit_counts = defog_metadata_df.Visit.value_counts()\n\nfig = px.bar(x=defog_visit_counts.index, y=defog_visit_counts.values)\nfig.update_layout(xaxis_title=\"Visit\", yaxis_title=\"Count\")\nfig.show()","metadata":{"execution":{"iopub.status.busy":"2023-03-10T14:41:19.530233Z","iopub.execute_input":"2023-03-10T14:41:19.531521Z","iopub.status.idle":"2023-03-10T14:41:19.586198Z","shell.execute_reply.started":"2023-03-10T14:41:19.531454Z","shell.execute_reply":"2023-03-10T14:41:19.584889Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"defog_medication_counts = defog_metadata_df.Medication.value_counts()\n\nfig = px.bar(x=defog_medication_counts.index, y=defog_medication_counts.values)\nfig.update_layout(xaxis_title=\"Medication\", yaxis_title=\"Count\")\nfig.show()","metadata":{"execution":{"iopub.status.busy":"2023-03-10T14:41:19.587552Z","iopub.execute_input":"2023-03-10T14:41:19.587935Z","iopub.status.idle":"2023-03-10T14:41:19.644387Z","shell.execute_reply.started":"2023-03-10T14:41:19.587896Z","shell.execute_reply":"2023-03-10T14:41:19.643484Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"daily_metadata_df = pd.read_csv(\"/kaggle/input/tlvmc-parkinsons-freezing-gait-prediction/daily_metadata.csv\")","metadata":{"execution":{"iopub.status.busy":"2023-03-10T14:41:19.645741Z","iopub.execute_input":"2023-03-10T14:41:19.646239Z","iopub.status.idle":"2023-03-10T14:41:19.660328Z","shell.execute_reply.started":"2023-03-10T14:41:19.646207Z","shell.execute_reply":"2023-03-10T14:41:19.658820Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"daily_metadata_df.head()","metadata":{"execution":{"iopub.status.busy":"2023-03-10T14:41:19.661987Z","iopub.execute_input":"2023-03-10T14:41:19.662320Z","iopub.status.idle":"2023-03-10T14:41:19.673616Z","shell.execute_reply.started":"2023-03-10T14:41:19.662286Z","shell.execute_reply":"2023-03-10T14:41:19.672504Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"daily_metadata_df.isnull().sum()","metadata":{"execution":{"iopub.status.busy":"2023-03-10T14:41:19.674636Z","iopub.execute_input":"2023-03-10T14:41:19.674908Z","iopub.status.idle":"2023-03-10T14:41:19.688851Z","shell.execute_reply.started":"2023-03-10T14:41:19.674881Z","shell.execute_reply":"2023-03-10T14:41:19.687892Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"temp = len(daily_metadata_df)\nprint(\n    f\"Length of the daily_metadata.csv file is: {color.BLUE}{temp}{color.END}\",\n)","metadata":{"execution":{"iopub.status.busy":"2023-03-10T14:41:19.690527Z","iopub.execute_input":"2023-03-10T14:41:19.690928Z","iopub.status.idle":"2023-03-10T14:41:19.700197Z","shell.execute_reply.started":"2023-03-10T14:41:19.690890Z","shell.execute_reply":"2023-03-10T14:41:19.698987Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"temp = len(daily_metadata_df.Subject.unique())\nprint(\n    f\"Number of unique subjects: {color.BLUE}{temp}{color.END}\",\n)","metadata":{"execution":{"iopub.status.busy":"2023-03-10T14:41:19.701577Z","iopub.execute_input":"2023-03-10T14:41:19.702866Z","iopub.status.idle":"2023-03-10T14:41:19.713100Z","shell.execute_reply.started":"2023-03-10T14:41:19.702807Z","shell.execute_reply":"2023-03-10T14:41:19.711447Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"daily_visit_counts = daily_metadata_df.Visit.value_counts()\n\nfig = px.bar(x=daily_visit_counts.index, y=daily_visit_counts.values)\nfig.update_layout(xaxis_title=\"Visit\", yaxis_title=\"Count\")\nfig.show()","metadata":{"execution":{"iopub.status.busy":"2023-03-10T14:41:19.715082Z","iopub.execute_input":"2023-03-10T14:41:19.715410Z","iopub.status.idle":"2023-03-10T14:41:19.773143Z","shell.execute_reply.started":"2023-03-10T14:41:19.715380Z","shell.execute_reply":"2023-03-10T14:41:19.772213Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"daily_bor_counts = daily_metadata_df[\"Beginning of recording [00:00-23:59]\"].value_counts()\n\nfig = px.bar(x=daily_bor_counts.index, y=daily_bor_counts.values)\nfig.update_layout(xaxis_title=\"Beginning of recording\", yaxis_title=\"Count\")\nfig.show()","metadata":{"execution":{"iopub.status.busy":"2023-03-10T14:41:19.774346Z","iopub.execute_input":"2023-03-10T14:41:19.774860Z","iopub.status.idle":"2023-03-10T14:41:19.835545Z","shell.execute_reply.started":"2023-03-10T14:41:19.774833Z","shell.execute_reply":"2023-03-10T14:41:19.834283Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"subjects_df = pd.read_csv(\"/kaggle/input/tlvmc-parkinsons-freezing-gait-prediction/subjects.csv\")","metadata":{"execution":{"iopub.status.busy":"2023-03-10T14:41:19.836963Z","iopub.execute_input":"2023-03-10T14:41:19.837323Z","iopub.status.idle":"2023-03-10T14:41:19.850691Z","shell.execute_reply.started":"2023-03-10T14:41:19.837296Z","shell.execute_reply":"2023-03-10T14:41:19.849495Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"subjects_df.head()","metadata":{"execution":{"iopub.status.busy":"2023-03-10T14:41:19.852145Z","iopub.execute_input":"2023-03-10T14:41:19.852408Z","iopub.status.idle":"2023-03-10T14:41:19.867993Z","shell.execute_reply.started":"2023-03-10T14:41:19.852383Z","shell.execute_reply":"2023-03-10T14:41:19.866715Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"subjects_df.isnull().sum()","metadata":{"execution":{"iopub.status.busy":"2023-03-10T14:41:19.869035Z","iopub.execute_input":"2023-03-10T14:41:19.869285Z","iopub.status.idle":"2023-03-10T14:41:19.880269Z","shell.execute_reply.started":"2023-03-10T14:41:19.869262Z","shell.execute_reply":"2023-03-10T14:41:19.879573Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"temp = len(subjects_df)\nprint(\n    f\"Length of the subjects.csv file is: {color.BLUE}{temp}{color.END}\",\n)","metadata":{"execution":{"iopub.status.busy":"2023-03-10T14:41:19.881100Z","iopub.execute_input":"2023-03-10T14:41:19.882406Z","iopub.status.idle":"2023-03-10T14:41:19.887297Z","shell.execute_reply.started":"2023-03-10T14:41:19.882380Z","shell.execute_reply":"2023-03-10T14:41:19.886342Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"temp = len(subjects_df.Subject.unique())\nprint(\n    f\"Number of unique subjects: {color.BLUE}{temp}{color.END}\",\n)","metadata":{"execution":{"iopub.status.busy":"2023-03-10T14:41:19.890387Z","iopub.execute_input":"2023-03-10T14:41:19.891612Z","iopub.status.idle":"2023-03-10T14:41:19.900119Z","shell.execute_reply.started":"2023-03-10T14:41:19.891571Z","shell.execute_reply":"2023-03-10T14:41:19.898941Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"subjects_visit_counts = subjects_df.Visit.value_counts()\n\nfig = px.bar(x=subjects_visit_counts.index, y=subjects_visit_counts.values)\nfig.update_layout(xaxis_title=\"Visit\", yaxis_title=\"Count\")\nfig.show()","metadata":{"execution":{"iopub.status.busy":"2023-03-10T14:41:19.901549Z","iopub.execute_input":"2023-03-10T14:41:19.902384Z","iopub.status.idle":"2023-03-10T14:41:19.961550Z","shell.execute_reply.started":"2023-03-10T14:41:19.902348Z","shell.execute_reply":"2023-03-10T14:41:19.960365Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"fig = px.histogram(subjects_df, x=\"Age\", nbins=30)\nfig.show()","metadata":{"execution":{"iopub.status.busy":"2023-03-10T14:41:19.963230Z","iopub.execute_input":"2023-03-10T14:41:19.963642Z","iopub.status.idle":"2023-03-10T14:41:20.054363Z","shell.execute_reply.started":"2023-03-10T14:41:19.963604Z","shell.execute_reply":"2023-03-10T14:41:20.052642Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"subjects_sex_counts = subjects_df.Sex.value_counts()\n\nfig = px.bar(x=subjects_sex_counts.index, y=subjects_sex_counts.values)\nfig.update_layout(xaxis_title=\"Sex\", yaxis_title=\"Count\")\nfig.show()","metadata":{"execution":{"iopub.status.busy":"2023-03-10T14:41:20.055811Z","iopub.execute_input":"2023-03-10T14:41:20.056476Z","iopub.status.idle":"2023-03-10T14:41:20.112005Z","shell.execute_reply.started":"2023-03-10T14:41:20.056422Z","shell.execute_reply":"2023-03-10T14:41:20.110477Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"fig = px.histogram(subjects_df, x=\"YearsSinceDx\", nbins=30)\nfig.show()","metadata":{"execution":{"iopub.status.busy":"2023-03-10T14:41:20.113271Z","iopub.execute_input":"2023-03-10T14:41:20.114075Z","iopub.status.idle":"2023-03-10T14:41:20.167190Z","shell.execute_reply.started":"2023-03-10T14:41:20.114039Z","shell.execute_reply":"2023-03-10T14:41:20.165741Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"fig = px.histogram(subjects_df, x=\"UPDRSIII_On\", nbins=30)\nfig.show()","metadata":{"execution":{"iopub.status.busy":"2023-03-10T14:41:20.169340Z","iopub.execute_input":"2023-03-10T14:41:20.170778Z","iopub.status.idle":"2023-03-10T14:41:20.222499Z","shell.execute_reply.started":"2023-03-10T14:41:20.170727Z","shell.execute_reply":"2023-03-10T14:41:20.221113Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"fig = px.histogram(subjects_df, x=\"NFOGQ\", nbins=20)\nfig.show()","metadata":{"execution":{"iopub.status.busy":"2023-03-10T14:41:20.223752Z","iopub.execute_input":"2023-03-10T14:41:20.224099Z","iopub.status.idle":"2023-03-10T14:41:20.275553Z","shell.execute_reply.started":"2023-03-10T14:41:20.224064Z","shell.execute_reply":"2023-03-10T14:41:20.274355Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"corr_mat = np.round(subjects_df.corr(), 3)\n\nfig = px.imshow(\n    corr_mat,\n    x=corr_mat.columns,\n    y=corr_mat.columns, \n    text_auto=True\n   )\nfig.update_xaxes(side=\"bottom\")\nfig.update_layout(\n    title={\n        'text': \"Correlation Matrix of sybjects features\",\n        'y':0.95,\n        'x':0.5,\n        'xanchor': 'center',\n        'yanchor': 'top'\n    }\n)\n\nfig.show()","metadata":{"execution":{"iopub.status.busy":"2023-03-10T14:41:20.277080Z","iopub.execute_input":"2023-03-10T14:41:20.277749Z","iopub.status.idle":"2023-03-10T14:41:20.327778Z","shell.execute_reply.started":"2023-03-10T14:41:20.277714Z","shell.execute_reply":"2023-03-10T14:41:20.326646Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"events_df = pd.read_csv(\"/kaggle/input/tlvmc-parkinsons-freezing-gait-prediction/events.csv\")","metadata":{"execution":{"iopub.status.busy":"2023-03-10T14:41:20.329091Z","iopub.execute_input":"2023-03-10T14:41:20.329468Z","iopub.status.idle":"2023-03-10T14:41:20.347113Z","shell.execute_reply.started":"2023-03-10T14:41:20.329414Z","shell.execute_reply":"2023-03-10T14:41:20.345671Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"events_df.head()","metadata":{"execution":{"iopub.status.busy":"2023-03-10T14:41:20.350300Z","iopub.execute_input":"2023-03-10T14:41:20.350624Z","iopub.status.idle":"2023-03-10T14:41:20.364125Z","shell.execute_reply.started":"2023-03-10T14:41:20.350598Z","shell.execute_reply":"2023-03-10T14:41:20.362465Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"temp = len(events_df)\nprint(\n    f\"Length of the events.csv file is: {color.BLUE}{temp}{color.END}\",\n)","metadata":{"execution":{"iopub.status.busy":"2023-03-10T14:41:20.365770Z","iopub.execute_input":"2023-03-10T14:41:20.366333Z","iopub.status.idle":"2023-03-10T14:41:20.373234Z","shell.execute_reply.started":"2023-03-10T14:41:20.366302Z","shell.execute_reply":"2023-03-10T14:41:20.372411Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"events_df.isnull().sum()","metadata":{"execution":{"iopub.status.busy":"2023-03-10T14:41:20.375677Z","iopub.execute_input":"2023-03-10T14:41:20.376146Z","iopub.status.idle":"2023-03-10T14:41:20.387525Z","shell.execute_reply.started":"2023-03-10T14:41:20.376101Z","shell.execute_reply":"2023-03-10T14:41:20.386354Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"fig = px.histogram(events_df, x=\"Init\", nbins=50)\nfig.show()","metadata":{"execution":{"iopub.status.busy":"2023-03-10T14:41:20.388815Z","iopub.execute_input":"2023-03-10T14:41:20.389058Z","iopub.status.idle":"2023-03-10T14:41:20.440663Z","shell.execute_reply.started":"2023-03-10T14:41:20.389034Z","shell.execute_reply":"2023-03-10T14:41:20.439738Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"event_time = events_df.Completion - events_df.Init\nfig = px.histogram(x=event_time, nbins=30)\nfig.update_layout(\n    xaxis_title=\"Event duration\",\n    title={\n        'text': \"Distribution of event durations\",\n        'y':0.95,\n        'x':0.5,\n        'xanchor': 'center',\n        'yanchor': 'top'\n    }\n)\nfig.show()","metadata":{"execution":{"iopub.status.busy":"2023-03-10T14:41:20.441646Z","iopub.execute_input":"2023-03-10T14:41:20.441970Z","iopub.status.idle":"2023-03-10T14:41:20.502551Z","shell.execute_reply.started":"2023-03-10T14:41:20.441936Z","shell.execute_reply":"2023-03-10T14:41:20.501488Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"events_type_counts = events_df.Type.value_counts()\n\nfig = px.bar(x=events_type_counts.index, y=events_type_counts.values)\nfig.update_layout(xaxis_title=\"Type\", yaxis_title=\"Count\")\nfig.show()","metadata":{"execution":{"iopub.status.busy":"2023-03-10T14:41:20.503633Z","iopub.execute_input":"2023-03-10T14:41:20.504959Z","iopub.status.idle":"2023-03-10T14:41:20.559026Z","shell.execute_reply.started":"2023-03-10T14:41:20.504924Z","shell.execute_reply":"2023-03-10T14:41:20.557958Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"events_kinetic_counts = events_df.Kinetic.value_counts()\n\nfig = px.bar(x=events_kinetic_counts.index, y=events_kinetic_counts.values)\nfig.update_layout(xaxis_title=\"Kinetic\", yaxis_title=\"Count\")\nfig.show()","metadata":{"execution":{"iopub.status.busy":"2023-03-10T14:41:20.560236Z","iopub.execute_input":"2023-03-10T14:41:20.560570Z","iopub.status.idle":"2023-03-10T14:41:20.616824Z","shell.execute_reply.started":"2023-03-10T14:41:20.560535Z","shell.execute_reply":"2023-03-10T14:41:20.615720Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"corr_mat = np.round(events_df.corr(), 3)\n\nfig = px.imshow(\n    corr_mat,\n    x=corr_mat.columns,\n    y=corr_mat.columns, \n    text_auto=True\n   )\nfig.update_xaxes(side=\"bottom\")\nfig.update_layout(\n    title={\n        'text': \"Correlation Matrix of events features\",\n        'y':0.95,\n        'x':0.5,\n        'xanchor': 'center',\n        'yanchor': 'top'\n    }\n)\n\nfig.show()","metadata":{"execution":{"iopub.status.busy":"2023-03-10T14:41:20.618325Z","iopub.execute_input":"2023-03-10T14:41:20.618628Z","iopub.status.idle":"2023-03-10T14:41:20.668048Z","shell.execute_reply.started":"2023-03-10T14:41:20.618598Z","shell.execute_reply":"2023-03-10T14:41:20.666503Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"tasks_df = pd.read_csv(\"/kaggle/input/tlvmc-parkinsons-freezing-gait-prediction/tasks.csv\")","metadata":{"execution":{"iopub.status.busy":"2023-03-10T14:41:20.669689Z","iopub.execute_input":"2023-03-10T14:41:20.669977Z","iopub.status.idle":"2023-03-10T14:41:20.688560Z","shell.execute_reply.started":"2023-03-10T14:41:20.669952Z","shell.execute_reply":"2023-03-10T14:41:20.687341Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"tasks_df.head()","metadata":{"execution":{"iopub.status.busy":"2023-03-10T14:41:20.690096Z","iopub.execute_input":"2023-03-10T14:41:20.690482Z","iopub.status.idle":"2023-03-10T14:41:20.703807Z","shell.execute_reply.started":"2023-03-10T14:41:20.690418Z","shell.execute_reply":"2023-03-10T14:41:20.702374Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"temp = len(tasks_df)\nprint(\n    f\"Length of the subjects.csv file is: {color.BLUE}{temp}{color.END}\",\n)","metadata":{"execution":{"iopub.status.busy":"2023-03-10T14:41:20.705099Z","iopub.execute_input":"2023-03-10T14:41:20.705424Z","iopub.status.idle":"2023-03-10T14:41:20.715599Z","shell.execute_reply.started":"2023-03-10T14:41:20.705391Z","shell.execute_reply":"2023-03-10T14:41:20.714323Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"tasks_df.isnull().sum()","metadata":{"execution":{"iopub.status.busy":"2023-03-10T14:41:20.716525Z","iopub.execute_input":"2023-03-10T14:41:20.716817Z","iopub.status.idle":"2023-03-10T14:41:20.735856Z","shell.execute_reply.started":"2023-03-10T14:41:20.716789Z","shell.execute_reply":"2023-03-10T14:41:20.734075Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"tasks_df[\"Duration\"] = tasks_df.End - tasks_df.Begin\nfig = px.histogram(x=tasks_df[\"Duration\"], nbins=30)\nfig.update_layout(\n    xaxis_title=\"Task duration\",\n    title={\n        'text': \"Distribution of task durations\",\n        'y':0.95,\n        'x':0.5,\n        'xanchor': 'center',\n        'yanchor': 'top'\n    }\n)\nfig.show()","metadata":{"execution":{"iopub.status.busy":"2023-03-10T14:41:20.737328Z","iopub.execute_input":"2023-03-10T14:41:20.737970Z","iopub.status.idle":"2023-03-10T14:41:20.794964Z","shell.execute_reply.started":"2023-03-10T14:41:20.737937Z","shell.execute_reply":"2023-03-10T14:41:20.793617Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"tasks_task_counts = tasks_df.Task.value_counts()\n\nfig = px.bar(x=tasks_task_counts.index, y=tasks_task_counts.values)\nfig.update_layout(xaxis_title=\"Task\", yaxis_title=\"Count\")\nfig.show()","metadata":{"execution":{"iopub.status.busy":"2023-03-10T14:41:20.795992Z","iopub.execute_input":"2023-03-10T14:41:20.796240Z","iopub.status.idle":"2023-03-10T14:41:20.853643Z","shell.execute_reply.started":"2023-03-10T14:41:20.796216Z","shell.execute_reply":"2023-03-10T14:41:20.852536Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"fig = px.box(\n    tasks_df, \n    x='Duration', y='Task',\n    orientation='h', height=1000\n)\n\nfig.update_layout(\n    title={\n        'text': \"Task Duration Boxplot\",\n        'y':0.98,\n        'x':0.5,\n        'xanchor': 'center',\n        'yanchor': 'top'\n    },\n    margin=dict(l=50, r=0, t=50, b=50)\n)\nfig.show(autosize=True)","metadata":{"execution":{"iopub.status.busy":"2023-03-10T14:41:20.855232Z","iopub.execute_input":"2023-03-10T14:41:20.855569Z","iopub.status.idle":"2023-03-10T14:41:20.960212Z","shell.execute_reply.started":"2023-03-10T14:41:20.855536Z","shell.execute_reply":"2023-03-10T14:41:20.959403Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"# (⁠ ⁠ꈍ⁠ᴗ⁠ꈍ⁠) WORK STILL IN PROGRESS","metadata":{"execution":{"iopub.status.busy":"2023-03-10T14:41:20.961277Z","iopub.execute_input":"2023-03-10T14:41:20.962215Z","iopub.status.idle":"2023-03-10T14:41:20.966100Z","shell.execute_reply.started":"2023-03-10T14:41:20.962186Z","shell.execute_reply":"2023-03-10T14:41:20.965216Z"},"trusted":true},"execution_count":null,"outputs":[]}]}