clean_channels: make the RANSAC random seed a parameter

Open Beginner friendly
#540 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
77/100
Issue type
Feature
Clarity
Clearly specified
Activity status
Active
Tech stack
numpy, python
Domain
data

Research direction

Read clean_channels.py and inspect clean_channels where RandomState(5489) creates the RANSAC subsets; compare how calc_projector accepts a random stream. Add a seed parameter with the existing value as its default, record the chosen value in EEG["etc"], and check that the default preserves results while callers can select a seed.

Written by the indexing model from the issue text.

Description

clean_channels draws its RANSAC subsets from numpy.random.RandomState(5489), hardcoded (clean_channels.py, "replicate
MATLAB's default randseed"). A pipeline that records every parameter cannot list or change the seed:

import inspect, eegprep
from eegprep import clean_channels
print(list(inspect.signature(clean_channels).parameters))
# ['EEG', 'corr_threshold', 'noise_threshold', 'window_len', 'max_broken_time', 'num_samples', 'subset_size']
print([l.strip() for l in inspect.getsource(inspect.getmodule(clean_channels)).splitlines() if "RandomState(5489)" in l])

Expected: a keyword (for example seed: int = 5489, so results do not change) and the value used recorded in
EEG["etc"]. calc_projector already accepts a stream.

Checked on eegprep 0.5.0 and on the develop branch at commit 89eb411 (2026-11-05).

Dominant language
Python
Stars
38
Forks
7
Avg merge
1d 3h
Merged PRs (30d)
65

Getting set up

  • Ships a Dockerfile or Docker Compose file
  • No pull request template
  • No 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.

More from sccn/eegprep

All issues in sccn/eegprep

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.