{"metadata":{"kernelspec":{"language":"python","display_name":"Python 3","name":"python3"},"language_info":{"name":"python","version":"3.10.12","mimetype":"text/x-python","codemirror_mode":{"name":"ipython","version":3},"pygments_lexer":"ipython3","nbconvert_exporter":"python","file_extension":".py"},"kaggle":{"accelerator":"none","dataSources":[{"sourceId":59093,"databundleVersionId":7469972,"sourceType":"competition"}],"dockerImageVersionId":30635,"isInternetEnabled":true,"language":"python","sourceType":"notebook","isGpuEnabled":false}},"nbformat_minor":4,"nbformat":4,"cells":[{"cell_type":"code","source":"import os\nfor dirname, _, filenames in os.walk('/kaggle/input'):\n    for filename in filenames:\n        print(os.path.join(dirname, filename))\n","metadata":{"_uuid":"8f2839f25d086af736a60e9eeb907d3b93b6e0e5","_cell_guid":"b1076dfc-b9ad-4769-8c92-a6c4dae69d19","execution":{"iopub.status.busy":"2024-01-25T06:26:12.862495Z","iopub.execute_input":"2024-01-25T06:26:12.862889Z","iopub.status.idle":"2024-01-25T06:26:33.536278Z","shell.execute_reply.started":"2024-01-25T06:26:12.862856Z","shell.execute_reply":"2024-01-25T06:26:33.532488Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"import numpy as np\nimport pandas as pd\nimport matplotlib.pyplot as plt\nimport seaborn as sns","metadata":{"execution":{"iopub.status.busy":"2024-01-25T06:26:33.538861Z","iopub.execute_input":"2024-01-25T06:26:33.53932Z","iopub.status.idle":"2024-01-25T06:26:34.791966Z","shell.execute_reply.started":"2024-01-25T06:26:33.539279Z","shell.execute_reply":"2024-01-25T06:26:34.790659Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"train_df = pd.read_csv(\"/kaggle/input/hms-harmful-brain-activity-classification/train.csv\")\ntest_df = pd.read_csv(\"/kaggle/input/hms-harmful-brain-activity-classification/test.csv\")","metadata":{"execution":{"iopub.status.busy":"2024-01-25T06:27:16.994219Z","iopub.execute_input":"2024-01-25T06:27:16.994709Z","iopub.status.idle":"2024-01-25T06:27:17.24451Z","shell.execute_reply.started":"2024-01-25T06:27:16.994672Z","shell.execute_reply":"2024-01-25T06:27:17.242932Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"train_df.head(5)","metadata":{"execution":{"iopub.status.busy":"2024-01-25T06:27:25.726207Z","iopub.execute_input":"2024-01-25T06:27:25.726663Z","iopub.status.idle":"2024-01-25T06:27:25.760752Z","shell.execute_reply.started":"2024-01-25T06:27:25.72663Z","shell.execute_reply":"2024-01-25T06:27:25.759433Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"train_df.tail(5)","metadata":{"execution":{"iopub.status.busy":"2024-01-25T06:27:34.408908Z","iopub.execute_input":"2024-01-25T06:27:34.409424Z","iopub.status.idle":"2024-01-25T06:27:34.431057Z","shell.execute_reply.started":"2024-01-25T06:27:34.409381Z","shell.execute_reply":"2024-01-25T06:27:34.42986Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"train_df.columns.fillna()","metadata":{"execution":{"iopub.status.busy":"2024-01-25T06:28:03.885107Z","iopub.execute_input":"2024-01-25T06:28:03.886696Z","iopub.status.idle":"2024-01-25T06:28:03.895175Z","shell.execute_reply.started":"2024-01-25T06:28:03.886642Z","shell.execute_reply":"2024-01-25T06:28:03.893229Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"train_df.describe","metadata":{"execution":{"iopub.status.busy":"2024-01-25T06:28:26.455642Z","iopub.execute_input":"2024-01-25T06:28:26.456139Z","iopub.status.idle":"2024-01-25T06:28:26.480227Z","shell.execute_reply.started":"2024-01-25T06:28:26.456104Z","shell.execute_reply":"2024-01-25T06:28:26.478316Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"train_df.isnull().sum()","metadata":{"execution":{"iopub.status.busy":"2024-01-25T06:28:42.162442Z","iopub.execute_input":"2024-01-25T06:28:42.162863Z","iopub.status.idle":"2024-01-25T06:28:42.188392Z","shell.execute_reply.started":"2024-01-25T06:28:42.162832Z","shell.execute_reply":"2024-01-25T06:28:42.18707Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"train_df.dtypes","metadata":{"execution":{"iopub.status.busy":"2024-01-25T06:28:49.745822Z","iopub.execute_input":"2024-01-25T06:28:49.746319Z","iopub.status.idle":"2024-01-25T06:28:49.759022Z","shell.execute_reply.started":"2024-01-25T06:28:49.74628Z","shell.execute_reply":"2024-01-25T06:28:49.757319Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"number_catagories = df[\"expert_consensus\"].nunique()\nunique_catagories = df[\"expert_consensus\"].unique()\ncatagory_counts = df[\"expert_consensus\"].value_counts()\n\nprint(f\"Number of catagory is: {number_catagories}\\n\")\nprint(f\"Catagories are: {unique_catagories}\\n\")\nprint(f\"Each Catagory Counts: {catagory_counts}\")","metadata":{"execution":{"iopub.status.busy":"2024-01-18T15:49:48.777572Z","iopub.execute_input":"2024-01-18T15:49:48.777984Z","iopub.status.idle":"2024-01-18T15:49:48.808167Z","shell.execute_reply.started":"2024-01-18T15:49:48.777949Z","shell.execute_reply":"2024-01-18T15:49:48.807052Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"max = train_df[\"seizure_vote\"].max()\nmin = train_df[\"seizure_vote\"].min()\n\nprint(\"max =\", max)\nprint(\"min = \", min)","metadata":{"execution":{"iopub.status.busy":"2024-01-25T06:32:35.167561Z","iopub.execute_input":"2024-01-25T06:32:35.168118Z","iopub.status.idle":"2024-01-25T06:32:35.178118Z","shell.execute_reply.started":"2024-01-25T06:32:35.168079Z","shell.execute_reply":"2024-01-25T06:32:35.176854Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"max = train_df[\"lpd_vote\"].max()\nmin = train_df[\"lpd_vote\"].min()\n\nprint(\"max =\", max)\nprint(\"min = \", min)\n    ","metadata":{"execution":{"iopub.status.busy":"2024-01-25T06:34:05.428173Z","iopub.execute_input":"2024-01-25T06:34:05.429582Z","iopub.status.idle":"2024-01-25T06:34:05.436954Z","shell.execute_reply.started":"2024-01-25T06:34:05.429523Z","shell.execute_reply":"2024-01-25T06:34:05.435909Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"fig, axes = plt.subplots(nrows=5, ncols=4, figsize=(20, 15))\n\naxes = axes.flatten()\n\nfor i, column in enumerate(train_df.columns):\n    ax = axes[i]\n    \n    if train_df[column].dtype == 'object':\n        sns.countplot(x=column, data=train_df, ax=ax)\n        ax.set_title(f'Countplot for {column}')\n    else:\n        sns.histplot(train_df[column], bins=20, kde=True, ax=ax)\n        ax.set_title(f'Histogram for {column}')\n\n# Adjust layout\nplt.tight_layout()\n\n# Show the plots\nplt.show()","metadata":{"execution":{"iopub.status.busy":"2024-01-25T06:46:41.821979Z","iopub.execute_input":"2024-01-25T06:46:41.822558Z","iopub.status.idle":"2024-01-25T06:46:56.773758Z","shell.execute_reply.started":"2024-01-25T06:46:41.822518Z","shell.execute_reply":"2024-01-25T06:46:56.772519Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"","metadata":{},"execution_count":null,"outputs":[]}]}