1. Lightweight, versatile, and platform agnostic architecture

Optuna is entirely written in Python and has few dependencies. This means that we can quickly move to the real example once you get interested in Optuna.

Quadratic Function Example

Usually, Optuna is used to optimize hyperparameters, but as an example, let’s optimize a simple quadratic function: \((x - 2)^2\).

First of all, import optuna.

import optuna

In optuna, conventionally functions to be optimized are named objective.

def objective(trial):
    x = trial.suggest_float("x", -10, 10)
    return (x - 2) ** 2

This function returns the value of \((x - 2)^2\). Our goal is to find the value of x that minimizes the output of the objective function. This is the “optimization.” During the optimization, Optuna repeatedly calls and evaluates the objective function with different values of x.

A Trial object corresponds to a single execution of the objective function and is internally instantiated upon each invocation of the function.

The suggest APIs (for example, suggest_float()) are called inside the objective function to obtain parameters for a trial. suggest_float() selects parameters uniformly within the range provided. In our example, from \(-10\) to \(10\).

To start the optimization, we create a study object and pass the objective function to method optimize() as follows.

study = optuna.create_study()
study.optimize(objective, n_trials=100)

You can get the best parameter as follows.

best_params = study.best_params
found_x = best_params["x"]
print("Found x: {}, (x - 2)^2: {}".format(found_x, (found_x - 2) ** 2))
Found x: 2.002501522998135, (x - 2)^2: 6.257617310198862e-06

We can see that the x value found by Optuna is close to the optimal value of 2.

Note

When used to search for hyperparameters in machine learning, usually the objective function would return the loss or accuracy of the model.

Study Object

Let us clarify the terminology in Optuna as follows:

  • Trial: A single call of the objective function

  • Study: An optimization session, which is a set of trials

  • Parameter: A variable whose value is to be optimized, such as x in the above example

In Optuna, we use the study object to manage optimization. Method create_study() returns a study object. A study object has useful properties for analyzing the optimization outcome.

To get the dictionary of parameter name and parameter values:

{'x': 2.002501522998135}

To get the best observed value of the objective function:

study.best_value
6.257617310198862e-06

To get the best trial:

study.best_trial
FrozenTrial(number=33, state=TrialState.COMPLETE, values=[6.257617310198862e-06], datetime_start=datetime.datetime(2022, 11, 29, 2, 39, 0, 116409), datetime_complete=datetime.datetime(2022, 11, 29, 2, 39, 0, 117799), params={'x': 2.002501522998135}, user_attrs={}, system_attrs={}, intermediate_values={}, distributions={'x': FloatDistribution(high=10.0, log=False, low=-10.0, step=None)}, trial_id=33, value=None)

To get all trials:

study.trials
[FrozenTrial(number=0, state=TrialState.COMPLETE, values=[85.02084640678648], datetime_start=datetime.datetime(2022, 11, 29, 2, 39, 0, 69661), datetime_complete=datetime.datetime(2022, 11, 29, 2, 39, 0, 70108), params={'x': -7.220674943125718}, user_attrs={}, system_attrs={}, intermediate_values={}, distributions={'x': FloatDistribution(high=10.0, log=False, low=-10.0, step=None)}, trial_id=0, value=None), FrozenTrial(number=1, state=TrialState.COMPLETE, values=[11.592261450048726], datetime_start=datetime.datetime(2022, 11, 29, 2, 39, 0, 70562), datetime_complete=datetime.datetime(2022, 11, 29, 2, 39, 0, 70840), params={'x': -1.4047410254010106}, user_attrs={}, system_attrs={}, intermediate_values={}, distributions={'x': FloatDistribution(high=10.0, log=False, low=-10.0, step=None)}, trial_id=1, value=None), FrozenTrial(number=2, state=TrialState.COMPLETE, values=[52.34485465810557], datetime_start=datetime.datetime(2022, 11, 29, 2, 39, 0, 71230), datetime_complete=datetime.datetime(2022, 11, 29, 2, 39, 0, 71507), params={'x': 9.234974406181792}, user_attrs={}, system_attrs={}, intermediate_values={}, distributions={'x': FloatDistribution(high=10.0, log=False, low=-10.0, step=None)}, trial_id=2, value=None), FrozenTrial(number=3, state=TrialState.COMPLETE, values=[0.0030436098179358485], datetime_start=datetime.datetime(2022, 11, 29, 2, 39, 0, 71884), datetime_complete=datetime.datetime(2022, 11, 29, 2, 39, 0, 72135), params={'x': 2.0551689207610213}, user_attrs={}, system_attrs={}, intermediate_values={}, distributions={'x': FloatDistribution(high=10.0, log=False, low=-10.0, step=None)}, trial_id=3, value=None), FrozenTrial(number=4, state=TrialState.COMPLETE, values=[20.138173005981557], datetime_start=datetime.datetime(2022, 11, 29, 2, 39, 0, 72507), datetime_complete=datetime.datetime(2022, 11, 29, 2, 39, 0, 72770), params={'x': 6.487557576898769}, user_attrs={}, system_attrs={}, intermediate_values={}, distributions={'x': FloatDistribution(high=10.0, log=False, low=-10.0, step=None)}, trial_id=4, value=None), FrozenTrial(number=5, state=TrialState.COMPLETE, values=[54.87623888147919], datetime_start=datetime.datetime(2022, 11, 29, 2, 39, 0, 73149), datetime_complete=datetime.datetime(2022, 11, 29, 2, 39, 0, 73412), params={'x': 9.407849814992147}, user_attrs={}, system_attrs={}, intermediate_values={}, distributions={'x': FloatDistribution(high=10.0, log=False, low=-10.0, step=None)}, trial_id=5, value=None), FrozenTrial(number=6, state=TrialState.COMPLETE, values=[143.54490844772437], datetime_start=datetime.datetime(2022, 11, 29, 2, 39, 0, 73795), datetime_complete=datetime.datetime(2022, 11, 29, 2, 39, 0, 74068), params={'x': -9.981022846473683}, user_attrs={}, system_attrs={}, intermediate_values={}, distributions={'x': FloatDistribution(high=10.0, log=False, low=-10.0, step=None)}, trial_id=6, value=None), FrozenTrial(number=7, state=TrialState.COMPLETE, values=[25.648594457524034], datetime_start=datetime.datetime(2022, 11, 29, 2, 39, 0, 74445), datetime_complete=datetime.datetime(2022, 11, 29, 2, 39, 0, 74716), params={'x': -3.064444141021207}, user_attrs={}, system_attrs={}, intermediate_values={}, distributions={'x': FloatDistribution(high=10.0, log=False, low=-10.0, step=None)}, trial_id=7, value=None), FrozenTrial(number=8, state=TrialState.COMPLETE, values=[27.265367208728204], datetime_start=datetime.datetime(2022, 11, 29, 2, 39, 0, 75089), datetime_complete=datetime.datetime(2022, 11, 29, 2, 39, 0, 75398), params={'x': 7.221624958643449}, user_attrs={}, system_attrs={}, intermediate_values={}, distributions={'x': FloatDistribution(high=10.0, log=False, low=-10.0, step=None)}, trial_id=8, value=None), FrozenTrial(number=9, state=TrialState.COMPLETE, values=[41.94264408182111], datetime_start=datetime.datetime(2022, 11, 29, 2, 39, 0, 75774), datetime_complete=datetime.datetime(2022, 11, 29, 2, 39, 0, 76058), params={'x': -4.476314081468031}, user_attrs={}, system_attrs={}, intermediate_values={}, distributions={'x': FloatDistribution(high=10.0, log=False, low=-10.0, step=None)}, trial_id=9, value=None), FrozenTrial(number=10, state=TrialState.COMPLETE, values=[0.6033860532959927], datetime_start=datetime.datetime(2022, 11, 29, 2, 39, 0, 76431), datetime_complete=datetime.datetime(2022, 11, 29, 2, 39, 0, 78139), params={'x': 2.7767792822262916}, user_attrs={}, system_attrs={}, intermediate_values={}, distributions={'x': FloatDistribution(high=10.0, log=False, low=-10.0, step=None)}, trial_id=10, value=None), FrozenTrial(number=11, state=TrialState.COMPLETE, values=[0.4321297472505185], datetime_start=datetime.datetime(2022, 11, 29, 2, 39, 0, 78677), datetime_complete=datetime.datetime(2022, 11, 29, 2, 39, 0, 79925), params={'x': 2.657365763673861}, user_attrs={}, system_attrs={}, intermediate_values={}, distributions={'x': FloatDistribution(high=10.0, log=False, low=-10.0, step=None)}, trial_id=11, value=None), FrozenTrial(number=12, state=TrialState.COMPLETE, values=[0.00545359360736227], datetime_start=datetime.datetime(2022, 11, 29, 2, 39, 0, 80355), datetime_complete=datetime.datetime(2022, 11, 29, 2, 39, 0, 81550), params={'x': 1.9261515497294475}, user_attrs={}, system_attrs={}, intermediate_values={}, distributions={'x': FloatDistribution(high=10.0, log=False, low=-10.0, step=None)}, trial_id=12, value=None), FrozenTrial(number=13, state=TrialState.COMPLETE, values=[0.008764507004953617], datetime_start=datetime.datetime(2022, 11, 29, 2, 39, 0, 81994), datetime_complete=datetime.datetime(2022, 11, 29, 2, 39, 0, 83181), params={'x': 1.9063810542413897}, user_attrs={}, system_attrs={}, intermediate_values={}, distributions={'x': FloatDistribution(high=10.0, log=False, low=-10.0, step=None)}, trial_id=13, value=None), FrozenTrial(number=14, state=TrialState.COMPLETE, values=[3.9725596969663566], datetime_start=datetime.datetime(2022, 11, 29, 2, 39, 0, 83640), datetime_complete=datetime.datetime(2022, 11, 29, 2, 39, 0, 84832), params={'x': 0.006871881447066519}, user_attrs={}, system_attrs={}, intermediate_values={}, distributions={'x': FloatDistribution(high=10.0, log=False, low=-10.0, step=None)}, trial_id=14, value=None), FrozenTrial(number=15, state=TrialState.COMPLETE, values=[9.573427195969954], datetime_start=datetime.datetime(2022, 11, 29, 2, 39, 0, 85261), datetime_complete=datetime.datetime(2022, 11, 29, 2, 39, 0, 86462), params={'x': 5.094095537628073}, user_attrs={}, system_attrs={}, intermediate_values={}, distributions={'x': FloatDistribution(high=10.0, log=False, low=-10.0, step=None)}, trial_id=15, value=None), FrozenTrial(number=16, state=TrialState.COMPLETE, values=[3.1704496195650855], datetime_start=datetime.datetime(2022, 11, 29, 2, 39, 0, 86888), datetime_complete=datetime.datetime(2022, 11, 29, 2, 39, 0, 88147), params={'x': 0.21942435724704867}, user_attrs={}, system_attrs={}, intermediate_values={}, distributions={'x': FloatDistribution(high=10.0, log=False, low=-10.0, step=None)}, trial_id=16, value=None), FrozenTrial(number=17, state=TrialState.COMPLETE, values=[6.116269473686712], datetime_start=datetime.datetime(2022, 11, 29, 2, 39, 0, 88576), datetime_complete=datetime.datetime(2022, 11, 29, 2, 39, 0, 89815), params={'x': 4.473109272492162}, user_attrs={}, system_attrs={}, intermediate_values={}, distributions={'x': FloatDistribution(high=10.0, log=False, low=-10.0, step=None)}, trial_id=17, value=None), FrozenTrial(number=18, state=TrialState.COMPLETE, values=[26.870656378645396], datetime_start=datetime.datetime(2022, 11, 29, 2, 39, 0, 90243), datetime_complete=datetime.datetime(2022, 11, 29, 2, 39, 0, 91508), params={'x': -3.183691385359028}, user_attrs={}, system_attrs={}, intermediate_values={}, distributions={'x': FloatDistribution(high=10.0, log=False, low=-10.0, step=None)}, trial_id=18, value=None), FrozenTrial(number=19, state=TrialState.COMPLETE, values=[0.9970881244964235], datetime_start=datetime.datetime(2022, 11, 29, 2, 39, 0, 91939), datetime_complete=datetime.datetime(2022, 11, 29, 2, 39, 0, 93153), params={'x': 1.0014569991750863}, user_attrs={}, system_attrs={}, intermediate_values={}, distributions={'x': FloatDistribution(high=10.0, log=False, low=-10.0, step=None)}, trial_id=19, value=None), FrozenTrial(number=20, state=TrialState.COMPLETE, values=[4.536624562368598], datetime_start=datetime.datetime(2022, 11, 29, 2, 39, 0, 93580), datetime_complete=datetime.datetime(2022, 11, 29, 2, 39, 0, 94820), params={'x': 4.129935342297648}, user_attrs={}, system_attrs={}, intermediate_values={}, distributions={'x': FloatDistribution(high=10.0, log=False, low=-10.0, step=None)}, trial_id=20, value=None), FrozenTrial(number=21, state=TrialState.COMPLETE, values=[0.006939703162393539], datetime_start=datetime.datetime(2022, 11, 29, 2, 39, 0, 95264), datetime_complete=datetime.datetime(2022, 11, 29, 2, 39, 0, 96529), params={'x': 2.0833048807837424}, user_attrs={}, system_attrs={}, intermediate_values={}, distributions={'x': FloatDistribution(high=10.0, log=False, low=-10.0, step=None)}, trial_id=21, value=None), FrozenTrial(number=22, state=TrialState.COMPLETE, values=[12.198028091530992], datetime_start=datetime.datetime(2022, 11, 29, 2, 39, 0, 96957), datetime_complete=datetime.datetime(2022, 11, 29, 2, 39, 0, 98212), params={'x': -1.4925675500312072}, user_attrs={}, system_attrs={}, intermediate_values={}, distributions={'x': FloatDistribution(high=10.0, log=False, low=-10.0, step=None)}, trial_id=22, value=None), FrozenTrial(number=23, state=TrialState.COMPLETE, values=[0.813564616180672], datetime_start=datetime.datetime(2022, 11, 29, 2, 39, 0, 98640), datetime_complete=datetime.datetime(2022, 11, 29, 2, 39, 0, 99916), params={'x': 2.901978168350361}, user_attrs={}, system_attrs={}, intermediate_values={}, distributions={'x': FloatDistribution(high=10.0, log=False, low=-10.0, step=None)}, trial_id=23, value=None), FrozenTrial(number=24, state=TrialState.COMPLETE, values=[18.682594942648695], datetime_start=datetime.datetime(2022, 11, 29, 2, 39, 0, 100347), datetime_complete=datetime.datetime(2022, 11, 29, 2, 39, 0, 101609), params={'x': 6.322336745632933}, user_attrs={}, system_attrs={}, intermediate_values={}, distributions={'x': FloatDistribution(high=10.0, log=False, low=-10.0, step=None)}, trial_id=24, value=None), FrozenTrial(number=25, state=TrialState.COMPLETE, values=[11.17758672681576], datetime_start=datetime.datetime(2022, 11, 29, 2, 39, 0, 102053), datetime_complete=datetime.datetime(2022, 11, 29, 2, 39, 0, 103382), params={'x': -1.3432898059868754}, user_attrs={}, system_attrs={}, intermediate_values={}, distributions={'x': FloatDistribution(high=10.0, log=False, low=-10.0, step=None)}, trial_id=25, value=None), FrozenTrial(number=26, state=TrialState.COMPLETE, values=[0.5686905478221557], datetime_start=datetime.datetime(2022, 11, 29, 2, 39, 0, 103811), datetime_complete=datetime.datetime(2022, 11, 29, 2, 39, 0, 105087), params={'x': 1.2458842609902936}, user_attrs={}, system_attrs={}, intermediate_values={}, distributions={'x': FloatDistribution(high=10.0, log=False, low=-10.0, step=None)}, trial_id=26, value=None), FrozenTrial(number=27, state=TrialState.COMPLETE, values=[3.7360453120058374], datetime_start=datetime.datetime(2022, 11, 29, 2, 39, 0, 105518), datetime_complete=datetime.datetime(2022, 11, 29, 2, 39, 0, 106796), params={'x': 3.932885229910415}, user_attrs={}, system_attrs={}, intermediate_values={}, distributions={'x': FloatDistribution(high=10.0, log=False, low=-10.0, step=None)}, trial_id=27, value=None), FrozenTrial(number=28, state=TrialState.COMPLETE, values=[50.4397503316453], datetime_start=datetime.datetime(2022, 11, 29, 2, 39, 0, 107225), datetime_complete=datetime.datetime(2022, 11, 29, 2, 39, 0, 108629), params={'x': -5.10209478475508}, user_attrs={}, system_attrs={}, intermediate_values={}, distributions={'x': FloatDistribution(high=10.0, log=False, low=-10.0, step=None)}, trial_id=28, value=None), FrozenTrial(number=29, state=TrialState.COMPLETE, values=[72.4435879385449], datetime_start=datetime.datetime(2022, 11, 29, 2, 39, 0, 109061), datetime_complete=datetime.datetime(2022, 11, 29, 2, 39, 0, 110403), params={'x': -6.511379908014028}, user_attrs={}, system_attrs={}, intermediate_values={}, distributions={'x': FloatDistribution(high=10.0, log=False, low=-10.0, step=None)}, trial_id=29, value=None), FrozenTrial(number=30, state=TrialState.COMPLETE, values=[33.04968609622182], datetime_start=datetime.datetime(2022, 11, 29, 2, 39, 0, 110846), datetime_complete=datetime.datetime(2022, 11, 29, 2, 39, 0, 112228), params={'x': 7.748885639515002}, user_attrs={}, system_attrs={}, intermediate_values={}, distributions={'x': FloatDistribution(high=10.0, log=False, low=-10.0, step=None)}, trial_id=30, value=None), FrozenTrial(number=31, state=TrialState.COMPLETE, values=[0.07231917259947859], datetime_start=datetime.datetime(2022, 11, 29, 2, 39, 0, 112662), datetime_complete=datetime.datetime(2022, 11, 29, 2, 39, 0, 114108), params={'x': 1.7310777573359195}, user_attrs={}, system_attrs={}, intermediate_values={}, distributions={'x': FloatDistribution(high=10.0, log=False, low=-10.0, step=None)}, trial_id=31, value=None), FrozenTrial(number=32, state=TrialState.COMPLETE, values=[7.2074342544905665], datetime_start=datetime.datetime(2022, 11, 29, 2, 39, 0, 114541), datetime_complete=datetime.datetime(2022, 11, 29, 2, 39, 0, 115977), params={'x': -0.6846665071272011}, user_attrs={}, system_attrs={}, intermediate_values={}, distributions={'x': FloatDistribution(high=10.0, log=False, low=-10.0, step=None)}, trial_id=32, value=None), FrozenTrial(number=33, state=TrialState.COMPLETE, values=[6.257617310198862e-06], datetime_start=datetime.datetime(2022, 11, 29, 2, 39, 0, 116409), datetime_complete=datetime.datetime(2022, 11, 29, 2, 39, 0, 117799), params={'x': 2.002501522998135}, user_attrs={}, system_attrs={}, intermediate_values={}, distributions={'x': FloatDistribution(high=10.0, log=False, low=-10.0, step=None)}, trial_id=33, value=None), FrozenTrial(number=34, state=TrialState.COMPLETE, values=[11.898438775769526], datetime_start=datetime.datetime(2022, 11, 29, 2, 39, 0, 118237), datetime_complete=datetime.datetime(2022, 11, 29, 2, 39, 0, 119652), params={'x': 5.449411366562348}, user_attrs={}, system_attrs={}, intermediate_values={}, distributions={'x': FloatDistribution(high=10.0, log=False, low=-10.0, step=None)}, trial_id=34, value=None), FrozenTrial(number=35, state=TrialState.COMPLETE, values=[2.3328471745340553], datetime_start=datetime.datetime(2022, 11, 29, 2, 39, 0, 120102), datetime_complete=datetime.datetime(2022, 11, 29, 2, 39, 0, 121478), params={'x': 3.527366090540855}, user_attrs={}, system_attrs={}, intermediate_values={}, distributions={'x': FloatDistribution(high=10.0, log=False, low=-10.0, step=None)}, trial_id=35, value=None), FrozenTrial(number=36, state=TrialState.COMPLETE, values=[18.354575804931823], datetime_start=datetime.datetime(2022, 11, 29, 2, 39, 0, 121932), datetime_complete=datetime.datetime(2022, 11, 29, 2, 39, 0, 123356), params={'x': -2.284224061009394}, user_attrs={}, system_attrs={}, intermediate_values={}, distributions={'x': FloatDistribution(high=10.0, log=False, low=-10.0, step=None)}, trial_id=36, value=None), FrozenTrial(number=37, state=TrialState.COMPLETE, values=[1.6737502893591816], datetime_start=datetime.datetime(2022, 11, 29, 2, 39, 0, 123793), datetime_complete=datetime.datetime(2022, 11, 29, 2, 39, 0, 125161), params={'x': 0.7062649848755034}, user_attrs={}, system_attrs={}, intermediate_values={}, distributions={'x': FloatDistribution(high=10.0, log=False, low=-10.0, step=None)}, trial_id=37, value=None), FrozenTrial(number=38, state=TrialState.COMPLETE, values=[0.004414923589217454], datetime_start=datetime.datetime(2022, 11, 29, 2, 39, 0, 125600), datetime_complete=datetime.datetime(2022, 11, 29, 2, 39, 0, 127005), params={'x': 2.066444891370349}, user_attrs={}, system_attrs={}, intermediate_values={}, distributions={'x': FloatDistribution(high=10.0, log=False, low=-10.0, step=None)}, trial_id=38, value=None), FrozenTrial(number=39, state=TrialState.COMPLETE, values=[7.90504237264692], datetime_start=datetime.datetime(2022, 11, 29, 2, 39, 0, 127491), datetime_complete=datetime.datetime(2022, 11, 29, 2, 39, 0, 128890), params={'x': -0.8115907192631931}, user_attrs={}, system_attrs={}, intermediate_values={}, distributions={'x': FloatDistribution(high=10.0, log=False, low=-10.0, step=None)}, trial_id=39, value=None), FrozenTrial(number=40, state=TrialState.COMPLETE, values=[11.79994637938066], datetime_start=datetime.datetime(2022, 11, 29, 2, 39, 0, 129330), datetime_complete=datetime.datetime(2022, 11, 29, 2, 39, 0, 130741), params={'x': 5.435105002671776}, user_attrs={}, system_attrs={}, intermediate_values={}, distributions={'x': FloatDistribution(high=10.0, log=False, low=-10.0, step=None)}, trial_id=40, value=None), FrozenTrial(number=41, state=TrialState.COMPLETE, values=[0.01673471099518683], datetime_start=datetime.datetime(2022, 11, 29, 2, 39, 0, 131183), datetime_complete=datetime.datetime(2022, 11, 29, 2, 39, 0, 132610), params={'x': 2.12936271099195}, user_attrs={}, system_attrs={}, intermediate_values={}, distributions={'x': FloatDistribution(high=10.0, log=False, low=-10.0, step=None)}, trial_id=41, value=None), FrozenTrial(number=42, state=TrialState.COMPLETE, values=[0.27723525248160014], datetime_start=datetime.datetime(2022, 11, 29, 2, 39, 0, 133048), datetime_complete=datetime.datetime(2022, 11, 29, 2, 39, 0, 134498), params={'x': 2.526531340455248}, user_attrs={}, system_attrs={}, intermediate_values={}, distributions={'x': FloatDistribution(high=10.0, log=False, low=-10.0, step=None)}, trial_id=42, value=None), FrozenTrial(number=43, state=TrialState.COMPLETE, values=[1.6630034776857299], datetime_start=datetime.datetime(2022, 11, 29, 2, 39, 0, 134936), datetime_complete=datetime.datetime(2022, 11, 29, 2, 39, 0, 136375), params={'x': 3.2895749213154426}, user_attrs={}, system_attrs={}, intermediate_values={}, distributions={'x': FloatDistribution(high=10.0, log=False, low=-10.0, step=None)}, trial_id=43, value=None), FrozenTrial(number=44, state=TrialState.COMPLETE, values=[0.43609928530907544], datetime_start=datetime.datetime(2022, 11, 29, 2, 39, 0, 136815), datetime_complete=datetime.datetime(2022, 11, 29, 2, 39, 0, 138259), params={'x': 1.3396218618783058}, user_attrs={}, system_attrs={}, intermediate_values={}, distributions={'x': FloatDistribution(high=10.0, log=False, low=-10.0, step=None)}, trial_id=44, value=None), FrozenTrial(number=45, state=TrialState.COMPLETE, values=[4.416451618307995], datetime_start=datetime.datetime(2022, 11, 29, 2, 39, 0, 138700), datetime_complete=datetime.datetime(2022, 11, 29, 2, 39, 0, 140172), params={'x': -0.10153553819772343}, user_attrs={}, system_attrs={}, intermediate_values={}, distributions={'x': FloatDistribution(high=10.0, log=False, low=-10.0, step=None)}, trial_id=45, value=None), FrozenTrial(number=46, state=TrialState.COMPLETE, values=[39.83766960154962], datetime_start=datetime.datetime(2022, 11, 29, 2, 39, 0, 140622), datetime_complete=datetime.datetime(2022, 11, 29, 2, 39, 0, 142095), params={'x': 8.311708928772747}, user_attrs={}, system_attrs={}, intermediate_values={}, distributions={'x': FloatDistribution(high=10.0, log=False, low=-10.0, step=None)}, trial_id=46, value=None), FrozenTrial(number=47, state=TrialState.COMPLETE, values=[6.662398635398765], datetime_start=datetime.datetime(2022, 11, 29, 2, 39, 0, 142543), datetime_complete=datetime.datetime(2022, 11, 29, 2, 39, 0, 144117), params={'x': 4.58116226444576}, user_attrs={}, system_attrs={}, intermediate_values={}, distributions={'x': FloatDistribution(high=10.0, log=False, low=-10.0, step=None)}, trial_id=47, value=None), FrozenTrial(number=48, state=TrialState.COMPLETE, values=[18.837587996538943], datetime_start=datetime.datetime(2022, 11, 29, 2, 39, 0, 144557), datetime_complete=datetime.datetime(2022, 11, 29, 2, 39, 0, 146030), params={'x': 6.340229025816373}, user_attrs={}, system_attrs={}, intermediate_values={}, distributions={'x': FloatDistribution(high=10.0, log=False, low=-10.0, step=None)}, trial_id=48, value=None), FrozenTrial(number=49, state=TrialState.COMPLETE, values=[2.0327725222679427], datetime_start=datetime.datetime(2022, 11, 29, 2, 39, 0, 146469), datetime_complete=datetime.datetime(2022, 11, 29, 2, 39, 0, 147957), params={'x': 0.5742466825330748}, user_attrs={}, system_attrs={}, intermediate_values={}, distributions={'x': FloatDistribution(high=10.0, log=False, low=-10.0, step=None)}, trial_id=49, value=None), FrozenTrial(number=50, state=TrialState.COMPLETE, values=[120.31067127956558], datetime_start=datetime.datetime(2022, 11, 29, 2, 39, 0, 148396), datetime_complete=datetime.datetime(2022, 11, 29, 2, 39, 0, 149862), params={'x': -8.968622123109428}, user_attrs={}, system_attrs={}, intermediate_values={}, distributions={'x': FloatDistribution(high=10.0, log=False, low=-10.0, step=None)}, trial_id=50, value=None), FrozenTrial(number=51, state=TrialState.COMPLETE, values=[0.012092716199730973], datetime_start=datetime.datetime(2022, 11, 29, 2, 39, 0, 150305), datetime_complete=datetime.datetime(2022, 11, 29, 2, 39, 0, 151780), params={'x': 2.1099668868329506}, user_attrs={}, system_attrs={}, intermediate_values={}, distributions={'x': FloatDistribution(high=10.0, log=False, low=-10.0, step=None)}, trial_id=51, value=None), FrozenTrial(number=52, state=TrialState.COMPLETE, values=[0.05368240251952381], datetime_start=datetime.datetime(2022, 11, 29, 2, 39, 0, 152222), datetime_complete=datetime.datetime(2022, 11, 29, 2, 39, 0, 153727), params={'x': 1.7683053679527214}, user_attrs={}, system_attrs={}, intermediate_values={}, distributions={'x': FloatDistribution(high=10.0, log=False, low=-10.0, step=None)}, trial_id=52, value=None), FrozenTrial(number=53, state=TrialState.COMPLETE, values=[2.22633247926108], datetime_start=datetime.datetime(2022, 11, 29, 2, 39, 0, 154174), datetime_complete=datetime.datetime(2022, 11, 29, 2, 39, 0, 155714), params={'x': 3.4920899702300394}, user_attrs={}, system_attrs={}, intermediate_values={}, distributions={'x': FloatDistribution(high=10.0, log=False, low=-10.0, step=None)}, trial_id=53, value=None), FrozenTrial(number=54, state=TrialState.COMPLETE, values=[4.2802506366164845], datetime_start=datetime.datetime(2022, 11, 29, 2, 39, 0, 156156), datetime_complete=datetime.datetime(2022, 11, 29, 2, 39, 0, 157650), params={'x': -0.06887666056159203}, user_attrs={}, system_attrs={}, intermediate_values={}, distributions={'x': FloatDistribution(high=10.0, log=False, low=-10.0, step=None)}, trial_id=54, value=None), FrozenTrial(number=55, state=TrialState.COMPLETE, values=[0.228517866963101], datetime_start=datetime.datetime(2022, 11, 29, 2, 39, 0, 158109), datetime_complete=datetime.datetime(2022, 11, 29, 2, 39, 0, 159614), params={'x': 2.4780354243809772}, user_attrs={}, system_attrs={}, intermediate_values={}, distributions={'x': FloatDistribution(high=10.0, log=False, low=-10.0, step=None)}, trial_id=55, value=None), FrozenTrial(number=56, state=TrialState.COMPLETE, values=[0.7807330919025488], datetime_start=datetime.datetime(2022, 11, 29, 2, 39, 0, 160060), datetime_complete=datetime.datetime(2022, 11, 29, 2, 39, 0, 161649), params={'x': 1.1164089792768666}, user_attrs={}, system_attrs={}, intermediate_values={}, distributions={'x': FloatDistribution(high=10.0, log=False, low=-10.0, step=None)}, trial_id=56, value=None), FrozenTrial(number=57, state=TrialState.COMPLETE, values=[0.9861743119502567], datetime_start=datetime.datetime(2022, 11, 29, 2, 39, 0, 162108), datetime_complete=datetime.datetime(2022, 11, 29, 2, 39, 0, 163684), params={'x': 2.993063095654177}, user_attrs={}, system_attrs={}, intermediate_values={}, distributions={'x': FloatDistribution(high=10.0, log=False, low=-10.0, step=None)}, trial_id=57, value=None), FrozenTrial(number=58, state=TrialState.COMPLETE, values=[17.89804583275542], datetime_start=datetime.datetime(2022, 11, 29, 2, 39, 0, 164135), datetime_complete=datetime.datetime(2022, 11, 29, 2, 39, 0, 165658), params={'x': -2.230608210737012}, user_attrs={}, system_attrs={}, intermediate_values={}, distributions={'x': FloatDistribution(high=10.0, log=False, low=-10.0, step=None)}, trial_id=58, value=None), FrozenTrial(number=59, state=TrialState.COMPLETE, values=[8.337437309569037], datetime_start=datetime.datetime(2022, 11, 29, 2, 39, 0, 166117), datetime_complete=datetime.datetime(2022, 11, 29, 2, 39, 0, 167653), params={'x': 4.887462087988176}, user_attrs={}, system_attrs={}, intermediate_values={}, distributions={'x': FloatDistribution(high=10.0, log=False, low=-10.0, step=None)}, trial_id=59, value=None), FrozenTrial(number=60, state=TrialState.COMPLETE, values=[3.4598228285558643], datetime_start=datetime.datetime(2022, 11, 29, 2, 39, 0, 168098), datetime_complete=datetime.datetime(2022, 11, 29, 2, 39, 0, 169607), params={'x': 3.8600598991849333}, user_attrs={}, system_attrs={}, intermediate_values={}, distributions={'x': FloatDistribution(high=10.0, log=False, low=-10.0, step=None)}, trial_id=60, value=None), FrozenTrial(number=61, state=TrialState.COMPLETE, values=[0.025927955149785308], datetime_start=datetime.datetime(2022, 11, 29, 2, 39, 0, 170066), datetime_complete=datetime.datetime(2022, 11, 29, 2, 39, 0, 171606), params={'x': 1.838978401604675}, user_attrs={}, system_attrs={}, intermediate_values={}, distributions={'x': FloatDistribution(high=10.0, log=False, low=-10.0, step=None)}, trial_id=61, value=None), FrozenTrial(number=62, state=TrialState.COMPLETE, values=[0.002612864848340762], datetime_start=datetime.datetime(2022, 11, 29, 2, 39, 0, 172053), datetime_complete=datetime.datetime(2022, 11, 29, 2, 39, 0, 173576), params={'x': 2.051116189689185}, user_attrs={}, system_attrs={}, intermediate_values={}, distributions={'x': FloatDistribution(high=10.0, log=False, low=-10.0, step=None)}, trial_id=62, value=None), FrozenTrial(number=63, state=TrialState.COMPLETE, values=[1.9655365576367063], datetime_start=datetime.datetime(2022, 11, 29, 2, 39, 0, 174039), datetime_complete=datetime.datetime(2022, 11, 29, 2, 39, 0, 175623), params={'x': 0.5980240524043552}, user_attrs={}, system_attrs={}, intermediate_values={}, distributions={'x': FloatDistribution(high=10.0, log=False, low=-10.0, step=None)}, trial_id=63, value=None), FrozenTrial(number=64, state=TrialState.COMPLETE, values=[6.829128072410983], datetime_start=datetime.datetime(2022, 11, 29, 2, 39, 0, 176069), datetime_complete=datetime.datetime(2022, 11, 29, 2, 39, 0, 177605), params={'x': -0.6132600468401499}, user_attrs={}, system_attrs={}, intermediate_values={}, distributions={'x': FloatDistribution(high=10.0, log=False, low=-10.0, step=None)}, trial_id=64, value=None), FrozenTrial(number=65, state=TrialState.COMPLETE, values=[0.7792135739384638], datetime_start=datetime.datetime(2022, 11, 29, 2, 39, 0, 178068), datetime_complete=datetime.datetime(2022, 11, 29, 2, 39, 0, 179653), params={'x': 2.8827307482683855}, user_attrs={}, system_attrs={}, intermediate_values={}, distributions={'x': FloatDistribution(high=10.0, log=False, low=-10.0, step=None)}, trial_id=65, value=None), FrozenTrial(number=66, state=TrialState.COMPLETE, values=[0.6918780110319044], datetime_start=datetime.datetime(2022, 11, 29, 2, 39, 0, 180102), datetime_complete=datetime.datetime(2022, 11, 29, 2, 39, 0, 181642), params={'x': 1.1682079520505715}, user_attrs={}, system_attrs={}, intermediate_values={}, distributions={'x': FloatDistribution(high=10.0, log=False, low=-10.0, step=None)}, trial_id=66, value=None), FrozenTrial(number=67, state=TrialState.COMPLETE, values=[4.910254380737888], datetime_start=datetime.datetime(2022, 11, 29, 2, 39, 0, 182104), datetime_complete=datetime.datetime(2022, 11, 29, 2, 39, 0, 183702), params={'x': 4.215909380082563}, user_attrs={}, system_attrs={}, intermediate_values={}, distributions={'x': FloatDistribution(high=10.0, log=False, low=-10.0, step=None)}, trial_id=67, value=None), FrozenTrial(number=68, state=TrialState.COMPLETE, values=[0.1335679713526644], datetime_start=datetime.datetime(2022, 11, 29, 2, 39, 0, 184153), datetime_complete=datetime.datetime(2022, 11, 29, 2, 39, 0, 185735), params={'x': 2.365469521783506}, user_attrs={}, system_attrs={}, intermediate_values={}, distributions={'x': FloatDistribution(high=10.0, log=False, low=-10.0, step=None)}, trial_id=68, value=None), FrozenTrial(number=69, state=TrialState.COMPLETE, values=[3.1919918625486874], datetime_start=datetime.datetime(2022, 11, 29, 2, 39, 0, 186220), datetime_complete=datetime.datetime(2022, 11, 29, 2, 39, 0, 187836), params={'x': 0.21338536260650565}, user_attrs={}, system_attrs={}, intermediate_values={}, distributions={'x': FloatDistribution(high=10.0, log=False, low=-10.0, step=None)}, trial_id=69, value=None), FrozenTrial(number=70, state=TrialState.COMPLETE, values=[0.07058651258498105], datetime_start=datetime.datetime(2022, 11, 29, 2, 39, 0, 188288), datetime_complete=datetime.datetime(2022, 11, 29, 2, 39, 0, 189876), params={'x': 1.7343187763785686}, user_attrs={}, system_attrs={}, intermediate_values={}, distributions={'x': FloatDistribution(high=10.0, log=False, low=-10.0, step=None)}, trial_id=70, value=None), FrozenTrial(number=71, state=TrialState.COMPLETE, values=[0.0771934536332189], datetime_start=datetime.datetime(2022, 11, 29, 2, 39, 0, 190327), datetime_complete=datetime.datetime(2022, 11, 29, 2, 39, 0, 191946), params={'x': 2.2778370990944494}, user_attrs={}, system_attrs={}, intermediate_values={}, distributions={'x': FloatDistribution(high=10.0, log=False, low=-10.0, step=None)}, trial_id=71, value=None), FrozenTrial(number=72, state=TrialState.COMPLETE, values=[1.840874508502024], datetime_start=datetime.datetime(2022, 11, 29, 2, 39, 0, 192398), datetime_complete=datetime.datetime(2022, 11, 29, 2, 39, 0, 193979), params={'x': 3.356788306443575}, user_attrs={}, system_attrs={}, intermediate_values={}, distributions={'x': FloatDistribution(high=10.0, log=False, low=-10.0, step=None)}, trial_id=72, value=None), FrozenTrial(number=73, state=TrialState.COMPLETE, values=[0.21657623183059568], datetime_start=datetime.datetime(2022, 11, 29, 2, 39, 0, 194425), datetime_complete=datetime.datetime(2022, 11, 29, 2, 39, 0, 196047), params={'x': 1.534622484609972}, user_attrs={}, system_attrs={}, intermediate_values={}, distributions={'x': FloatDistribution(high=10.0, log=False, low=-10.0, step=None)}, trial_id=73, value=None), FrozenTrial(number=74, state=TrialState.COMPLETE, values=[1.9267732521727754], datetime_start=datetime.datetime(2022, 11, 29, 2, 39, 0, 196501), datetime_complete=datetime.datetime(2022, 11, 29, 2, 39, 0, 198107), params={'x': 0.6119174188209207}, user_attrs={}, system_attrs={}, intermediate_values={}, distributions={'x': FloatDistribution(high=10.0, log=False, low=-10.0, step=None)}, trial_id=74, value=None), FrozenTrial(number=75, state=TrialState.COMPLETE, values=[0.7116641995307608], datetime_start=datetime.datetime(2022, 11, 29, 2, 39, 0, 198580), datetime_complete=datetime.datetime(2022, 11, 29, 2, 39, 0, 200209), params={'x': 2.843601920061092}, user_attrs={}, system_attrs={}, intermediate_values={}, distributions={'x': FloatDistribution(high=10.0, log=False, low=-10.0, step=None)}, trial_id=75, value=None), FrozenTrial(number=76, state=TrialState.COMPLETE, values=[3.4056504547463193], datetime_start=datetime.datetime(2022, 11, 29, 2, 39, 0, 200661), datetime_complete=datetime.datetime(2022, 11, 29, 2, 39, 0, 202261), params={'x': 3.845440450067766}, user_attrs={}, system_attrs={}, intermediate_values={}, distributions={'x': FloatDistribution(high=10.0, log=False, low=-10.0, step=None)}, trial_id=76, value=None), FrozenTrial(number=77, state=TrialState.COMPLETE, values=[0.013717886606483428], datetime_start=datetime.datetime(2022, 11, 29, 2, 39, 0, 202714), datetime_complete=datetime.datetime(2022, 11, 29, 2, 39, 0, 204360), params={'x': 2.1171233819802153}, user_attrs={}, system_attrs={}, intermediate_values={}, distributions={'x': FloatDistribution(high=10.0, log=False, low=-10.0, step=None)}, trial_id=77, value=None), FrozenTrial(number=78, state=TrialState.COMPLETE, values=[0.9687466030448137], datetime_start=datetime.datetime(2022, 11, 29, 2, 39, 0, 204814), datetime_complete=datetime.datetime(2022, 11, 29, 2, 39, 0, 206654), params={'x': 1.0157507414049967}, user_attrs={}, system_attrs={}, intermediate_values={}, distributions={'x': FloatDistribution(high=10.0, log=False, low=-10.0, step=None)}, trial_id=78, value=None), FrozenTrial(number=79, state=TrialState.COMPLETE, values=[11.626133497493885], datetime_start=datetime.datetime(2022, 11, 29, 2, 39, 0, 207107), datetime_complete=datetime.datetime(2022, 11, 29, 2, 39, 0, 208885), params={'x': -1.4097116443320956}, user_attrs={}, system_attrs={}, intermediate_values={}, distributions={'x': FloatDistribution(high=10.0, log=False, low=-10.0, step=None)}, trial_id=79, value=None), FrozenTrial(number=80, state=TrialState.COMPLETE, values=[14.745499339074915], datetime_start=datetime.datetime(2022, 11, 29, 2, 39, 0, 209341), datetime_complete=datetime.datetime(2022, 11, 29, 2, 39, 0, 211114), params={'x': 5.839986893086344}, user_attrs={}, system_attrs={}, intermediate_values={}, distributions={'x': FloatDistribution(high=10.0, log=False, low=-10.0, step=None)}, trial_id=80, value=None), FrozenTrial(number=81, state=TrialState.COMPLETE, values=[0.026737279027993353], datetime_start=datetime.datetime(2022, 11, 29, 2, 39, 0, 211591), datetime_complete=datetime.datetime(2022, 11, 29, 2, 39, 0, 213227), params={'x': 2.163515378567257}, user_attrs={}, system_attrs={}, intermediate_values={}, distributions={'x': FloatDistribution(high=10.0, log=False, low=-10.0, step=None)}, trial_id=81, value=None), FrozenTrial(number=82, state=TrialState.COMPLETE, values=[0.004525335519969126], datetime_start=datetime.datetime(2022, 11, 29, 2, 39, 0, 213680), datetime_complete=datetime.datetime(2022, 11, 29, 2, 39, 0, 215379), params={'x': 1.9327293859105692}, user_attrs={}, system_attrs={}, intermediate_values={}, distributions={'x': FloatDistribution(high=10.0, log=False, low=-10.0, step=None)}, trial_id=82, value=None), FrozenTrial(number=83, state=TrialState.COMPLETE, values=[63.96699334600861], datetime_start=datetime.datetime(2022, 11, 29, 2, 39, 0, 215835), datetime_complete=datetime.datetime(2022, 11, 29, 2, 39, 0, 217489), params={'x': 9.99793681808056}, user_attrs={}, system_attrs={}, intermediate_values={}, distributions={'x': FloatDistribution(high=10.0, log=False, low=-10.0, step=None)}, trial_id=83, value=None), FrozenTrial(number=84, state=TrialState.COMPLETE, values=[4.984047535602281], datetime_start=datetime.datetime(2022, 11, 29, 2, 39, 0, 218003), datetime_complete=datetime.datetime(2022, 11, 29, 2, 39, 0, 219674), params={'x': -0.23249804828633192}, user_attrs={}, system_attrs={}, intermediate_values={}, distributions={'x': FloatDistribution(high=10.0, log=False, low=-10.0, step=None)}, trial_id=84, value=None), FrozenTrial(number=85, state=TrialState.COMPLETE, values=[1.093954619771657], datetime_start=datetime.datetime(2022, 11, 29, 2, 39, 0, 220131), datetime_complete=datetime.datetime(2022, 11, 29, 2, 39, 0, 221827), params={'x': 3.0459228555546805}, user_attrs={}, system_attrs={}, intermediate_values={}, distributions={'x': FloatDistribution(high=10.0, log=False, low=-10.0, step=None)}, trial_id=85, value=None), FrozenTrial(number=86, state=TrialState.COMPLETE, values=[0.10416252072856783], datetime_start=datetime.datetime(2022, 11, 29, 2, 39, 0, 222281), datetime_complete=datetime.datetime(2022, 11, 29, 2, 39, 0, 223991), params={'x': 1.6772578107396434}, user_attrs={}, system_attrs={}, intermediate_values={}, distributions={'x': FloatDistribution(high=10.0, log=False, low=-10.0, step=None)}, trial_id=86, value=None), FrozenTrial(number=87, state=TrialState.COMPLETE, values=[1.478111199353566], datetime_start=datetime.datetime(2022, 11, 29, 2, 39, 0, 224447), datetime_complete=datetime.datetime(2022, 11, 29, 2, 39, 0, 226121), params={'x': 0.7842240340615521}, user_attrs={}, system_attrs={}, intermediate_values={}, distributions={'x': FloatDistribution(high=10.0, log=False, low=-10.0, step=None)}, trial_id=87, value=None), FrozenTrial(number=88, state=TrialState.COMPLETE, values=[0.33739966986653336], datetime_start=datetime.datetime(2022, 11, 29, 2, 39, 0, 226577), datetime_complete=datetime.datetime(2022, 11, 29, 2, 39, 0, 228268), params={'x': 2.580861145082483}, user_attrs={}, system_attrs={}, intermediate_values={}, distributions={'x': FloatDistribution(high=10.0, log=False, low=-10.0, step=None)}, trial_id=88, value=None), FrozenTrial(number=89, state=TrialState.COMPLETE, values=[2.7075835914875297], datetime_start=datetime.datetime(2022, 11, 29, 2, 39, 0, 228726), datetime_complete=datetime.datetime(2022, 11, 29, 2, 39, 0, 230444), params={'x': 3.645473667819552}, user_attrs={}, system_attrs={}, intermediate_values={}, distributions={'x': FloatDistribution(high=10.0, log=False, low=-10.0, step=None)}, trial_id=89, value=None), FrozenTrial(number=90, state=TrialState.COMPLETE, values=[5.552623770304922], datetime_start=datetime.datetime(2022, 11, 29, 2, 39, 0, 230900), datetime_complete=datetime.datetime(2022, 11, 29, 2, 39, 0, 232605), params={'x': 4.35640059631314}, user_attrs={}, system_attrs={}, intermediate_values={}, distributions={'x': FloatDistribution(high=10.0, log=False, low=-10.0, step=None)}, trial_id=90, value=None), FrozenTrial(number=91, state=TrialState.COMPLETE, values=[0.035462458856010105], datetime_start=datetime.datetime(2022, 11, 29, 2, 39, 0, 233062), datetime_complete=datetime.datetime(2022, 11, 29, 2, 39, 0, 234774), params={'x': 2.188314786610107}, user_attrs={}, system_attrs={}, intermediate_values={}, distributions={'x': FloatDistribution(high=10.0, log=False, low=-10.0, step=None)}, trial_id=91, value=None), FrozenTrial(number=92, state=TrialState.COMPLETE, values=[0.42371483557090517], datetime_start=datetime.datetime(2022, 11, 29, 2, 39, 0, 235234), datetime_complete=datetime.datetime(2022, 11, 29, 2, 39, 0, 236963), params={'x': 1.349066181881057}, user_attrs={}, system_attrs={}, intermediate_values={}, distributions={'x': FloatDistribution(high=10.0, log=False, low=-10.0, step=None)}, trial_id=92, value=None), FrozenTrial(number=93, state=TrialState.COMPLETE, values=[0.000997761374314561], datetime_start=datetime.datetime(2022, 11, 29, 2, 39, 0, 237419), datetime_complete=datetime.datetime(2022, 11, 29, 2, 39, 0, 239117), params={'x': 1.9684126390099685}, user_attrs={}, system_attrs={}, intermediate_values={}, distributions={'x': FloatDistribution(high=10.0, log=False, low=-10.0, step=None)}, trial_id=93, value=None), FrozenTrial(number=94, state=TrialState.COMPLETE, values=[1.1550803758952408], datetime_start=datetime.datetime(2022, 11, 29, 2, 39, 0, 239598), datetime_complete=datetime.datetime(2022, 11, 29, 2, 39, 0, 241352), params={'x': 3.0747466566104036}, user_attrs={}, system_attrs={}, intermediate_values={}, distributions={'x': FloatDistribution(high=10.0, log=False, low=-10.0, step=None)}, trial_id=94, value=None), FrozenTrial(number=95, state=TrialState.COMPLETE, values=[2.8618657391708915], datetime_start=datetime.datetime(2022, 11, 29, 2, 39, 0, 241821), datetime_complete=datetime.datetime(2022, 11, 29, 2, 39, 0, 243554), params={'x': 0.30829502005494724}, user_attrs={}, system_attrs={}, intermediate_values={}, distributions={'x': FloatDistribution(high=10.0, log=False, low=-10.0, step=None)}, trial_id=95, value=None), FrozenTrial(number=96, state=TrialState.COMPLETE, values=[0.013783716016731803], datetime_start=datetime.datetime(2022, 11, 29, 2, 39, 0, 244012), datetime_complete=datetime.datetime(2022, 11, 29, 2, 39, 0, 245768), params={'x': 1.8825959284490874}, user_attrs={}, system_attrs={}, intermediate_values={}, distributions={'x': FloatDistribution(high=10.0, log=False, low=-10.0, step=None)}, trial_id=96, value=None), FrozenTrial(number=97, state=TrialState.COMPLETE, values=[0.39966748026458404], datetime_start=datetime.datetime(2022, 11, 29, 2, 39, 0, 246229), datetime_complete=datetime.datetime(2022, 11, 29, 2, 39, 0, 247994), params={'x': 1.3678074025547404}, user_attrs={}, system_attrs={}, intermediate_values={}, distributions={'x': FloatDistribution(high=10.0, log=False, low=-10.0, step=None)}, trial_id=97, value=None), FrozenTrial(number=98, state=TrialState.COMPLETE, values=[0.31961070123540186], datetime_start=datetime.datetime(2022, 11, 29, 2, 39, 0, 248455), datetime_complete=datetime.datetime(2022, 11, 29, 2, 39, 0, 250227), params={'x': 2.565341225487229}, user_attrs={}, system_attrs={}, intermediate_values={}, distributions={'x': FloatDistribution(high=10.0, log=False, low=-10.0, step=None)}, trial_id=98, value=None), FrozenTrial(number=99, state=TrialState.COMPLETE, values=[9.160304779246284], datetime_start=datetime.datetime(2022, 11, 29, 2, 39, 0, 250690), datetime_complete=datetime.datetime(2022, 11, 29, 2, 39, 0, 252472), params={'x': -1.0265995406142325}, user_attrs={}, system_attrs={}, intermediate_values={}, distributions={'x': FloatDistribution(high=10.0, log=False, low=-10.0, step=None)}, trial_id=99, value=None)]

To get the number of trials:

len(study.trials)
100

By executing optimize() again, we can continue the optimization.

study.optimize(objective, n_trials=100)

To get the updated number of trials:

len(study.trials)
200

As the objective function is so easy that the last 100 trials don’t improve the result. However, we can check the result again:

best_params = study.best_params
found_x = best_params["x"]
print("Found x: {}, (x - 2)^2: {}".format(found_x, (found_x - 2) ** 2))
Found x: 1.99992664666634, (x - 2)^2: 5.380711559049633e-09

Total running time of the script: ( 0 minutes 0.464 seconds)

Gallery generated by Sphinx-Gallery