Study
Study
A Study represents an optimization task.
This class provides interfaces to optimize an objective function within specified bounds and to manage user-defined attributes related to the study.
best_params
property
Returns the parameter set corresponding to the best value found during optimization.
Returns:
Type | Description |
---|---|
dict[str, Any]
|
The parameters (as a dictionary) that yielded |
best_solution
property
Returns the best solution found during optimization.
Returns:
Type | Description |
---|---|
dict[str, Any]
|
The solution (as a dictionary) that yielded |
best_value
property
Returns the best value found during optimization.
Returns:
Type | Description |
---|---|
float
|
The best value among |
mean_value
property
Returns the mean value of all results found during optimization.
Returns:
Type | Description |
---|---|
float
|
The mean value of |
__init__(seed=None, algorithm=ALGORITHM_DEFAULT)
Initializes a Study instance.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
seed
|
int | None
|
The seed for the Study. Defaults to None (uses system entropy). |
None
|
algorithm
|
GMAB
|
The optimization algorithm to use. Defaults to GMAB. |
ALGORITHM_DEFAULT
|
optimize(objective, params, n_trials, maximize=False, n_best=1, n_runs=1)
Optimize the objective function, saving results to study.results
.
The optimization process involves selecting suitable hyperparameter values within specified bounds and running the objective function for a given number of trials.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
objective
|
Callable
|
The objective function to optimize. |
required |
params
|
ParamsType
|
A dictionary of parameters with their bounds. |
required |
n_trials
|
int
|
The number of evaluations to perform on the objective. |
required |
maximize
|
bool
|
Indicates if objective is maximized. Default is False. |
False
|
n_best
|
int
|
The number of results to return per run. Default is 1. |
1
|
n_runs
|
int
|
The number of times optimization is repeated. Default is 1. |
1
|