Repository navigation
Commit 35a6d53
committed
[FIX] ASR: asr_calibrate must pass step_sizes to fit_eeg_distribution
fit_eeg_distribution's step_sizes default was [0.0220, 0.6000], an
accidental copy of the fit_quantiles default. That value collapses the
grid search over dropout/scale to essentially a single point, so
asr_calibrate (which called fit_eeg_distribution without step_sizes)
inherited a degenerate grid, biasing the fitted mu/sig and hence the
threshold matrix T.
fit_eeg_distribution's own docstring already documents
default=[0.01, 0.01] for step_sizes, matching the value clean_windows
already passes explicitly. Correct the signature default to match the
docstring, and have asr_calibrate pass step_sizes=[0.01, 0.01]
explicitly (mirroring clean_windows) so its behavior no longer depends
on the buggy default.
Added a regression test that builds a windowed-RMS vector from the
eeg_raw.npy fixture (mirroring asr_calibrate's own windowing) and
asserts that fit_eeg_distribution's default step_sizes now matches an
explicit [0.01, 0.01] call, while the old [0.022, 0.6] default
diverges materially.1 parent 3721224 commit 35a6d53
3 files changed
Lines changed: 37 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
511 | 511 | | |
512 | 512 | | |
513 | 513 | | |
514 | | - | |
| 514 | + | |
| 515 | + | |
515 | 516 | | |
516 | 517 | | |
517 | 518 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
13 | | - | |
| 13 | + | |
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
| 10 | + | |
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| |||
258 | 258 | | |
259 | 259 | | |
260 | 260 | | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
261 | 294 | | |
262 | 295 | | |
263 | 296 | | |
| |||
0 commit comments