« Back to top page

Random Forest

Random Forest

SMAC3

Class or Function Names SAMCSampler Installation pip install -r https://hub.optuna.org/samplers/smac_sampler/requirements.txt Example import optuna import optunahub module = optunahub.load_module("samplers/smac_sampler") SMACSampler = module.SMACSampler def objective(trial: optuna.trial.Trial) -> float: x = trial.suggest_float("x", -10, 10) y = trial.suggest_int("y", -10, 10) return x**2 + y**2 n_trials = 100 sampler = SMACSampler( { "x": optuna.distributions.FloatDistribution(-10, 10), "y": optuna.distributions.IntDistribution(-10, 10), }, n_trials=n_trials, ) study = optuna.create_study(sampler=sampler) study.optimize(objective, n_trials=n_trials) print(study.best_trial.params) See example.py for a full example. Others SMAC is maintained by the SMAC team in automl.