Repository navigation
fix: bump pypress to v0.2.4 for scale-invariant entropy penalty - #26
Merged
Merged
Conversation
pypress v0.2.4 makes TargetEntropy/Uniform's penalty scale-invariant in K (the number of predictive states) by normalizing the entropy deviation by log(K) before squaring, instead of letting the penalty's dynamic range grow as log(K)^2. That release also changed DegreesOfFreedom from an L1 to a squared L2 penalty, renaming its l1/dof_l1 params to l2/dof_l2. Updated all pypsps call sites, including renaming the public df_penalty_l1 parameter (in pypsps/keras/models.py's build_toy_model, build_model_binary_normal, build_model_binary_exponential, etc.) to df_penalty_l2, and the two demo notebooks that passed it by keyword. Co-Authored-By: Claude Sonnet 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.
Summary
pypressto v0.2.4, which fixesTargetEntropy/Uniform(pypress.keras.regularizers) not being scale-invariant inK(the number of predictive states) — the squared entropy deviation had a dynamic range that grew aslog(K)^2, so a fixedl2implied a different effective regularization strength depending onK.pypressv0.2.4 also changedDegreesOfFreedomfrom an L1 to a squared L2 penalty, renaming itsl1/dof_l1params tol2/dof_l2. Updated allpypspscall sites, including renaming the publicdf_penalty_l1parameter (inpypsps/keras/models.py) todf_penalty_l2, and the two demo notebooks that passed it by keyword.df_penalty_l1by keyword.Test plan
pytest pypsps/tests— 93 passedpypsps.keras.models,models_dev,models_dev2,models_dev_expall import cleanly🤖 Generated with Claude Code