You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Unify the lrate default and fix raw-backend device auto-selection #354
Three default-behavior fixes that the documentation audit (#352) surfaced. They belong to epic #324 because its release already changes default fits.
Scope
One lrate default across entry points.
Today the AMICA wrapper defaults to lrate=0.05, the value in EEGLAB's runamica15.m. AMICATorchNG, AMICAMLXNG and AMICA_NumPy default to 0.1, the compiled amica15 default (amica15_header.f90:68). Every other pamica default also follows the compiled binary.
So AMICA().fit(X) and AMICATorchNG(n).fit(X) run different learning rates. User decision (2026-09-23): unify on 0.1.
The wrapper takes the default from the backend rather than restating it, and AMICAICA inherits it.
An explicit or params-file lrate is unaffected. Tests that relied on the wrapper's implicit 0.05 set it explicitly or move to the new default.
Raw AMICATorchNG auto device choice.
AMICATorchNG(n_channels=4) with default arguments raises ValueError on every Apple Silicon Mac: auto-selection picks MPS, which cannot represent the float64 default.
The AMICA wrapper already falls back to CPU in that case. Move that fallback into the backend so there is one implementation, with a log message.
An explicit device="mps" at float64 still raises.
Covered by a test that runs on the macOS CI runner.
Dead package data. Remove the package-data entry "pamica" = ["data/*"] from pyproject.toml, which names a directory that does not exist.
Documentation.docs/guides/amica-differences.md gains a defaults table covering pamica, the compiled amica15 binary and EEGLAB's runamica15.m, and says how to reproduce an EEGLAB run: the bundled input.param through from_params_file. The table includes:
Scope additions (2026-09-23), both following the user's decision that every pamica entry point shares one default set:
AMICA_NumPy's default params.json sets do_newton true and max_iter 2000, while PyTorch and MLX default to Newton off and 100 iterations. Align it.
AMICANative defaults to the bundled input.param values (lrate 0.05, Newton on, max_iter 2000, block_size 512). User decision: it moves to the shared set, so default runs of pamica and of the reference binary are directly comparable. Callers whose protocol depends on the old values pin them explicitly.
Activity
neuromechanist commentedon Sep 24, 2026
Scope additions (2026-09-23), both following the user's decision that every pamica entry point shares one default set:
AMICA_NumPy's defaultparams.jsonsetsdo_newtontrue andmax_iter2000, while PyTorch and MLX default to Newton off and 100 iterations. Align it.AMICANativedefaults to the bundledinput.paramvalues (lrate0.05, Newton on,max_iter2000,block_size512). User decision: it moves to the shared set, so default runs of pamica and of the reference binary are directly comparable. Callers whose protocol depends on the old values pin them explicitly.