How to implement linesearch in optimization algorithms?
40 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Olawale Oyewole
el 13 de Jul. de 2023
Comentada: Olawale Oyewole
el 8 de Sept. de 2023
I am trying to implement a linesearching procedure in an optimization algorithm. $\eta_n=\eta^{m_n}$ where $m_n$ is the smallest integer $m$ such that $\eta_n\|A(x)-A(y)\| \le \mu\|x-y\|.$ Please how do I execute this in function mode?
Respuesta aceptada
Harimurali
el 8 de Sept. de 2023
Editada: Harimurali
el 8 de Sept. de 2023
Hi Olawale,
I understand that you want to implement a line searching procedure for the given optimization algorithm. The error being shown while running the MATLAB code given in the comments is because in line 8, in the function call of A, you are calling the function F with a scalar value, but the function F expects a vector as an argument.
As for the implementation of the line searching procedure in MATLAB for the given optimization algorithm, where is the smallest integer m such that .
You can use a loop to increment the value of muntil the inequality is satisfied by following these steps:
- Let the initial value of m = 1
- In the loop, calculate the left-hand side of the inequality using the values provided for and the functions and
- If the inequality is satisfied, then the smallest value of m that is is obtained. Otherwise, m is incremented, and the loop continues until the inequality is satisfied
Hope this helps.
6 comentarios
Harimurali
el 8 de Sept. de 2023
I am not able to assess the logical correctness of this loop due to the multiple dependencies, which are the calls to the functions inner, A, B, F, and error. This looks very different from the equation you have provided in the question. As this loop is part of the implementation of the whole algorithm, there is a lot of coupling with the rest of the code. You could try to implement and run the loop separately and then integrate it with the rest of the code. Also, due to the scalar-vector conflict, I feel that a major rework of the code may be required.
Más respuestas (0)
Ver también
Categorías
Más información sobre Get Started with Optimization Toolbox en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!