arlenejohn / CNN_sleep_apnea

Code for the paper `A 1D-CNN based deep learning technique for sleep apnea detection in IoT sensors'
GNU General Public License v3.0
19 stars 7 forks source link

Hello? I have some problems on your sleep_apnea code process #3

Open powergun-reaper opened 2 years ago

powergun-reaper commented 2 years ago

I downloaded for all your upload code about matlab code and python data. And I preprocessed sleep apnea data on your matlab code. Also I activated on your [sleep_apnea_ecg.ipynb] code for checking result. However I tried 3 times because your upload [sleep_apnea_ecg.ipynb] training data size didnt match on my training data. Also if, I continued training [sleep_apnea_ecg.ipynb] on my training data, it wouldnt match on your loss and accuracy results. Example 1.1. My training data shape (817234, 1408, 1) 1.2. Your training data shape (805926, 1408, 1) 2.1 My loss and accuracy time series Epoch 1/500 - 87s 3ms/step - loss: 0.6935 - accuracy: 0.5000 - val_loss: 7.5324 - val_accuracy: 0.4974 Epoch 2/500 - 87s 3ms/step - loss: 0.6935 - accuracy: 0.4989 - val_loss: 7.5596 - val_accuracy: 0.4953 Epoch 3/500 - 86s 3ms/step - loss: 0.6935 - accuracy: 0.5001 - val_loss: 0.6931 - val_accuracy: 0.4995 ........ Epoch 55/500 - 86s 3ms/step - loss: 0.6935 - accuracy: 0.4993 - val_loss: 0.6939 - val_accuracy: 0.5000 2.2 Your loss and accuracy time series Epoch 1/500 - 119s 5ms/step - loss: 0.2138 - accuracy: 0.9156 - val_loss: 0.1518 - val_accuracy: 0.9488 Epoch 2/500 - 120s 5ms/step - loss: 0.1051 - accuracy: 0.9677 - val_loss: 0.1378 - val_accuracy: 0.9590 Epoch 3/500 - 120s 5ms/step - loss: 0.0849 - accuracy: 0.9756 - val_loss: 0.1264 - val_accuracy: 0.9633

So. would you mind if I received all data for train, valid, and test data.mat?

arlenejohn commented 2 years ago

Hi! You can use the files in https://drive.google.com/drive/folders/1nSKzK0P6SQkgZKcCLtaLbZreoluUSlJD. Do request access. This would solve the training data mismatch issue. However, I have used the data with 817234 samples previously and the training loss was decreasing pretty rapidly. Have you tried with another random seed?

powergun-reaper commented 2 years ago

I downloaded your upload data, but its result almost same. Maybe I think that I will try random seed. Therefore I search information about random seed, I add tf.random.set_seed(#). I check result until your upload loss-accuracy value.