Open chengymo opened 4 years ago
I just realize in prediction of categorical domain, I would have to extend the dimension for the categorical data. i.e. my categorical dimension has 21 values. Hence the actual X required for input has dimension of 21+3. So the prediction worked if I input:
yh = myBopt.model.model.predict(np.array([1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0.4,0.4]).reshape(1,24))
Is there a better way to make prediction with some tranformation?
If I'm not mistaken, usually, you'll want to use myBopt.model.predict()
because it does the munging for you via the design_space
.
See e.g.
where the second element of the bo.space.space
is categorical and I can use 2
as a representation of the specific category when using bo.model.predict
.
Hi,
I am currently trying to run optimization on Gpyopt in a 4-D mixed domain with bound definition:
I would like to make prediction. Is there some special way I have to treat the x for making prediction? I have tried passing into
model.model.predict(np.array([0,1,0.4,0.4]))
. However I obtain an error message:Thank you for your help.