Closed lkorczowski closed 4 years ago
The input's length of _fit_eeg_distribution
should be at least several hundreds of samples (several seconds) to correctly estimate the distribution. I am adding an assert and the corresponding pytest. It will be release with other code reviews in a PR.
FYI, I found out that the matlab code doesn't check that either but because their behaviour is different it doesn't raise any error, it's worse. Instead, when the input is too short, the grid-search is made several time on exactly same windows. It shouldn't happens too often but it may happens during testing and if someone try to fit the data with too few samples.
this issue should has been fixed, I will close it when the PR #12 is validated.
@bertrandlalo mentioned similar issue in #19 that should have been fixed by #21 because the user couldn't change some of the _fit_eeg_distribution
parameters from RASR. Anyway, I think it is a bad pratice to allow the user to change all _fit_eeg_distribution
parameters as doing so can break RASR (poor eeg distribution estimation). What garanty that RASR works is that there is hundreds of epochs in training (with overlap).
If the decision in #5 to remove 2D compatibility, it will be the job of the user to give hundreds of epochs for training (user has to do the epoching on they own).
I'm closing this issue.
In sprint3 #15, I'm adding that the documentation and assert should warn users to give more epochs for training.