-
Notifications
You must be signed in to change notification settings - Fork 54
Add trial-masked detrending #41
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
Merged
Merged
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
8e07355
Merge pull request #2 from nbara/master
romquentin 6605b63
add create_maksed_weight
romquentin 54c644a
Merge branch 'masked_detrend' of https://github.com/romquentin/python…
romquentin c19dfc5
Formatting docstring
romquentin ef5c5da
Merge branch 'master' into masked_detrend
nbara 29fc48c
format public function
romquentin 1eb44f3
Merge branch 'masked_detrend' of https://github.com/romquentin/python…
romquentin d9d371c
add test + correct dimension of weights
romquentin f6ae62f
docstring
nbara File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I haven't looked into it in detail, but since your events are entirely equidistant from one another, the "masked weight" is not going to have much of an effect.
In other words, the trend inferred from the masked data is pretty much exactly the same. Especially since you're only trying to fit a linear trend in this example.
If we want a more striking difference between the trial mask and the vanilla implementation we would probably need a slightly more sophisticated simulated dataset.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For instance, maybe we could add some pseudo-ERPs during the events, and see how it might mess up the detrending if we do not use a trial-mask
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Consider the slightly more complex example, with slightly longer 'events' to be masked out :
This produces very different detrending results :
I'm not sure which is necessarily better, but the two lines are different, meaning the trial-mask is clearly doing something
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@romquentin are you still here ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry for the delay. It is hard to find time working on it right now. Will try in the next coming weeks.
I will try on a real MEG dataset to see if it's worth or not. What do you think is the next step?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To me this is fine, so I would merge. We can always revisit this issue in a future PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sounds good ! Thank you