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

Enhance mlmnet function to support scalar inputs for lambdas and alphas parameters #14

Open
GregFa opened this issue Jan 25, 2024 · 0 comments

Comments

@GregFa
Copy link
Member

GregFa commented Jan 25, 2024

Description

I want to suggest an enhancement for the mlmnet function. Currently, the function requires vector inputs for parameters lambdas and alphas, even when only a single value is used. This can lead to unnecessary errors and additional coding overhead.

Current Behavior

When I pass a scalar value to the mlmnet function, it throws an error. For example:

lambdas = [0.05, 0.5, 5]
alphas = [0, 0.5, 1]
mlmnet(dat, lambdas[1], alphas[1], method = "fista", addZIntercept = false, addXIntercept = false, isVerbose = false);

This results in an error due to the scalar inputs for lambdas and alphas. Currently, the correct syntax would be for example:

mlmnet(dat, [lambdas[1]], [alphas[1]], method = "fista", addZIntercept = false, addXIntercept = false, isVerbose = false);

Suggested Behavior

It would be more user-friendly if the function could accept scalars when only one value is needed.
This change would simplify the function's usage when only one value is being used for these parameters.

Benefits

  • Reduces coding overhead.
  • Prevents common errors related to parameter types.
  • Enhances usability for simpler use cases.
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

1 participant