-
Notifications
You must be signed in to change notification settings - Fork 52
Description
In ei_merit.py, in the ei_merit() method, the sizes of the parameters passed do not match the comments.
My setup:
- 6 dimensional optimization problem (all dimensions are continuous)
- EIStrategy
- SymmetricLatinHypercube (num_pts = 2*dim + 1)
- PolyRegressor
To reproduce: put a breakpoint on line 23 in ei_merit() and use the debug console to observe the following:
np.shape(X)
(100, 6)
np.shape(fX)
(6, 1)
np.shape(XX)
(18, 6)
Two semi-separate issues:
-
The comment on line 15 states that parameter
XXshould have shapem x 1. It should actually bym x dimsinceXXrepresents inputs to the objective function, which have size equal to the dimension of the problem.
I think this should be an easy fix, assuming that I diagnosed the issue correctly. -
The comments on lines 13 and 15 collectively state that the dimensions on axis 0 of
fXandXXshould match (and be equal tom). While this would make sense to me, I have not observed that in practice (see console output above). I believe this discrepancy can be traced back to line 33 ofei_ga.py, where the pending evaluations are appended to the previously evaluated points before later passing them toei_meriton line 41. This makes the array of previously evaluated points larger than the array of values at previously evaluated points, by an amount equal to the number of pending evaluations.
I am not sure if I correctly diagnosed the root cause of this issue. While the comment is definitely wrong in the current state, I do not know whether the comment or the code meets the intent of the design. As far as I can tell, the code in its current state does not cause any problems with effectiveness or reliability.