You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to use equivalent for fminsearch in Matlab for 1D problem. There are two issues here:
1- fminsearch uses Neldermead for scalar and works well. It looks like optim.jl cannot be called to solve 1d problem using Nelder mead
2- fminsearch gets an initial guess. At each step it changes the initial guess by 5% until convergence. In julia there are ways of changing NelderMead to comply with that (initial_simplex). Optim.jl also offers Brent() and Goldensection() for 1d, but, neither of those accept initial guess. They both need a bound.
I have a complicated code (both in Matlab and Julia). User can choose among some parameters to optimize some of them. This works well in Matlab since single parameter can be picked as well. In Julia I used "if condition" to switch to Brent(). Based on the problem the bound might change. I am looking for a way of using 5% change from initial guess (or 5% change from mid point of a more general bound). I think Brent uses the mid point of the bound as initial value. Which is totally fine. But the problem happens when for the next step the new guess is significantly different from former one. This could cause NAN in my calculation (due to the number being physically unacceptable). So the question is: Is there any 1D solver which operates by changing 5% from initial guess?
The text was updated successfully, but these errors were encountered:
I am trying to use equivalent for fminsearch in Matlab for 1D problem. There are two issues here:
1- fminsearch uses Neldermead for scalar and works well. It looks like optim.jl cannot be called to solve 1d problem using Nelder mead
2- fminsearch gets an initial guess. At each step it changes the initial guess by 5% until convergence. In julia there are ways of changing NelderMead to comply with that (initial_simplex). Optim.jl also offers Brent() and Goldensection() for 1d, but, neither of those accept initial guess. They both need a bound.
I have a complicated code (both in Matlab and Julia). User can choose among some parameters to optimize some of them. This works well in Matlab since single parameter can be picked as well. In Julia I used "if condition" to switch to Brent(). Based on the problem the bound might change. I am looking for a way of using 5% change from initial guess (or 5% change from mid point of a more general bound). I think Brent uses the mid point of the bound as initial value. Which is totally fine. But the problem happens when for the next step the new guess is significantly different from former one. This could cause NAN in my calculation (due to the number being physically unacceptable). So the question is: Is there any 1D solver which operates by changing 5% from initial guess?
The text was updated successfully, but these errors were encountered: