text_plain_output_1.png
import skopt

search_space = [skopt.space.Integer(4, 12, name='max_depth'), skopt.space.Integer(50, 200, name='n_estimators'), skopt.space.Integer(17, 24, name='max_features'), skopt.space.Real(0.0, 1.0, name='min_impurity_decrease'), skopt.space.Categorical(categories=[True, False], name='bootstrap')]

def to_named_params(results, search_space):
    params = results.x
    param_dict = {}
    params_list = [(dimension.name, param) for dimension, param in zip(search_space, params)]
    for item in params_list:
        param_dict[item[0]] = item[1]
    return param_dict

best_params = to_named_params(results, search_space)
best_params