new cluster test API - #12663
Conversation
for more information, see https://pre-commit.ci
…inaFo/mne-python into new_cluster_stats_api_GSOC24
for more information, see https://pre-commit.ci
…inaFo/mne-python into new_cluster_stats_api_GSOC24
for more information, see https://pre-commit.ci
drammock
left a comment
There was a problem hiding this comment.
just a few comments to get you rolling. Maybe ping us when the formulaic bit is added? (or sooner if you have any questions in the meantime, of course!)
|
This might be related: |
|
I think it is a great idea to revamp the current cluster permutation test API 🚀! Could you please share the reasoning behind choosing a pandas DataFrame as the container for evokeds and related meta info? If possible, I'd try to avoid using pandas (an optional dependency) when something similar could be achieved using, for example, a simple dictionary. |
But this doesn't need to be user-facing, then, no? Just trying to understand. If a user passes in a list of TypedDicts or Dataclasses, you can internally create the DataFrames that need to be passed to formulaic. The user would then also get tab-completion assistance in their editor. But it's just a thought. Great work so far in any case! |
This would still require pandas to be available though. |
Sure |
For context, this is step 1 of a GSoC project. A later step involves (probably) creating helper functions that will create the necessary DataFrame for the user. That's not done here because:
|
|
@CarinaFo I pushed a commit to add the dataset and add If you look at the CI runs, you can see that CircleCI, which builds modified examples/tutorials in PRs, hit an error up on 9c8ec90: Then I pushed a little commit to fix that in 47363b5, and now it hits a different error (which replicates what I saw locally when I tried to run the example): It would be good to keep CircleCI green at least so we can see renderings of the tutorial with each push. If you make sure |
|
@drammock in 5756853 @larsoner tests the results of our new In Is this convincing enough to go ahead and update |
|
Great work @scott-huberty and awesome to have the test against the fieldtrip implementation @larsoner. I will review the changes and can definitely contribute to the new tutorial. |
yes go for it |
|
Per a discussion with @wmvanvliet and @CarinaFo - we agreed to strip out the plotting methods of |
|
@wmvanvliet do you want to |
|
works like a charm! |
|
|
|
Sounds like we need some unit tests that our output shapes match our input shapes... |
If I am not mistaken That probably means we'll have to swap
|
|
One thing we should remember to check... the docs don't say |
I checked and I think the adjacency docstring is shared with our legacy functions via the doc dict, which accounts for the misinformation. Probably worth making its docstring stand alone. I think “auto” sounds nice and is very explicit. +1 to merge after the next release of MNE so that we get 3 months to play around with it and make changes (if needed) without deprecation cycles, |
set up new cluster_test api that sets up design matrix based on Wilkinson formula (using formulaic package)
Update (01/26):