mne-tools / mne-tools/mne-python
BUG/ENH? no check for unique permutations in 2-samp clustering tests
@dengemann is already working on this.
Since Apr 18, 2018.
- Dominant language
- Python
- Stars
- 3.5k
- Forks
- 1.6k
- Avg merge
- 1d 6h
- Merged PRs (30d)
- 100
Description
Looking at the permutation mechanics in cluster_level.py it is striking that for 1samp tests we take care of exact permutations and avoid duplicates via _get_1samp_orders whereas for 2samp tests we simply rely on rng.permutations which does btw. not cycle through all permutations before repeating but just redraws permutations randomly.
https://github.com/mne-tools/mne-python/blob/master/mne/stats/cluster_level.py#L843
https://github.com/mne-tools/mne-python/blob/master/mne/stats/cluster_level.py#L847
This can in principle lead to an inflated H0 when stats are repeated. Anyways I do not see any reasons for this forking of logic.
Any thoughts @larsoner ?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.