Repository navigation
Short-trial preprocessing, lag budgets, compare_networks calibration and speed, auto time budget - #10
Merged
Merged
Conversation
…er the network resolution Short trials (e.g. 80-sample epochs) crashed preprocessing: a candidate whose context window leaves no fold with enough held-out windows returned its per-resolution scores in a different shape, and one spanning the whole trial failed on an empty array. Both now score 0, so they are never chosen. Adopting the uniform network resolution set every node's lag budget to the uniform history (often one sample); each node now keeps its own budget, at least that history, so sources acting at longer delays stay candidates. Co-authored-by: Cursor <cursoragent@cursor.com>
…on guidance Add curtail (Besag-Clifford sequential Monte Carlo p-values) and map_fn over edges with seeds drawn up front. A NaN observed difference now gives a NaN p-value instead of the smallest attainable one. Document that skeletons selected per condition make the test anti-conservative and show the pooled pattern. Co-authored-by: Cursor <cursoragent@cursor.com>
…dget The check ran a Gaussian selection with a local permutation null per nonlinear target before the pilot, outside the budget (about 1000 s per target on long broadband epochs). With a budget it now runs in rounds and stops once the rest would pass half the budget; unchecked targets select with the plug-in only, a recorded downgrade. The pilot also takes the Gaussian time from the check when no pilot target used the Gaussian estimator, instead of predicting zero. Co-authored-by: Cursor <cursoragent@cursor.com>
Per-target selection times are heavy-tailed (one Gaussian selection with a local null took 47 s and another nearly an hour on the same iEEG data), so neither the pilot's prediction nor rounds of the nonlinearity check kept runs in budget. Checks not started within half the budget are now skipped, and auto runs the selection itself so that targets not started within 80% of it select with the plug-in only; both are recorded as downgrades. Without a budget nothing changes. Co-authored-by: Cursor <cursoragent@cursor.com>
Scripts to select, download and epoch catFR1 sessions (OpenNeuro ds004809), run the within-subject contrast with pooled selection and calibration nulls, a per-edge null check, and a 25-subject region-level cohort with a between-subject paired test; report and figures. Epochs use the events' sample column: the BIDS onset column of this dataset is offset from the recording. Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
catFR1 subsequent-memory pilot and 25-subject cohort
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Library fixes found while running infoflow on intracranial EEG (catFR1, OpenNeuro ds004809). The pilot itself is in the stacked PR on
catfr-pilot.Changes
preprocess(andauto.infer) crashed on 80-sample epochs. Both now score 0 and are never chosen.compare_networkscurtail: sequential Monte Carlo p-values (Besag & Clifford 1991). On a 6-edge HFA contrast,curtail=10with 4 threads took 9 s against 69 s for 500 serial permutations, with the same decisions.map_fnover edges, with seeds drawn up front.auto.infertime budget. The nonlinear-target check ran outside the budget, and a 3-target pilot can't predict heavy-tailed per-target selection times (47 s to about 1 h on the same data). Checks not started within 50% of the budget are now skipped, and targets not started within 80% select with the plug-in only. Both are recorded as downgrades; nothing changes without a budget. In-flight selections still finish, and preprocessing runs before any budget logic, so this bounds the overrun but isn't a hard stop.Tests
Regression tests for the short-trial crash and the lag budgets, early stopping and the parallel map, a pooled-selection calibration check, and both budget deadlines. Full suite: 281 passed, 2 skipped (before the deadline commit), plus
tests/test_auto.py15 passed after it.Made with Cursor