-
Notifications
You must be signed in to change notification settings - Fork 59
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
Return of status #71
Comments
|
Thanks. But |
Look at the OptimizationResults interface, you may find what you need there. |
Thanks a lot. I tried them. I would like to know why the algorithm stop, but looks no one works. |
That would depend on a problem you're trying to solve. I assume you didn't get a desired result which prompted this issue. There are many things that affect the outcome of the optimization: choice of algorithm, its initial conditions & parameters. Depending of the parameter combination, the performance of the algorithm can widely vary. I can only comment on the mechanics of termination condition. There are two termination conditions: a) the algorithm ran over specified number of the iterations, and b) the algorithm reached the specified tolerance level. In any case, you first check if the algorithm converged with
In addition, you may want to setup the trace to gather information about the optimization process which may give you more insights. See tests for examples. |
Thanks a lot for the kind explanation. I can get a desired result at most of the time. The reason I would like that it returns some information because at some specific settings, e.g. different iterations or I selected a weird parameter range, the algorithm fails. I do this specific setting in a for loop, so I would like it return something and I can print in the loop. By your help, I add the |
The debug trace can be enabled through the the
That means you reach some minimum within the specified number of the iterations, which is a good thing. But you need to inspect the solution in case if it's a local minima.
It could be the case, but it depends on a problem setup. Maybe the optimal solution was found but your tolerance level is too low, so the algorithm continues to refine it, and unable to do that in the specified number of the iterations. Or the optimization on the right track to discover the optimal solution, but the changes in the population are small, and so it take more iterations of the algorithm to reach the global minimum. You need to experiment with various parameters and verify the result at the end. |
Thanks for the kind explanation. I got the idea. |
Hi, I am wondering how can I get the status from the
result
variable, is there a function call onresult
and return the status: success or failure? Thanks.The text was updated successfully, but these errors were encountered: