mne-tools / mne-tools/mne-python
I find the "Statistical inference" tutorial extremely hard to follow
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 3.5k
- Forks
- 1.6k
- Avg merge
- 1d 6h
- Merged PRs (30d)
- 100
Description
https://mne.tools/stable/auto_tutorials/stats-sensor-space/10_background_stats.html
Don't get me wrong, the content itself is great, but to me, the "important bits" get totally hidden behind a wall of code blocks that do complex visualizations and fake data generation, so anytime I look at this thing, I'm struggling to find the actually relevant parts – those that show me how to do statistics! Meaning, at the end of the day, the tutorial isn't very helpful at all, and this is a pity!
And I cannot relate to the data being used at all.
For example, this is the data:
width = 40
n_subjects = 10
signal_mean = 100
signal_sd = 100
noise_sd = 0.01
gaussian_sd = 5
sigma = 1e-3 # sigma for the "hat" method
n_permutations = 'all' # run an exact test
n_src = width * width
# For each "subject", make a smoothed noisy signal with a centered peak
rng = np.random.RandomState(2)
X = noise_sd * rng.randn(n_subjects, width, width)
# Add a signal at the center
X[:, width // 2, width // 2] = signal_mean + rng.randn(n_subjects) * signal_sd
# Spatially smooth with a 2D Gaussian kernel
size = width // 2 - 1
gaussian = np.exp(-(np.arange(-size, size + 1) ** 2 / float(gaussian_sd ** 2)))
for si in range(X.shape[0]):
for ri in range(X.shape[1]):
X[si, ri, :] = np.convolve(X[si, ri, :], gaussian, 'same')
for ci in range(X.shape[2]):
X[si, :, ci] = np.convolve(X[si, :, ci], gaussian, 'same')
What does that even mean? I can't remember the last time I used np.convolve manually, and how's this blurry thing we're creating in any way related to the neurophysiological recordings I'm wanting to analyze?
If anybody has any ideas on how to make this tutorial more approachable to ordinary users, it would be greatly appreciated!
cc @sappelhoff
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.
Research direction
Start with the tutorial at stable/auto_tutorials/stats-sensor-space/10_background_stats.html, especially the sections using generated data, visualizations, and np.convolve. Identify which explanations and examples make the statistical workflow difficult to follow for ordinary MNE users, then define a clearer presentation whose completion can be checked by reviewing the tutorial end to end.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- numpy, python
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100