{"metadata":{"kernelspec":{"language":"python","display_name":"Python 3","name":"python3"},"language_info":{"name":"python","version":"3.10.13","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":30646,"isInternetEnabled":true,"language":"python","sourceType":"notebook","isGpuEnabled":false}},"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        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":"2024-01-30T06:15:55.677867Z","iopub.execute_input":"2024-01-30T06:15:55.678201Z","iopub.status.idle":"2024-01-30T06:16:07.560538Z","shell.execute_reply.started":"2024-01-30T06:15:55.678174Z","shell.execute_reply":"2024-01-30T06:16:07.559517Z"},"trusted":true},"execution_count":6,"outputs":[]},{"cell_type":"code","source":"df_train=pd.read_csv(\"/kaggle/input/hms-harmful-brain-activity-classification/train.csv\")\ndf_test=pd.read_csv(\"/kaggle/input/hms-harmful-brain-activity-classification/train.csv\")","metadata":{"execution":{"iopub.status.busy":"2024-01-30T06:17:19.326749Z","iopub.execute_input":"2024-01-30T06:17:19.32724Z","iopub.status.idle":"2024-01-30T06:17:19.536451Z","shell.execute_reply.started":"2024-01-30T06:17:19.327202Z","shell.execute_reply":"2024-01-30T06:17:19.535302Z"},"trusted":true},"execution_count":10,"outputs":[]},{"cell_type":"code","source":"df_train.head(2)","metadata":{"execution":{"iopub.status.busy":"2024-01-30T06:17:41.757185Z","iopub.execute_input":"2024-01-30T06:17:41.757627Z","iopub.status.idle":"2024-01-30T06:17:41.772959Z","shell.execute_reply.started":"2024-01-30T06:17:41.757596Z","shell.execute_reply":"2024-01-30T06:17:41.771423Z"},"trusted":true},"execution_count":12,"outputs":[{"execution_count":12,"output_type":"execute_result","data":{"text/plain":"       eeg_id  eeg_sub_id  eeg_label_offset_seconds  spectrogram_id  \\\n0  1628180742           0                       0.0          353733   \n1  1628180742           1                       6.0          353733   \n\n   spectrogram_sub_id  spectrogram_label_offset_seconds    label_id  \\\n0                   0                               0.0   127492639   \n1                   1                               6.0  3887563113   \n\n   patient_id expert_consensus  seizure_vote  lpd_vote  gpd_vote  lrda_vote  \\\n0       42516          Seizure             3         0         0          0   \n1       42516          Seizure             3         0         0          0   \n\n   grda_vote  other_vote  \n0          0           0  \n1          0           0  ","text/html":"<div>\n<style scoped>\n    .dataframe tbody tr th:only-of-type {\n        vertical-align: middle;\n    }\n\n    .dataframe tbody tr th {\n        vertical-align: top;\n    }\n\n    .dataframe thead th {\n        text-align: right;\n    }\n</style>\n<table border=\"1\" class=\"dataframe\">\n  <thead>\n    <tr style=\"text-align: right;\">\n      <th></th>\n      <th>eeg_id</th>\n      <th>eeg_sub_id</th>\n      <th>eeg_label_offset_seconds</th>\n      <th>spectrogram_id</th>\n      <th>spectrogram_sub_id</th>\n      <th>spectrogram_label_offset_seconds</th>\n      <th>label_id</th>\n      <th>patient_id</th>\n      <th>expert_consensus</th>\n      <th>seizure_vote</th>\n      <th>lpd_vote</th>\n      <th>gpd_vote</th>\n      <th>lrda_vote</th>\n      <th>grda_vote</th>\n      <th>other_vote</th>\n    </tr>\n  </thead>\n  <tbody>\n    <tr>\n      <th>0</th>\n      <td>1628180742</td>\n      <td>0</td>\n      <td>0.0</td>\n      <td>353733</td>\n      <td>0</td>\n      <td>0.0</td>\n      <td>127492639</td>\n      <td>42516</td>\n      <td>Seizure</td>\n      <td>3</td>\n      <td>0</td>\n      <td>0</td>\n      <td>0</td>\n      <td>0</td>\n      <td>0</td>\n    </tr>\n    <tr>\n      <th>1</th>\n      <td>1628180742</td>\n      <td>1</td>\n      <td>6.0</td>\n      <td>353733</td>\n      <td>1</td>\n      <td>6.0</td>\n      <td>3887563113</td>\n      <td>42516</td>\n      <td>Seizure</td>\n      <td>3</td>\n      <td>0</td>\n      <td>0</td>\n      <td>0</td>\n      <td>0</td>\n      <td>0</td>\n    </tr>\n  </tbody>\n</table>\n</div>"},"metadata":{}}]},{"cell_type":"code","source":"df_test.head(2)","metadata":{"execution":{"iopub.status.busy":"2024-01-30T06:17:45.931164Z","iopub.execute_input":"2024-01-30T06:17:45.931493Z","iopub.status.idle":"2024-01-30T06:17:45.945287Z","shell.execute_reply.started":"2024-01-30T06:17:45.931468Z","shell.execute_reply":"2024-01-30T06:17:45.94449Z"},"trusted":true},"execution_count":13,"outputs":[{"execution_count":13,"output_type":"execute_result","data":{"text/plain":"       eeg_id  eeg_sub_id  eeg_label_offset_seconds  spectrogram_id  \\\n0  1628180742           0                       0.0          353733   \n1  1628180742           1                       6.0          353733   \n\n   spectrogram_sub_id  spectrogram_label_offset_seconds    label_id  \\\n0                   0                               0.0   127492639   \n1                   1                               6.0  3887563113   \n\n   patient_id expert_consensus  seizure_vote  lpd_vote  gpd_vote  lrda_vote  \\\n0       42516          Seizure             3         0         0          0   \n1       42516          Seizure             3         0         0          0   \n\n   grda_vote  other_vote  \n0          0           0  \n1          0           0  ","text/html":"<div>\n<style scoped>\n    .dataframe tbody tr th:only-of-type {\n        vertical-align: middle;\n    }\n\n    .dataframe tbody tr th {\n        vertical-align: top;\n    }\n\n    .dataframe thead th {\n        text-align: right;\n    }\n</style>\n<table border=\"1\" class=\"dataframe\">\n  <thead>\n    <tr style=\"text-align: right;\">\n      <th></th>\n      <th>eeg_id</th>\n      <th>eeg_sub_id</th>\n      <th>eeg_label_offset_seconds</th>\n      <th>spectrogram_id</th>\n      <th>spectrogram_sub_id</th>\n      <th>spectrogram_label_offset_seconds</th>\n      <th>label_id</th>\n      <th>patient_id</th>\n      <th>expert_consensus</th>\n      <th>seizure_vote</th>\n      <th>lpd_vote</th>\n      <th>gpd_vote</th>\n      <th>lrda_vote</th>\n      <th>grda_vote</th>\n      <th>other_vote</th>\n    </tr>\n  </thead>\n  <tbody>\n    <tr>\n      <th>0</th>\n      <td>1628180742</td>\n      <td>0</td>\n      <td>0.0</td>\n      <td>353733</td>\n      <td>0</td>\n      <td>0.0</td>\n      <td>127492639</td>\n      <td>42516</td>\n      <td>Seizure</td>\n      <td>3</td>\n      <td>0</td>\n      <td>0</td>\n      <td>0</td>\n      <td>0</td>\n      <td>0</td>\n    </tr>\n    <tr>\n      <th>1</th>\n      <td>1628180742</td>\n      <td>1</td>\n      <td>6.0</td>\n      <td>353733</td>\n      <td>1</td>\n      <td>6.0</td>\n      <td>3887563113</td>\n      <td>42516</td>\n      <td>Seizure</td>\n      <td>3</td>\n      <td>0</td>\n      <td>0</td>\n      <td>0</td>\n      <td>0</td>\n      <td>0</td>\n    </tr>\n  </tbody>\n</table>\n</div>"},"metadata":{}}]},{"cell_type":"code","source":"df_train.shape,df_test.shape","metadata":{"execution":{"iopub.status.busy":"2024-01-30T06:18:01.120725Z","iopub.execute_input":"2024-01-30T06:18:01.121117Z","iopub.status.idle":"2024-01-30T06:18:01.13054Z","shell.execute_reply.started":"2024-01-30T06:18:01.121064Z","shell.execute_reply":"2024-01-30T06:18:01.129076Z"},"trusted":true},"execution_count":14,"outputs":[{"execution_count":14,"output_type":"execute_result","data":{"text/plain":"((106800, 15), (106800, 15))"},"metadata":{}}]},{"cell_type":"code","source":"","metadata":{},"execution_count":null,"outputs":[]}]}