Conversation
There was a problem hiding this comment.
Pull request overview
This PR adds a preliminary pipeline for computing and plotting Gaussian analytic PID results from a sinusoid-trained (Elman) RNN, while updating the training/evaluation script to report R² and saving outputs under src/analysis/results/.
Changes:
- Renames the RNN class to
ElmanRNNand removes the Jacobian-tracking method from thesrc/analysisimplementation. - Updates
main.pyto train the sinusoid RNN with a simple LR schedule, track R², save the trained model/hidden states, and generate training + rollout figures. - Adds scripts to compute PID for the sinusoid-trained RNN and to plot PID bar figures; removes an unused analysis
utils.pymodule.
Reviewed changes
Copilot reviewed 6 out of 18 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
src/analysis/utils.py |
Removes the (now unused) spectrum-error utility module from src/analysis. |
src/analysis/RNN.py |
Renames the model to ElmanRNN and removes calculate_jacobian. |
src/analysis/main.py |
Trains/evaluates the sinusoid RNN, tracks R², saves artifacts, and generates figures. |
src/analysis/compute_pid_sinusoid.py |
Runs a multi-trial sinusoid ensemble through the trained RNN and computes/saves PID results. |
src/analysis/PID_figures.py |
Loads saved PID results and plots bar charts with error bars. |
src/analysis/gaussian_pid.py |
Documentation wording/formatting adjustments for the Gaussian PID implementation. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+15
to
+18
| labels = ['Redundancy', 'Unique1', 'Unique2', 'Synergy'] | ||
| values = [out['redundancy'], out['unique1'], out['unique2'], out['synergy']] | ||
| stds = [out['redundancy_std'], out['unique1_std'], out['unique2_std'], out['synergy_std']] | ||
| total = out['mi_joint'] |
Comment on lines
16
to
18
| "PID at the last timestep" we must build an ensemble. We do this exactly the way | ||
| the real NeuroGym project will: we run the trained RNN over many *trials* and use | ||
| the our NeuroGym project will: we run the trained RNN over many "trials" and use | ||
| the trial dimension as the sample/ensemble axis. Each trial is the same sinusoid |
HarrisIp
pushed a commit
that referenced
this pull request
Jul 1, 2026
PID preliminary analysis on sinusoid-trained RNN
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.