{"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"},{"sourceId":7392775,"sourceType":"datasetVersion","datasetId":4297782},{"sourceId":7447509,"sourceType":"datasetVersion","datasetId":4334995}],"dockerImageVersionId":30646,"isInternetEnabled":true,"language":"python","sourceType":"notebook","isGpuEnabled":false}},"nbformat_minor":4,"nbformat":4,"cells":[{"cell_type":"markdown","source":"# Objective","metadata":{}},{"cell_type":"markdown","source":"Detect and classify brain seizures given EEG or spectrogram signals.\n","metadata":{}},{"cell_type":"code","source":"import pandas as pd","metadata":{"_uuid":"8f2839f25d086af736a60e9eeb907d3b93b6e0e5","_cell_guid":"b1076dfc-b9ad-4769-8c92-a6c4dae69d19","execution":{"iopub.status.busy":"2024-04-06T10:02:35.355844Z","iopub.execute_input":"2024-04-06T10:02:35.356204Z","iopub.status.idle":"2024-04-06T10:02:36.414945Z","shell.execute_reply.started":"2024-04-06T10:02:35.356167Z","shell.execute_reply":"2024-04-06T10:02:36.413839Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"# Check available files\n!ls ../input/hms-harmful-brain-activity-classification","metadata":{"execution":{"iopub.status.busy":"2024-04-06T10:02:36.416821Z","iopub.execute_input":"2024-04-06T10:02:36.417741Z","iopub.status.idle":"2024-04-06T10:02:36.750453Z","shell.execute_reply.started":"2024-04-06T10:02:36.417709Z","shell.execute_reply":"2024-04-06T10:02:36.749649Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"train_df = pd.read_csv(\"../input/hms-harmful-brain-activity-classification/train.csv\")","metadata":{"execution":{"iopub.status.busy":"2024-04-06T10:02:36.751568Z","iopub.execute_input":"2024-04-06T10:02:36.751886Z","iopub.status.idle":"2024-04-06T10:02:36.938257Z","shell.execute_reply.started":"2024-04-06T10:02:36.751862Z","shell.execute_reply":"2024-04-06T10:02:36.937519Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"train_df","metadata":{"execution":{"iopub.status.busy":"2024-04-06T10:02:36.939338Z","iopub.execute_input":"2024-04-06T10:02:36.939722Z","iopub.status.idle":"2024-04-06T10:02:36.977280Z","shell.execute_reply.started":"2024-04-06T10:02:36.939700Z","shell.execute_reply":"2024-04-06T10:02:36.975740Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"train_df.head()","metadata":{"execution":{"iopub.status.busy":"2024-04-06T10:02:36.979979Z","iopub.execute_input":"2024-04-06T10:02:36.980960Z","iopub.status.idle":"2024-04-06T10:02:36.999159Z","shell.execute_reply.started":"2024-04-06T10:02:36.980931Z","shell.execute_reply":"2024-04-06T10:02:36.997372Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"train_df.shape","metadata":{"execution":{"iopub.status.busy":"2024-04-06T10:02:37.000692Z","iopub.execute_input":"2024-04-06T10:02:37.001202Z","iopub.status.idle":"2024-04-06T10:02:37.007992Z","shell.execute_reply.started":"2024-04-06T10:02:37.001170Z","shell.execute_reply":"2024-04-06T10:02:37.006760Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"# Explore the train dataset","metadata":{}},{"cell_type":"markdown","source":"The main columns are:\n1. eeg_id: the id of EEG (Electroencephalography)\n2. patient_id: this is the patient's id \n3. label_id","metadata":{}},{"cell_type":"code","source":"s = train_df[\"patient_id\"].value_counts()\n\ns[(s > 500)].plot(kind='bar')","metadata":{"execution":{"iopub.status.busy":"2024-04-06T10:02:37.009662Z","iopub.execute_input":"2024-04-06T10:02:37.009912Z","iopub.status.idle":"2024-04-06T10:02:37.383691Z","shell.execute_reply.started":"2024-04-06T10:02:37.009890Z","shell.execute_reply":"2024-04-06T10:02:37.382153Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"s = train_df[\"eeg_id\"].value_counts()\n\ns[(s > 500)].plot(kind='bar')","metadata":{"execution":{"iopub.status.busy":"2024-04-06T10:02:37.385752Z","iopub.execute_input":"2024-04-06T10:02:37.386042Z","iopub.status.idle":"2024-04-06T10:02:37.597638Z","shell.execute_reply.started":"2024-04-06T10:02:37.386018Z","shell.execute_reply":"2024-04-06T10:02:37.596762Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"For each patient_id, there are one or more eeg_id:","metadata":{}},{"cell_type":"code","source":"s = (train_df.groupby(\"patient_id\")[\"eeg_id\"].count()\n             .sort_values(ascending=False))\n\ns[(s > 500)].plot(kind='bar')","metadata":{"execution":{"iopub.status.busy":"2024-04-06T10:02:37.598833Z","iopub.execute_input":"2024-04-06T10:02:37.599756Z","iopub.status.idle":"2024-04-06T10:02:37.928351Z","shell.execute_reply.started":"2024-04-06T10:02:37.599721Z","shell.execute_reply":"2024-04-06T10:02:37.927432Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"# Explore one patient's data","metadata":{}},{"cell_type":"code","source":"patient_id = 30631\npatient_id_df = train_df.loc[lambda df: df[\"patient_id\"] == patient_id]","metadata":{"execution":{"iopub.status.busy":"2024-04-06T10:02:37.929625Z","iopub.execute_input":"2024-04-06T10:02:37.929956Z","iopub.status.idle":"2024-04-06T10:02:37.938151Z","shell.execute_reply.started":"2024-04-06T10:02:37.929928Z","shell.execute_reply":"2024-04-06T10:02:37.936287Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"patient_id_df[\"eeg_id\"].value_counts()","metadata":{"execution":{"iopub.status.busy":"2024-04-06T10:02:37.940898Z","iopub.execute_input":"2024-04-06T10:02:37.941687Z","iopub.status.idle":"2024-04-06T10:02:37.953525Z","shell.execute_reply.started":"2024-04-06T10:02:37.941650Z","shell.execute_reply":"2024-04-06T10:02:37.952422Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"There are 270 eeg time series for the training that can be used to train the model.\nLet's explore one of these for a given `eeg_id`","metadata":{}},{"cell_type":"code","source":"eeg_id = 1098299532\ns = patient_id_df.loc[lambda df: df[\"eeg_id\"] == eeg_id]","metadata":{"execution":{"iopub.status.busy":"2024-04-06T10:02:37.954862Z","iopub.execute_input":"2024-04-06T10:02:37.955140Z","iopub.status.idle":"2024-04-06T10:02:37.964908Z","shell.execute_reply.started":"2024-04-06T10:02:37.955117Z","shell.execute_reply":"2024-04-06T10:02:37.963449Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"s[[\"eeg_label_offset_seconds\", \"grda_vote\"]].set_index(\"eeg_label_offset_seconds\").plot()","metadata":{"execution":{"iopub.status.busy":"2024-04-06T10:02:37.968379Z","iopub.execute_input":"2024-04-06T10:02:37.968765Z","iopub.status.idle":"2024-04-06T10:02:38.178477Z","shell.execute_reply.started":"2024-04-06T10:02:37.968735Z","shell.execute_reply":"2024-04-06T10:02:38.177665Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"s[[\"eeg_label_offset_seconds\", \"lrda_vote\"]].set_index(\"eeg_label_offset_seconds\").plot()","metadata":{"execution":{"iopub.status.busy":"2024-04-06T10:02:38.182893Z","iopub.execute_input":"2024-04-06T10:02:38.183975Z","iopub.status.idle":"2024-04-06T10:02:38.388509Z","shell.execute_reply.started":"2024-04-06T10:02:38.183941Z","shell.execute_reply":"2024-04-06T10:02:38.387349Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"s.columns","metadata":{"execution":{"iopub.status.busy":"2024-04-06T10:02:38.389902Z","iopub.execute_input":"2024-04-06T10:02:38.390304Z","iopub.status.idle":"2024-04-06T10:02:38.397301Z","shell.execute_reply.started":"2024-04-06T10:02:38.390268Z","shell.execute_reply":"2024-04-06T10:02:38.396186Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"What are the columns to predict?\n\n    \n1. lrda_vote\n2. grda_vote\n3. seizure_vote\n4. lpd_vote\n5. gpd_vote\n6. other_vote","metadata":{}},{"cell_type":"code","source":"s[['lpd_vote',\n       'gpd_vote', 'lrda_vote', 'grda_vote', 'other_vote', 'spectrogram_label_offset_seconds']].set_index(\"spectrogram_label_offset_seconds\").plot()","metadata":{"execution":{"iopub.status.busy":"2024-04-06T10:02:38.398479Z","iopub.execute_input":"2024-04-06T10:02:38.398840Z","iopub.status.idle":"2024-04-06T10:02:38.653674Z","shell.execute_reply.started":"2024-04-06T10:02:38.398808Z","shell.execute_reply":"2024-04-06T10:02:38.652649Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"# Train Spectrograms Exploration","metadata":{}},{"cell_type":"markdown","source":"TODO: How is the link between the spectrograms and the targets?","metadata":{}},{"cell_type":"code","source":"!ls ../input/hms-harmful-brain-activity-classification/train_spectrograms | head -n 5","metadata":{"execution":{"iopub.status.busy":"2024-04-06T10:02:38.654735Z","iopub.execute_input":"2024-04-06T10:02:38.655001Z","iopub.status.idle":"2024-04-06T10:02:39.092643Z","shell.execute_reply.started":"2024-04-06T10:02:38.654978Z","shell.execute_reply":"2024-04-06T10:02:39.091165Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"path = \"../input/hms-harmful-brain-activity-classification/train_spectrograms/1000086677.parquet\"\ndf = pd.read_parquet(path)\n","metadata":{"execution":{"iopub.status.busy":"2024-04-06T10:02:39.095113Z","iopub.execute_input":"2024-04-06T10:02:39.095536Z","iopub.status.idle":"2024-04-06T10:02:39.265530Z","shell.execute_reply.started":"2024-04-06T10:02:39.095497Z","shell.execute_reply":"2024-04-06T10:02:39.264789Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"df.columns","metadata":{"execution":{"iopub.status.busy":"2024-04-06T10:02:39.266697Z","iopub.execute_input":"2024-04-06T10:02:39.267821Z","iopub.status.idle":"2024-04-06T10:02:39.275200Z","shell.execute_reply.started":"2024-04-06T10:02:39.267774Z","shell.execute_reply":"2024-04-06T10:02:39.274053Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"df.set_index(\"time\")[\"LL_0.59\"].plot()","metadata":{"execution":{"iopub.status.busy":"2024-04-06T10:02:39.276507Z","iopub.execute_input":"2024-04-06T10:02:39.277085Z","iopub.status.idle":"2024-04-06T10:02:39.455995Z","shell.execute_reply.started":"2024-04-06T10:02:39.277060Z","shell.execute_reply":"2024-04-06T10:02:39.454651Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"df.set_index(\"time\")[\"RP_18.36\"].plot()","metadata":{"execution":{"iopub.status.busy":"2024-04-06T10:02:39.457650Z","iopub.execute_input":"2024-04-06T10:02:39.457977Z","iopub.status.idle":"2024-04-06T10:02:39.622135Z","shell.execute_reply.started":"2024-04-06T10:02:39.457951Z","shell.execute_reply":"2024-04-06T10:02:39.620687Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"# Possible models?","metadata":{}},{"cell_type":"markdown","source":"Time series based deep learning model?","metadata":{}},{"cell_type":"markdown","source":"Two models seem to be used by many:\n    \n1. WaveNet\n2. EfficientNet","metadata":{}},{"cell_type":"markdown","source":"The predicted targets are:\n    \n    seizure_vote,lpd_vote,gpd_vote,lrda_vote,grda_vote,other_vote\n    \nEach prediction is a probability (between 0 and 1) and the sum is 1.","metadata":{}},{"cell_type":"markdown","source":"Each row is identified by the eeg_id.","metadata":{"execution":{"iopub.status.busy":"2024-03-10T09:57:12.045222Z","iopub.execute_input":"2024-03-10T09:57:12.045725Z","iopub.status.idle":"2024-03-10T09:57:12.056544Z","shell.execute_reply.started":"2024-03-10T09:57:12.045685Z","shell.execute_reply":"2024-03-10T09:57:12.054617Z"}}},{"cell_type":"markdown","source":"The 6 targets are:\n    \n* seizure (SZ), \n* generalized periodic discharges (GPD), \n* lateralized periodic discharges (LPD), \n* lateralized rhythmic delta activity (LRDA), \n* generalized rhythmic delta activity (GRDA), \n* “other\"","metadata":{}},{"cell_type":"markdown","source":"Some details about these 6 categories: ...","metadata":{}},{"cell_type":"markdown","source":"Each EEG has some segments extracted...","metadata":{}},{"cell_type":"markdown","source":"![classification](https://storage.googleapis.com/kaggle-media/competitions/Harvard%20Medical%20School/eFig2.png)","metadata":{"execution":{"iopub.status.busy":"2024-03-10T10:27:28.706448Z","iopub.execute_input":"2024-03-10T10:27:28.706856Z","iopub.status.idle":"2024-03-10T10:27:29.826336Z","shell.execute_reply.started":"2024-03-10T10:27:28.706826Z","shell.execute_reply":"2024-03-10T10:27:29.824787Z"}}},{"cell_type":"markdown","source":"The image above shows that labeled EEG diagrams fall into many categories:\n    \n1. Idealized: is when the annotators all agree on the given label\n2. Proto: when around half agree and the other half give the annotation \"other\"\n3. Edge: when around half agree and the other halo give another annotation different than \"other\".","metadata":{}},{"cell_type":"markdown","source":"Maybe the other category will be hard to predict? Need to keep this in mind... ","metadata":{}},{"cell_type":"code","source":"train_df.head()","metadata":{"execution":{"iopub.status.busy":"2024-04-06T10:02:39.623425Z","iopub.execute_input":"2024-04-06T10:02:39.623751Z","iopub.status.idle":"2024-04-06T10:02:39.638773Z","shell.execute_reply.started":"2024-04-06T10:02:39.623722Z","shell.execute_reply":"2024-04-06T10:02:39.637835Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"Notice that we have both spectrograms and eegs for the train.","metadata":{}},{"cell_type":"markdown","source":"Which type of data is best to use?","metadata":{}},{"cell_type":"markdown","source":"Probably spectrograms with some cleaning of noise? Need to explore further...\n\n\n10 minutes long\n\n\n(50s long EEG waveform)\n\nThere are Kaggle-provided spectrograms and community computed spectrograms.\n\n","metadata":{}},{"cell_type":"code","source":"# Creating the dataset\n\n\ndf = pd.read_csv('/kaggle/input/hms-harmful-brain-activity-classification/train.csv')\nTARGETS = df.columns[-6:]\nprint('Train shape:', df.shape )\nprint('Targets', list(TARGETS))\ndf.head()","metadata":{"execution":{"iopub.status.busy":"2024-04-06T10:02:39.639956Z","iopub.execute_input":"2024-04-06T10:02:39.640247Z","iopub.status.idle":"2024-04-06T10:02:39.758192Z","shell.execute_reply.started":"2024-04-06T10:02:39.640222Z","shell.execute_reply":"2024-04-06T10:02:39.757357Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"TARGETS","metadata":{"execution":{"iopub.status.busy":"2024-04-06T10:02:39.759470Z","iopub.execute_input":"2024-04-06T10:02:39.759775Z","iopub.status.idle":"2024-04-06T10:02:39.766187Z","shell.execute_reply.started":"2024-04-06T10:02:39.759754Z","shell.execute_reply":"2024-04-06T10:02:39.765231Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"TODO: Understand what that data processing means...","metadata":{}},{"cell_type":"code","source":"train = df.groupby('eeg_id')[['spectrogram_id','spectrogram_label_offset_seconds']].agg(\n    {'spectrogram_id':'first','spectrogram_label_offset_seconds':'min'})\ntrain.columns = ['spec_id','min']\n\ntmp = df.groupby('eeg_id')[['spectrogram_id','spectrogram_label_offset_seconds']].agg(\n    {'spectrogram_label_offset_seconds':'max'})\ntrain['max'] = tmp\n\ntmp = df.groupby('eeg_id')[['patient_id']].agg('first')\ntrain['patient_id'] = tmp\n\ntmp = df.groupby('eeg_id')[TARGETS].agg('sum')\nfor t in TARGETS:\n    train[t] = tmp[t].values\n    \ny_data = train[TARGETS].values\ny_data = y_data / y_data.sum(axis=1,keepdims=True)\ntrain[TARGETS] = y_data\n\ntmp = df.groupby('eeg_id')[['expert_consensus']].agg('first')\ntrain['target'] = tmp\n\ntrain = train.reset_index()\nprint('Train non-overlapp eeg_id shape:', train.shape )\ntrain.head()","metadata":{"execution":{"iopub.status.busy":"2024-04-06T10:02:39.768164Z","iopub.execute_input":"2024-04-06T10:02:39.768550Z","iopub.status.idle":"2024-04-06T10:02:39.857937Z","shell.execute_reply.started":"2024-04-06T10:02:39.768523Z","shell.execute_reply":"2024-04-06T10:02:39.856906Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"# Get this dataset.\nimport numpy as np\nspectrograms = np.load('/kaggle/input/brain-spectrograms/specs.npy',allow_pickle=True).item()","metadata":{"execution":{"iopub.status.busy":"2024-04-06T10:02:39.859755Z","iopub.execute_input":"2024-04-06T10:02:39.860148Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"len(spectrograms)","metadata":{"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"# Get this dataset as well...\nall_eegs = np.load('/kaggle/input/brain-eeg-spectrograms/eeg_specs.npy',allow_pickle=True).item()","metadata":{"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"len(all_eegs)","metadata":{"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"How the two types will be merged and used?","metadata":{}},{"cell_type":"code","source":"import numpy as np\nimport pandas as pd\nimport albumentations as albu\nimport torch\nfrom torch.utils.data import Dataset\n\nTARS = {'Seizure': 0, 'LPD': 1, 'GPD': 2, 'LRDA': 3, 'GRDA': 4, 'Other': 5}\nTARS2 = {x: y for y, x in TARS.items()}\n\nclass EEGDataset(Dataset):\n    def __init__(self, data, spectrograms, all_eegs, transform=None, mode='train'):\n        self.data = data\n        self.spectrograms = spectrograms\n        self.all_eegs = all_eegs\n        self.transform = transform\n        self.mode = mode\n\n    def __len__(self):\n        return len(self.data)\n\n    def __getitem__(self, idx):\n        row = self.data.iloc[idx]\n\n        if self.mode == 'test':\n            r = 0\n        else:\n            r = int((row['min'] + row['max']) // 4)\n\n        X = np.zeros((128, 256, 8), dtype='float32')\n        y = np.zeros(6, dtype='float32')\n\n        img = np.ones((128, 256), dtype='float32')\n\n        for k in range(4):\n            # EXTRACT 300 ROWS OF SPECTROGRAM\n            img = self.spectrograms[row.spec_id][r:r + 300, k * 100:(k + 1) * 100].T\n\n            # LOG TRANSFORM SPECTROGRAM\n            img = np.clip(img, np.exp(-4), np.exp(8))\n            img = np.log(img)\n\n            # STANDARDIZE PER IMAGE\n            ep = 1e-6\n            m = np.nanmean(img.flatten())\n            s = np.nanstd(img.flatten())\n            img = (img - m) / (s + ep)\n            img = np.nan_to_num(img, nan=0.0)\n\n            # CROP TO 256 TIME STEPS\n            X[14:-14, :, k] = img[:, 22:-22] / 2.0\n\n        # EEG SPECTROGRAMS\n        img = self.all_eegs[row.eeg_id]\n        X[:, :, 4:] = img\n\n        if self.mode != 'test':\n            y = row[TARGETS]\n\n        if self.transform:\n            X = self.transform(image=X)['image']\n\n        X = torch.tensor(X)\n        y = torch.tensor(y)\n\n        return X, y\n\n    def __random_transform(self, img):\n        composition = albu.Compose([\n            albu.HorizontalFlip(p=0.5),\n            # albu.CoarseDropout(max_holes=8,max_height=32,max_width=32,fill_value=0,p=0.5),\n        ])\n        return composition(image=img)['image']\n\n    def __augment_batch(self, img_batch):\n        for i in range(img_batch.shape[0]):\n            img_batch[i, ] = self.__random_transform(img_batch[i, ])\n        return img_batch","metadata":{"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"from torch.utils.data import DataLoader\nimport matplotlib.pylab as plt","metadata":{"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"# Replace with PyTorch generator...\ndataset = EEGDataset(train, spectrograms, all_eegs)\ndataloader = DataLoader(dataset, batch_size=32, shuffle=True)\nROWS=2; COLS=3; BATCHES=2\n\nfor i,(x,y) in enumerate(dataloader):\n    print(x.shape, y.shape)\n    plt.figure(figsize=(20,8))\n    for j in range(ROWS):\n        for k in range(COLS):\n            plt.subplot(ROWS,COLS,j*COLS+k+1)\n            t = y[j*COLS+k]\n            img = x[j*COLS+k,:,:,0]\n            mn = img.flatten().min()\n            mx = img.flatten().max()\n            img = (img-mn)/(mx-mn)\n            plt.imshow(img)\n            tars = f'[{t[0]:0.2f}'\n            for s in t[1:]: tars += f', {s:0.2f}'\n            eeg = train.eeg_id.values[i*32+j*COLS+k]\n            plt.title(f'EEG = {eeg}\\nTarget = {tars}',size=12)\n            plt.yticks([])\n            plt.ylabel('Frequencies (Hz)',size=14)\n            plt.xlabel('Time (sec)',size=16)\n    plt.show()\n    if i==BATCHES-1: break","metadata":{"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"Some usual terms\n\n* localistaion\n* specification\n\n","metadata":{}},{"cell_type":"markdown","source":"# EffNet Model","metadata":{}},{"cell_type":"markdown","source":"Let's try this model.","metadata":{}}]}