luinardi / hypermapper

Black-box Optimizer based on Bayesian Optimization
MIT License
152 stars 26 forks source link

Potential bug in bounding box sample function #92

Open bbudescu opened 1 year ago

bbudescu commented 1 year ago

Not sure if this is actually wrong, but the code here looks a bit weird. I'm thinking it might be an indentation error, i.e., the two lines are overindented by one tab.

I'm thinking the idea was to check, after going through all objectives, for the corner case that every lower bound is equal to its respective upper bound, and, in that case, avoid having a zero divisor when normalizing below. The current implementation actually achieves this objective (whether intentionally or not) by assigning a total weight of 1 if the first objective happens to have identical bounds. Now, one of the side effects would be that the weights don't sum up to 1 any more.

Again, not sure this is intended or not.