Skip to content

lam_sparse_ratio and lam_orthog_ratio to control default cost function weights#9

Merged
jglaser2 merged 1 commit into
glaserlab:mainfrom
tscizzlebg:lam_ratios
May 21, 2026
Merged

lam_sparse_ratio and lam_orthog_ratio to control default cost function weights#9
jglaser2 merged 1 commit into
glaserlab:mainfrom
tscizzlebg:lam_ratios

Conversation

@tscizzlebg
Copy link
Copy Markdown
Contributor

@tscizzlebg tscizzlebg commented May 1, 2026

Simply allows changing the default 10% to another proportion (e.g., 20%) for lam_sparse and lam_orthog.

  • Did this with optional params lam_sparse_ratio and lam_orthog_ratio.
    • Added at the end of the param list, so should be fully backward-compatible, even if someone's script is passing in parms as positional args instead of keyword args.
    • Tried to be consistent with existing code / documentation style.
  • Added for both SCA and SCANonlinear.
    • Default values are .1, except for SCANonlinear's lam_orthog_ratio which defaults to 1 like it already was (and updated comment from 10% to 100% to match accordingly).

Motivation: Seems helpful/intuitive to be able to specify these cost weights relatively instead of directly, probably for the same reason the defaults are chosen that way.

@jglaser2
Copy link
Copy Markdown
Collaborator

jglaser2 commented May 3, 2026

Thanks! Seems like a great idea - I'll double check and merge later this week.

@jglaser2 jglaser2 merged commit 7a64891 into glaserlab:main May 21, 2026
@tscizzlebg tscizzlebg deleted the lam_ratios branch May 23, 2026 17:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants