Closed larsoner closed 6 years ago
you have my blessing :)
anything missing from the list for you? linear regression should probably be in the tutorial, too, but I'd rather let someone else add that (I have limited experience using it)
+1000 me and Jaakko had a lot of trouble identifying the right functions to do stuff. There were too many functions which seemed similar to each other.
This is great! Integrating examples with a coherent tutorial text as you suggest would really improve the stats module a lot. I also like the idea to clean up the examples after the general document is done.
As @jasmainak points out, there is a lot of overlap between several functions, especially in the permutation cluster module. For instance, why can't there be just one permutation_cluster
function instead of having permutation_cluster_test
, permutation_cluster_1samp_test
, spatio_temporal_cluster_test
, and spatio_temporal_cluster_1samp_test
? The function could decide whether to perform a one sample test vs. a two sample test based on the length of the first argument list. Adding to the confusion, permutation_t_test
sounds as if it belongs into the same category, but it does not - maybe some reorganization could help clear things up a bit. Also, bonferroni_correction and fdr_correction could be merged into one function (R has a p.adjust
function for that). There's certainly more, but these are the most important points that come to mind (because these are the functions I've worked with so far).
I agree with @cbnr - there is a need for a more general, more user-friendly interface to cluster-based permutation tests. I have frequently found people (students for example) confused by the current way clustering tests work. It would be really cool if we could have and interface where one could do this for example:
clst = ClusterTest([evokeds_cnd1, evokeds_cnd2], test='independent t-test', adjacency=adj,
tmax=0.5, picks=chan_idx)
# and ideally something like:
clst.pick_clusters('p < 0.05')
clst.plot_clusters()
# which would then raise an error because no clusters were left ;)
That's a far fetched vision, but at least the first step could be done in not so distant future - first for simple cases like evokeds with t-tests and later anova or regression (I have a fast cluster_based_regression
that I could contribute to mne). As a small step in this direction in the next week I can finally add a plotting function for adjacency matrices.
I like the idea of drafting the API and start by how examples would be simplified showing short and possibly incomplete code snippets
Joint clusters test function would be cool.
As would cluster_based_regression
.
For the people I hang out with, a thing they do a lot is select mean activity in some window of activity (mean time points, usually over trials, and sometimes channels) and then run an ANOVA or mixed-effects regression over subjects and conditions. I'd contribute a write-up for that eventually.
People seem to have trouble using our stats code. I think the biggest problem is that our explanations are not so clear. Maybe there are some API simplifications we could make, too, but hopefully rewriting docs will make this clear.
I think we need to make a single tutorial file that has:
I think this would go a long way toward resolving some ambiguity for people.
We currently have the following examples / tutorials for stats -- I think that the permutation/clustering one is too long / hard to navigate (can probably be collapsed to 3-4 examples after the above tutorial is done):
FDR:
Linear regression
non-parametric / permutation-based:
Thoughts?