File tree Expand file tree Collapse file tree 2 files changed +2
-12
lines changed Expand file tree Collapse file tree 2 files changed +2
-12
lines changed Original file line number Diff line number Diff line change 1616from openml .extensions .sklearn import cat
1717from openml .extensions .sklearn import cont
1818import optuna
19- import optunahub
2019from sklearn .compose import ColumnTransformer
2120from sklearn .ensemble import RandomForestClassifier
2221from sklearn .impute import SimpleImputer
6059# =====================================================
6160
6261## Optuna explanation
63- # Since we use `OptunaHub <https://hub.optuna.org/>`__ for the benchmarking of hyperparameter optimization,
6462# we follow the `Optuna <https://github.com/optuna/optuna/>`__ search space design.
6563
6664## OpenML runs
@@ -99,17 +97,10 @@ def objective(trial: optuna.Trial) -> Pipeline:
9997 return accuracy
10098
10199
102- ############################################################################
103- # Load a sampler from OptunaHub
104- # =============================
105- sampler = optunahub .load_module ("samplers/hebo" ).HEBOSampler (seed = seed )
106-
107- logger .log (0 , f"Sampler used { sampler } " )
108-
109100############################################################################
110101# Optimize the pipeline
111102# =====================
112- study = optuna .create_study (direction = "maximize" , sampler = sampler )
103+ study = optuna .create_study (direction = "maximize" )
113104logger .log (0 , f"Study { study } " )
114105study .optimize (objective , n_trials = 15 )
115106
Original file line number Diff line number Diff line change 11openml >= 0.15.1
2- optunahub
3- hebo
2+ plotly
You can’t perform that action at this time.
0 commit comments