Add optimizer comparison example: HillClimbing vs BayesianOptimizer#241
Open
direkkakkar319-ops wants to merge 1 commit intohyperactive-project:mainfrom
Open
Conversation
Author
|
Hi, @SimonBlanke After i read the Documentation part in , when i saw the examples there this example was missing so I thought to add it . I would provide better understanding to the user for using to compare two algorithms |
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.
Description
Adds a new example
optimizer_comparison_example.pytoexamples/gfo/that demonstrates optimizer swapping — one of Hyperactive's core strengths. The sameRandomForestClassifierexperiment and search space is run with bothHillClimbingandBayesianOptimizer, showing that only the optimizer line needs to change.Related Issues
None — this is a proactive addition. No existing example in
examples/gfo/covers multiple optimizers side by side.Type of Change
[BUG]- Bug fix (non-breaking change fixing an issue)[ENH]- New feature (non-breaking change adding functionality)[DOC]- Documentation changes[MNT]- MaintenanceHow was this solved?
Created a single example file that:
SklearnCvExperimentwithRandomForestClassifier+ 5-fold CV on Iris) onceHillClimbingandBayesianOptimizerseparately using the exact same experiment and search spaceAdded optimizer comparison example (HillClimbing vs BayesianOptimizer) on RandomForest — not present in existing
examples/gfo/folder.Checklist
[ENH]make check(lint, format, isort)Testing
Run the example directly to verify:
bashExpected output: best parameters and CV scores for both optimizers printed, followed by a comparison table.
Additional Notes
n_iter=30is used-->to show meaningful differences between optimizersrandom_state=42-- ensures reproducible results across runsexamples/gfo/demonstrates a single optimizer only this is the first cross-optimizer comparison example