Repository navigation
channel-wise-ransac - #24
yjmantilla wants to merge 20 commits into
Conversation
We don't need to keep the old function, if the new one improves the functionality --> that's why we use GIT :-) if we ever need the old one back, we can just go back in time and get it.
you simply write a .py script, put it into the "examples" folder, and sphinx (sphinx-gallery actually) will run this script and render it as a documentation page. See this file for example: https://github.com/sappelhoff/pyprep/blob/master/examples/use_noisy_module.py ... and then see how it looks once it is rendered: https://pyprep.readthedocs.io/en/latest/auto_examples/use_noisy_module.html#sphx-glr-auto-examples-use-noisy-module-py The only "new" thing to learn is how to write RST (see https://thomas-cokelaer.info/tutorials/sphinx/rest_syntax.html) .. but you can take most of what you need from the example file I linked :-)
okay, I'll wait with a review until everything is a bit more clear. Let me know if you need help |
Yes but I did that because I currently dont know :-/ how to test the pipeline with both versions without just renaming the old one. I mean is there a way to do a test (measuring results and timings) that calls different versions of the same module , in this case pyprep with old ransac vs pyprep with new ransac. Now that I think, this would be like designing a test only for the ransac that measures results and time. Then execute it from the master (old ransac) and again but from the new branch and compare outside of the test script. So am I right with this approach? |
yes, that sounds like a good approach 👍 |
4dcbb3c to
37b1a79
Compare
|
@yjmantilla would it perhaps be possible for you to move your "new changes" to a new PR? This PR contains many "old" changes, and apparently the rebasing didn't work (so it's currently showing me 12 changed files) |
|
@sappelhoff So Ive checked a bit the timings of the ransac done channel-wise and it takes about 5 to 6 times slower. Nevertheless it consumes much less ram which is important for long and highly sampled eeg registers. I'm thinking that the ransac should be done in your way by default and if it gives a memory error then it should attempt to do it channel wise. I have not yet implemented that because there is a test fail in test_prep_pipeline. Apparently it is attempting to substract a 64 channel register to a 63 channel register. Now the 63 channel register apparently should be from the edf loaded but this doesn't make sense. When i do the test locally it correctly loads a 64 channel edf so im baffled by this error. Remote test: Local test: What happened to that missing channel, I wonder... |
|
Yes, that's one reason why I would recommend that you pick all your changes and start off from a completely new PR that is up to date with upstream master. I think I fixed these 63 vs 64 issues in this PR: #31 |
|
Thanks, I thought I did the rebase successfully but it seems like I didnt. Will try that. |
Here is the changes I did to implement the channel-wise ransac. Thus would close #17
The old function of ransac was renamed to the same name but with '_hungry' at the end.
I cant right now offer much explanation regarding why I changed what I changed but for now I can say that a channel correlation depends only on that channel prediction by ransac, so there is no need to do all the predictions at once (or at least this is the logic i remember thinking).
This pull request is not intended to be merged right away but to communicate the changes done so should be marked as a work-in-progress). Also we need testing of: