I've noticed that in the explanation in the docs of the Nelder-Mead solver contains a couple of bugs, specifically the snippet of code to construct the initial simplexer for a Matlab like simplex:
function Optim.simplexer(A::MatlabSimplexer, initial_x::AbstractArray{T, N}) where {T, N}
n = length(initial_x)
initial_simplex = Array{T, N}[initial_x for i = 1:n+1]
for j = 1:n
initial_simplex[j+1][j] += initial_simplex[j+1][j] == zero(T) ? S.b * initial_simplex[j+1][j] : S.a
end
initial_simplex
end
I was going to submit a small pull request to fix this before I noticed that the fixes had already been implemented:
I've noticed that in the explanation in the docs of the Nelder-Mead solver contains a couple of bugs, specifically the snippet of code to construct the initial simplexer for a Matlab like simplex:
I was going to submit a small pull request to fix this before I noticed that the fixes had already been implemented:
https://github.com/JuliaNLSolvers/Optim.jl/blob/78ab1f4859c09ec73640829d26b3825c02b7ac95/docs/src/algo/nelder_mead.md?plain=1#L82-L89
Presumably the docs using this example should be updated to the correct version.