-
Notifications
You must be signed in to change notification settings - Fork 36
Description
Hi. I hope all is well.
I am working on this code for binary classification and so far, the following problems have caught my attention:
- When I execute the following command:
python 1_preprocess.py --data_type train --cpu_num 8 --label_type tse_bi --save_directory "/media/farough/ext/f/pre" --samplerate 200
I get the following error:
1_preprocess.py", line 806, in main
selected_diseases.append(str(disease_labels[i]))
KeyError: 'gnsz'
I made the following change in line 258 to fix it:
parser.add_argument('--disease_type', type=list, default=['bckg', 'seiz'])
so when preprocess start, this information shows in Terminal:
Number of EDF files: 4599
label_list: ['EEG FP1', 'EEG FP2', 'EEG F3', 'EEG F4', 'EEG F7', 'EEG F8', 'EEG C3', 'EEG C4', 'EEG CZ', 'EEG T3', 'EEG T4', 'EEG P3', 'EEG P4', 'EEG O1', 'EEG O2', 'EEG T5', 'EEG T6', 'EEG PZ', 'EEG FZ']
disease_labels: {'bckg': 0, 'seiz': 1}
disease_labels_inv: {0: 'bckg', 1: 'seiz'}
data_file_directory: /media/farough/ext/f/pre/dataset-tuh_task-binary_datatype-train_v6
label_type: tse_bi
feature_type: ['rawsignal']
feature_sample_rate: 50
sample_rate: 200
fsr_sr_ratio: 4
min_binary_slicelength: 30
min_binary_edge_seiz: 3
disease_type: ['bckg', 'seiz']
target_dictionary: {0: 1, 1: 2}
selected_diseases: ['0', '1']
binary_target1: {0: 0, 1: 1, 2: 1, 3: 1, 4: 1, 5: 1, 6: 1, 7: 1, 8: 1}
binary_target2: {0: 0, 1: 1, 2: 2, 3: 2, 4: 2, 5: 1, 6: 3, 7: 4, 8: 5}
- When I want to start train phase, I get the following error:
GitHub/EEG_real_time_seizure_detection/builder/data/data_preprocess.py", line 306, in get_data_preprocessed
patT_idx = (train_data.type_type).index("patT")
ValueError: 'patT' is not in list
And I don’t know why it is happening.
I will be very happy if we can interact with each other. I need the best model of this code, and it seems that this code has some problems with the changes it has had over time.
Best,
Farough