Repository navigation
Commit d24300b
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 107cd1b commit d24300b
3 files changed
Lines changed: 36 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
541 | 541 | | |
542 | 542 | | |
543 | 543 | | |
544 | | - | |
| 544 | + | |
| 545 | + | |
545 | 546 | | |
546 | 547 | | |
547 | 548 | | |
| |||
| 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 | |
|---|---|---|---|
| |||
418 | 418 | | |
419 | 419 | | |
420 | 420 | | |
| 421 | + | |
| 422 | + | |
| 423 | + | |
| 424 | + | |
| 425 | + | |
| 426 | + | |
| 427 | + | |
| 428 | + | |
| 429 | + | |
| 430 | + | |
| 431 | + | |
| 432 | + | |
| 433 | + | |
| 434 | + | |
| 435 | + | |
| 436 | + | |
| 437 | + | |
| 438 | + | |
| 439 | + | |
| 440 | + | |
| 441 | + | |
| 442 | + | |
| 443 | + | |
| 444 | + | |
| 445 | + | |
| 446 | + | |
| 447 | + | |
| 448 | + | |
| 449 | + | |
| 450 | + | |
| 451 | + | |
| 452 | + | |
| 453 | + | |
421 | 454 | | |
422 | 455 | | |
423 | 456 | | |
| |||
0 commit comments