Repository navigation
Dev rf glm fast sta - #82
Merged
Merged
Conversation
- Skip insert in make when no RFs were computed - Make snr nullable in quality table, insert None instead of NaN - Select the single params set via key_source so populate can be restricted by field etc. - Warn and use overlapping part when stimulus length differs from design matrix - Remove duplicate fit_kind fetch, unused best_pixel, stale comments; use tqdm.auto Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Add whiten and whiten_reg params to FastStaParamsTemplate. When enabled, the STA is multiplied by the ridge-regularized inverse stimulus covariance, computed once per parameter set. Includes tests for the whitening helper. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
RfGlmParamsTemplate/RfGlmTemplate now subclass the FastSta templates: the design matrix is built once per stimulus and stored in the params table, and traces are aligned to the stimulus directly (no DNoiseTrace). Only the fit step is replaced, via a new FastStaTemplate._compute_entry hook. - ReceptiveFieldGLM takes a precomputed design matrix (from_stim keeps the old raw-stimulus interface); permutation test now permutes the trace - Remove RfGlmSingleModelTemplate; quality table keys on the GLM table - Breaking: RfGlm primary key changes, existing tables must be recomputed - Fix build_design_matrix for 1D stimuli and np.NINF with numpy 2 Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
- Split core_schema into blocks (core, basic, location, classifier, rf_sta, rf_glm) with matching percent-format notebook parts. - make_user.py builds a personal schema and tutorial .ipynb (jupytext) from the selected blocks; the notebook is safe for Run all. - Add STA tables to rf_glm_schema. - Add jupytext extra, .flake8 and tests for the generator. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Port the fork-only GLM features (pre-computed design matrices, fit_R, fit_intercept, fit_hps, early stopping) into a subclass of rfest.GLM in djimaging, so the official rfest package can be used. jax/rfest are imported lazily, only when a GLM is fit. Also fix float() on 1-element arrays and unset df_ws for non-spatial stimuli in glm_utils, port generate_data_3d_stim into the tests, make FastSta restrict the params table by primary key only, and update the populate test stub to the current FastSta table contract. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
- Use DataJoint's tripartite make for FastSta/RfGlm, so the RFs are computed outside of the database transaction and long computations no longer lose the connection. make_fetch returns a digest-hashed object, because DataJoint's hash of the fetched traces is very slow. - FastSta: compute the STAs of all traces of a presentation with a single matrix product. - RfGlm: project the design matrix onto the spline bases once per populate, run the Adam optimization in compiled chunks that are cached across fits, and fit the traces of a presentation in parallel processes. - Add `n_jobs` to populate (default 30) to set the number of CPU cores. - Fix RfGlm with kfold=1 and several dfs returning the model of the last df instead of the best one. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Change the RfGlmParams defaults to a single fit on all data (kfold=0, frac_test=0, one df and beta, random init), which is fast and gives reasonable RFs. - RfGlmQuality: without test data, skip the permutation test and use the train scores only. Raise a clear error if no quality criterion applies. - Clip df_ts/df_ws once in prepare_sta_params and pass the clipped values to the fits, so the clipping warning is shown once instead of once per trace. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…otebooks Generated notebooks are named populate_<project>_schema and the schema name is ageuler_<login>_<project>. Project names must be valid python identifiers since they are part of the import path. Document the table block logic. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
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.
No description provided.