Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

is there an option to regularize the mutation effects (beta parameters)? #168

Open
jbloom opened this issue Feb 6, 2025 · 4 comments
Open

Comments

@jbloom
Copy link
Collaborator

jbloom commented Feb 6, 2025

@Haddox @jgallowa07, is there any option to put a small regularization on the mutation effects (beta) parameters? I know I have argued in the past that this might not be a good idea (eg, mutations expected to have effects around zero), but now I am reconsidering that.

@Haddox
Copy link
Contributor

Haddox commented Feb 6, 2025

@jbloom: yes, there is an option to do this. And in fact, in our revised manuscript, we put a small ridge regularization on the betas. Without this term, some betas were inferred to have very negative values, likely because the values are underdetermined by the data. Adding the term helped constrain the values to a more realistic range. The approach validated well on the simulated data, and produced similar results with the spike data.

@jgallowa07 is probably the best person to describe how to turn on this option.

@jbloom
Copy link
Collaborator Author

jbloom commented Feb 6, 2025

OK, I think I found this? It is done via the scale_coeff_ridge_beta parameters in cells [37] and [38] here, is that correct @jgallowa07? And that can for instance just be passed to Model.fit?

@Haddox
Copy link
Contributor

Haddox commented Feb 7, 2025

Jared was out sick today, so I'll just chime in that the thing you found looks right to me. But, he can say for sure when he's back.

@jgallowa07
Copy link
Member

I believe you're using 4.2. Indeed, it looks like you can pass scale_coeff_ridge_beta directly to the Model.fit as a keyword argument that get's handed off to the objective function. Here is how the penalty ultimately impacts loss.

I'm also supportive of adding a ridge to beta's, seems to have helped many of the fits IIRC.

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

No branches or pull requests

3 participants