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

ERROR: cannot specify both lambda and lambda_min_ratio - despite only specifying lambda #72

Closed
tiemvanderdeure opened this issue Sep 23, 2024 · 0 comments · Fixed by #73

Comments

@tiemvanderdeure
Copy link

From version 0.7.3, I started getting an error ERROR: cannot specify both lambda and lambda_min_ratio when fitting wide model matrices to binomial response data and specifying lambda (but not lambda_min_ratio).

I think the reason is this line of code, where a length(y) was changed to a size(y, 1) in version 0.7.3 - which is not the same thing when fitting binomial data.

MWE:

n = 1000
m = 1200
y = rand(Bool, n)
y_mat = [(1 .- y) y]
X = rand(n, m)
lambda = collect(0.01:0.01:1)

glmnet(X, y_mat, GLMNet.Binomial(); lambda)
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 a pull request may close this issue.

1 participant