Hi! Guys,
I’m wondering if there is a way to built sliding window classifiers using responses from 20 ms windows, which were gradually shifted in 1 ms steps over the duration of the epoched response from the onset of the epoch up to the offset.
Hi @YuZhou, you can probably use epochs.get_data() to obtain an array of shape (n_epochs, n_channels, n_times).
Then you can use numpy and indexing to
get an epoch to look at: epoch0_data = data[0, ...]
iterate over that data in windows.
for that, use information from epochs.times and epochs.info["sfreq"] to design your windows
Your question is very general. To obtain more helpful answers, I recommend that you share code snippets where you are blocked, and specify your questions in more detail.
But sadly I don’t know how to achieve this in MNE, in my vague thought, the SlidingEstimator() might not work here, I might need to write some loops by hand to loop in the time domain, I might also need the function mne.decoding.Vectorizer? to reshape the data of every n seconds * n_channels.