Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Another weird question. #2

Closed
Stevewsw opened this issue Jul 26, 2018 · 3 comments
Closed

Another weird question. #2

Stevewsw opened this issue Jul 26, 2018 · 3 comments

Comments

@Stevewsw
Copy link

It passed whole day, but no progress obtained.

I changed the path of dataset as below.

loader = DataLoader("data/fpz_cz")
data_fp, labels = loader.load_data(verbose=0)
loader = DataLoader("data/pz_oz")

but KeyError occured.

10 fpz_name = 'fpz_cz/{}'.format(subject)
--> 11 stage_name = labels[subject][n_stage]

12 stage_name = class_dict[stage_name]
13 pz_name = 'pz_oz/{}'.format(subject)
`
KeyError: 'SC4001E0'

`

it is weird, because i can execute the code before plot_channels(subject='SC4001E0', n_stage=0);

if is it the operating system, i use windows10, and also i will try my linux system on my laptop.

thanks.

@baroquerock
Copy link
Owner

baroquerock commented Jul 26, 2018

Have you tried to look inside of labels variable (labels.keys())? It should contain the key 'SC4001E0' provided that you are using the data directory of this repo.

@Stevewsw
Copy link
Author

Got it, it is the difference between linux and windows, you know that ( /, \, balabala...)


Another issue hits me, how can i understand this remark in your 'sleep_stages.ipynb' file at MODEL AND SOME REMARKS part as below:

As an input I used single channel 30s EEG epochs. However, I also explored the approach used in [3, 2016]. In order to preserve transitional information (probability of a stage to come after another), the target epoch was augmented with 1-3 previous epochs.

Considering the temporal information ? (but you have used anther filter to extract it.)
Or something I have not considered ; (Maybe another part-LSTM is used to learn the temporal info.)

Thanks for your replying.
If my issue botherd you, do not hesitate to let me know please.

@baroquerock
Copy link
Owner

baroquerock commented Jul 27, 2018

An excerpt from the referenced paper:

'As shown in Table 2 the scoring of a particular epoch can depend on the characteristics of the preceding or succeeding epochs, for the sleep stage pairs N1-N2, N1-R, and N2-R. Therefore, we chose the input data to our CNN to be the signal of the current epoch to be classified together with the signals of the preceding two and succeeding two epochs, as a single, continuous signal,
starting from the earliest epoch, with the current epoch in the middle. At the sampling rate of 100 Hz this gives an input size of 15,000 timepoints.'

The input to the base network is a single 30s epoch (for example, R stage). The network processes it independently. However, this does not take into account transitional information between different kinds of epochs. That's why it might be useful to augment the target epoch with some number of preceding and succeeding epochs.

Let me know if it is clear.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants