Optimization problem - reducing the time needed to solve
2 views (last 30 days)
Show older comments
Attached is a code, CIMDO.m, which attempts to solve the following optimization problem for lambda_0, lambda_1, ..., lambda_n.
Note that in the following, n is a fixed (natural) number (depending on the data that I use). It varies from 2 to 33.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/156580/image.jpeg)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/156582/image.jpeg)
However, when running the code, I realise that as n gets big (e.g., when n exceeds 10), the code suffers from severe curse of dimensionality, that is, it takes many days to just solve for the lagrange multipliers. Adding on to this, I have many sets of values for P_1, P_2, ..., P_n that I would like to use.
Are there any ways to make the code run faster? I am sure it is as efficient as it can be. Or are there any other methods of solving this optimization problem?
Thanks
0 Comments
Answers (1)
Oliver Woodford
on 13 Feb 2014
ConstLM.m looks very inefficient to me. I think those loops can be vectorized. Profile your code, and learn about vectorization.
However, this will not really address the problem, which is that the computational complexity of your optimization is exponential in the dimensionality, n. The only way round this is to use another approach for your integration, e.g. a Monte Carlo method.
0 Comments
See Also
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!