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

NestedParameter object to group parameters in case of many parameters #28

Open
AKuederle opened this issue Mar 17, 2022 · 1 comment
Open

Comments

@AKuederle
Copy link
Member

No description provided.

@AKuederle
Copy link
Member Author

AKuederle commented Sep 21, 2022

I think Param groups have value in certain cases, where parameters really belong together tightly (i.e. filter params), but would make sense to be changed independently (so that the nested set_params call would be required.

Otherwise, maybe there are other options:

  • Group related parameters using namedtuples. Downside: Does not allow nested set_params

  • Write out all parameters, but provide new set_... methods to partially set the values. Users would then not set all parameters in the init, but chain set_... calls. This could make Algorithms with large number of Parameters much more readable without including additional nesting.

  • From a user side, users could also just group parameters into multiple dicts, before passing them to the init and then use dict unpacking. This could also help to make code more readable.

Bottom-line, I think a ParameterGroup would only add complexity that is rarely needed. But I will keep the issue open for further consideration

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