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

Restrict condition to only when my_lambda = NULL #57

Closed
Theo-qua opened this issue Sep 2, 2024 · 5 comments · Fixed by #58
Closed

Restrict condition to only when my_lambda = NULL #57

Theo-qua opened this issue Sep 2, 2024 · 5 comments · Fixed by #58
Assignees
Labels
bug Something isn't working

Comments

@Theo-qua
Copy link
Collaborator

Theo-qua commented Sep 2, 2024

Hello Waldir,
Now the plots function works for both the R and C++.

I tried the cv_MADMMplasso but had a problem because the new line we have included;

Validation

stopifnot(nlambda <= maxgrid)

The cv_MADMMplasso does not need maxgrid so I think the condition should placed inside

if (is.null(my_lambda))

With this, the MADMMplasso call in the cv_MADMMplasso will not use maxgrid but the following;
} else {
lambda_i <- my_lambda
gg1 <- gg
gg <- gg1
}

Best regards,
Theo

@wleoncio
Copy link
Member

wleoncio commented Sep 2, 2024

Hi Theo,

Thanks for testing and reporting. I'm trying to wrap my head around your, but what I'm thinking right now is that if maxgrid is not used by cv_MADMMplasso(), then it should be made an optional argument, ideally by giving it a default value. Assuming nlambda is a mandatory argument, perhaps we can default to maxgrid = nlambda?

@wleoncio wleoncio added the bug Something isn't working label Sep 2, 2024
@Theo-qua
Copy link
Collaborator Author

Theo-qua commented Sep 2, 2024

I think we can move the line "stopifnot(nlambda <= maxgrid)" from the current position into "if (is.null(my_lambda))". This should solve the problem.

@wleoncio
Copy link
Member

wleoncio commented Sep 3, 2024

OK, will do.

@wleoncio wleoncio self-assigned this Sep 3, 2024
@wleoncio wleoncio linked a pull request Sep 3, 2024 that will close this issue
@Theo-qua
Copy link
Collaborator Author

Theo-qua commented Sep 3, 2024 via email

@wleoncio
Copy link
Member

wleoncio commented Sep 3, 2024

Wonderful to hear! :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants