feat: remove default hyperparameter grids and drop SVC default (roadmap 2.3, 2.5) - #42
Merged
Merged
Conversation
…ap 2.3, 2.5) - delete poniard/utils/hyperparameters.py (GRID incl. XGBoost grids and get_grid) and the grid=None lookup path in tune_estimator; grid is now required and passed through verbatim to sklearn's search classes. - missing/empty grid raises a clear ValueError. - drop SVC(kernel='linear', probability=True) from classifier defaults: slow and rarely competitive on tabular data. - fixes the LinearSVR/SVR grid-key mismatch (1.2) for good; LinearSVR fits cleanly with no default grid. - update tune tests: explicit-grid path for all modes + error path.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Roadmap 2.3 (delete default hyperparameter grids) and 2.5 (tighten default estimator lists). This is a subtractive change — no new capability, it removes opinionated defaults and a latent bug.
Changes
2.3 — remove default hyperparameter grids
poniard/utils/hyperparameters.pyentirely (GRIDdict — including the XGBoost/CatBoost/LightGBM grids for a non-dependency — andget_grid).tune_estimatorno longer falls back to aGRIDlookup ongrid=None.gridis now required and passed through verbatim to sklearn's search classes (thin wrapper, no surprise defaults). Missing/empty grid raises a clearValueError.LinearSVR/SVRgrid-key mismatch (roadmap 1.2): the grid was keyed"SVR"while the shipped estimator isLinearSVR, so the default-grid path raisedNotImplementedError.LinearSVRfits cleanly with no default grid.2.5 — drop SVC from classifier defaults
SVC(kernel="linear", probability=True)(slow, rarely competitive on tabular data) and its unused import. Regressor defaults were already aligned with the roadmap's target list and are unchanged.Breaking changes
tune_estimator(estimator_name, X, y)without agridnow raisesValueError(previously it looked up opinionated defaults).<estimator_name>__<param>), as before.Tests
test_tune.py: explicit-grid path for all three modes + error path (missing grid, empty grid).ruffclean.