{"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 numpy as np # linear algebra\nimport pandas as pd # data processing, CSV file I/O (e.g. pd.read_csv)\nimport os\n\nos.listdir(\"/kaggle/input/\")\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-02-05T11:37:20.154395Z","iopub.execute_input":"2024-02-05T11:37:20.154861Z","iopub.status.idle":"2024-02-05T11:37:20.164349Z","shell.execute_reply.started":"2024-02-05T11:37:20.154827Z","shell.execute_reply":"2024-02-05T11:37:20.162939Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"LOAD DATA TO PERFORM COMPLETE EDA.. 😀😁😎","metadata":{}},{"cell_type":"code","source":"eeg_data = pd.read_csv(\"/kaggle/input/hms-harmful-brain-activity-classification/train.csv\")\neeg_data.head()","metadata":{"execution":{"iopub.status.busy":"2024-02-05T11:37:20.167128Z","iopub.execute_input":"2024-02-05T11:37:20.167612Z","iopub.status.idle":"2024-02-05T11:37:20.387094Z","shell.execute_reply.started":"2024-02-05T11:37:20.167546Z","shell.execute_reply":"2024-02-05T11:37:20.385969Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"eeg_data.groupby(\"expert_consensus\").sum()","metadata":{"execution":{"iopub.status.busy":"2024-02-05T12:03:49.668036Z","iopub.execute_input":"2024-02-05T12:03:49.668553Z","iopub.status.idle":"2024-02-05T12:03:49.716120Z","shell.execute_reply.started":"2024-02-05T12:03:49.668517Z","shell.execute_reply":"2024-02-05T12:03:49.714888Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"*DATA PREPROCESSING*","metadata":{"execution":{"iopub.status.busy":"2024-01-29T12:54:19.458318Z","iopub.execute_input":"2024-01-29T12:54:19.458790Z","iopub.status.idle":"2024-01-29T12:54:19.476283Z","shell.execute_reply.started":"2024-01-29T12:54:19.458756Z","shell.execute_reply":"2024-01-29T12:54:19.475491Z"}}},{"cell_type":"code","source":"#checking out for NaN's Values\nis_nan_present = eeg_data.isnull().sum()","metadata":{"execution":{"iopub.status.busy":"2024-02-05T12:15:06.718357Z","iopub.execute_input":"2024-02-05T12:15:06.719465Z","iopub.status.idle":"2024-02-05T12:15:06.741847Z","shell.execute_reply.started":"2024-02-05T12:15:06.719404Z","shell.execute_reply":"2024-02-05T12:15:06.740674Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"cols = eeg_data.columns","metadata":{"execution":{"iopub.status.busy":"2024-02-05T12:05:02.857811Z","iopub.execute_input":"2024-02-05T12:05:02.858617Z","iopub.status.idle":"2024-02-05T12:05:02.864226Z","shell.execute_reply.started":"2024-02-05T12:05:02.858578Z","shell.execute_reply":"2024-02-05T12:05:02.863013Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"mean_seizure_vote_by_patient = eeg_data.groupby(\"patient_id\")[\"seizure_vote\"].mean()\nsum_seizure_vote_by_patient_and_offset = eeg_data.groupby([\"patient_id\", \"eeg_label_offset_seconds\"]).sum()\n\n# mean_seizure_vote_by_patient\n# sum_seizure_vote_by_patient_and_offset","metadata":{"execution":{"iopub.status.busy":"2024-02-05T12:16:41.248371Z","iopub.execute_input":"2024-02-05T12:16:41.248756Z","iopub.status.idle":"2024-02-05T12:16:41.320644Z","shell.execute_reply.started":"2024-02-05T12:16:41.248724Z","shell.execute_reply":"2024-02-05T12:16:41.319380Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"","metadata":{},"execution_count":null,"outputs":[]}]}