mne-tools / mne-tools/mne-python
Support for regression using VolSourceEstimate
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 3.5k
- Forks
- 1.6k
- Avg merge
- 1d 6h
- Merged PRs (30d)
- 100
Description
Describe the new feature or enhancement
Currently the linear_regression function only accepts SourceEstimate, but gives an error if attempting to use VolSourceEstimate. As far as I'm aware there shouldn't be any reason why this can't work for volume source estimates as well.
Describe your proposed implementation
Adding VolSourceEstimate to the relevant type checking lines in https://github.com/mne-tools/mne-python/blob/main/mne/stats/regression.py#L21 enables the linear_regression function to accept VolSourcEstimates as input:
Line 75:
elif isinstance(inst, list) and isinstance(inst[0], (SourceEstimate, VolSourceEstimate)):
Line 91:
if not isinstance(out_, (SourceEstimate, VolSourceEstimate, Evoked)):
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 in mne/stats/regression.py at the linear_regression type checks around lines 75 and 91. Reproduce the current rejection with a VolSourceEstimate, then verify that linear_regression accepts it wherever SourceEstimate is accepted. The issue does not name a test file, so inspect the existing regression coverage before adding or updating a focused test.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- machine-learning
- Issue type
- Feature
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 45/100