eriknw / dask-patternsearch

Scalable pattern search optimization with dask
BSD 3-Clause "New" or "Revised" License
21 stars 2 forks source link

See #6. Add option to operate on integer dimensions. #11

Closed eriknw closed 7 years ago

eriknw commented 7 years ago

We implement this somewhat simplistically: for integer dimensions, we round the step to the nearest integer away from 0. The stepsize for integers are still halved (or doubled) with the step sizes for the rest of the dimensions.

Recall that the stencil that generates the steps for the trial points also contains the number of halvings to perform if that point is accepted. If the step for a trial point is only along integer dimensions, then we no longer perform any halvings if that point is accepted (although it may still double).

Integer values are stored as floats with the rest of the coordinates, which I think is fine.

I don't know how robustly this will behave. I guess we'll see. To improve robustness, the suggestion remains the same: increase the queue size.

eriknw commented 7 years ago

This may result in very poor utilization of the stencil if most or all the dimensions are integers as the algorithm converges, because many stencil points may all round to the same integer values. In other words, the stencil may need to do a lot of work to find new points to submit. As long as nearly all the dimensions aren't integers, I think we'll be fine. Still, this does point out that we could be more sophisticated. Perhaps we need a stencil to handle integers.

eriknw commented 7 years ago

Scratch my last comment. The previous commit changes the minimum step size to 1 for integer dimensions, which should behave well.