Skip to content

Fix nested parameter routing in set_params for term-specific parameters#585

Open
ishan372or wants to merge 2 commits into
dswah:mainfrom
ishan372or:bug/fixing_set_params
Open

Fix nested parameter routing in set_params for term-specific parameters#585
ishan372or wants to merge 2 commits into
dswah:mainfrom
ishan372or:bug/fixing_set_params

Conversation

@ishan372or

Copy link
Copy Markdown

This PR adds support for sklearn-style nested parameter routing in set_params.
Previously, nested parameters such as:

gam.set_params(terms__0__n_splines=30)

were treated as literal attribute names and silently ignored. As a result, term-specific hyperparameter tuning through tools such as GridSearchCV would not actually modify the underlying terms.

Referencing: #580

Changes:
Added support for resolving nested parameter paths containing __.
Added a regression test covering term-specific parameter updates.

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 this pull request may close these issues.

1 participant