mne-tools / mne-tools/mne-python

BUG/ENH? no check for unique permutations in 2-samp clustering tests

Open
#4,953 17 comments 0 reactions 1 assignee View on GitHub

@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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.