Sampler¶
sklearn_optuna.optuna.Sampler
¶
Bases: BaseClassWrapper
Wrapper for Optuna samplers used in hyperparameter optimization.
Parameters ¶
| Name | Type | Description | Default |
|---|---|---|---|
sampler
|
type
|
Optuna sampler class to instantiate. |
optuna.samplers.TPESampler
|
**params
|
dict
|
Parameters to pass to the sampler constructor. |
{}
|
See Also ¶
sklearn_optuna.search.OptunaSearchCV: The main search class that uses samplers.sklearn_optuna.optuna.Storage: Wrapper for Optuna storage backends.
Source Code ¶
Source code in src/sklearn_optuna/optuna.py
Tutorials¶
The following example notebooks use this component:
-
How to Choose and Configure a Sampler
Control the optimization algorithm and get reproducible results with Optuna samplers.
-
How to Stop Optimization Early with Callbacks
Stop unneeded work early by adding Optuna callbacks to your search.
-
OptunaSearchCV Quickstart
Run a fast hyperparameter search and read the best parameters and score.