MarcelMG / NelderMeadSimplex_Python

A Python implementation of the Nelder Mead Simplex Optimization Algorithm
MIT License
1 stars 0 forks source link

Nelder-Mead: Reflection step condition check may be wrong #1

Open douglaswja opened 3 years ago

douglaswja commented 3 years ago

https://github.com/MarcelMG/NelderMeadSimplex_Python/blob/ebd4151e16def194bdbd386fd6d4de73ac4b3741/Nelder_Mead_Simplex_Optimizer.ipynb#L95

For Nelder-Mead, shouldnt the reflection step occur iff best value <= reflected value < second worst value? The current code seems to check both reflected value <= best value and reflected value < worst value, in which case the second check seems redundant.

douglaswja commented 3 years ago

Good code overall though, thanks for sharing this. It helped me figure out how to implement Nelder Mead's.