Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Typo on Optim.simplexer() function #1064

Closed
gaston-fernandez opened this issue Jan 22, 2024 · 5 comments
Closed

Typo on Optim.simplexer() function #1064

gaston-fernandez opened this issue Jan 22, 2024 · 5 comments

Comments

@gaston-fernandez
Copy link

Hi

There is a small typo on the function you provided to implement the initial simplex as in Matlab's fminsearch in the Nelder-Mead algorithm, in section "Specifying the initial simplex".

You defined the function:

function Optim.simplexer(A::MatlabSimplexer, initial_x::AbstractArray{T, N}) where {T, N}
    ...    
    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
    ...
end

The typo is on the first argument of Optim.simplexer(): the first argument should be S::MatlabSimplexer.

@pkofod
Copy link
Member

pkofod commented Jan 23, 2024

Oh, the S. Good catch. Thanks

@pkofod
Copy link
Member

pkofod commented Jan 23, 2024

Wait, looking at the code this is actually correct and I havn't touched that file for four years. I wonder if the docs are not generated as they should on new tags.

@pkofod
Copy link
Member

pkofod commented Jan 23, 2024

See this #819

@pkofod
Copy link
Member

pkofod commented Jan 24, 2024

So it's correct on dev docs now after it built, but it looks like I have some cleaning up to do as the old docs code used a very old version of documenter https://julianlsolvers.github.io/Optim.jl/dev/algo/nelder_mead/

@pkofod pkofod closed this as completed Jan 27, 2024
@pkofod
Copy link
Member

pkofod commented Jan 27, 2024

docs are now running

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants