0

I am new to bayesian optimization module (skopt). I was playing around with their toy example but encountered the following error while executing gp_minimize() function. Below is my code:

res_gp = gp_minimize(objective, space, n_calls=50, random_state=0)

This throws the following error:

Traceback (most recent call last):

  Cell In[22], line 1
    res_gp = gp_minimize(objective, space, n_calls=50, random_state=0)

  File ~/opt/anaconda3/envs/datamonitor/lib/python3.10/site-packages/skopt/optimizer/gp.py:252 in gp_minimize
    space = normalize_dimensions(dimensions)

  File ~/opt/anaconda3/envs/datamonitor/lib/python3.10/site-packages/skopt/utils.py:599 in normalize_dimensions
    dimension.set_transformer("normalize")

  File ~/opt/anaconda3/envs/datamonitor/lib/python3.10/site-packages/skopt/space/space.py:493 in set_transformer
    self.transformer = Pipeline(

  File ~/opt/anaconda3/envs/datamonitor/lib/python3.10/site-packages/skopt/space/transformers.py:292 in __init__
    raise ValueError(

ValueError: Provided transformers should be a Transformer instance. Got <skopt.space.transformers.Identity object at 0x7fdf50724910>

The example that I was trying to mimic can be found here.

I am not able to figure out how to fix it.

If there are other packages available that would allow me to tune the parameters of my estimator (using xgboost classifier), please indicate those as well.

Thanks.

user62198
  • 1,744
  • 2
  • 13
  • 17

0 Answers0