How can I improve the accuracy of Excel's SOLVER add-on for curve fitting?

  • Thread starter Thread starter flash
  • Start date Start date
AI Thread Summary
Using Excel's Solver add-on for curve fitting to a cosine function often results in finding local minima rather than the global minimum. The user reports that Solver's output varies significantly based on initial variable values for a, n, b, and c, leading to frustration with its reliability. While some users suggest alternative optimization tools, they acknowledge that achieving a global optimum remains a complex challenge. The consensus is that all optimization methods may yield different results depending on starting points. Overall, finding a reliable solution for global optimization in Excel can be quite difficult.
flash
Messages
66
Reaction score
0
Hi
I'm trying to use Excel to find a cosine function, f(x)=a cos n (x-b) + c, that best fits a whole lot of data points. I'm doing this using the Solver add-on in Excel. I have it set up to minimise the sum of the squared differences between each data point and the function's value. I'm pretty confident that its all set up correctly.
The problem is, solver does NOT do what it claims to do. It says it minimises the value in the cell by changing variables a, n, b and c but I can manually input variables that give a much lower value. Solver gives a different value depending on what is initially in the cells of variables a, n, b and c. I believe it is finding some kind of local minimum which is not the overall minimum.
Any ideas? I was hoping someone might have come across this problem with solver and know a workaround :smile:
 
Physics news on Phys.org
I know the question was several months ago, but this reply might have some use, even if for future activity. I haven't been very impressed with the Excel Solver, however I am very happy with the optimization Excel Add-in you can get from here:

http://digilander.libero.it/foxes/SoftwareDownload.htm

scroll down the page until you find "Didactic Optimization Tool for EXCEL".

Having said that, I'm not sure any tool can do a very good job on finding a global minimum. I think they all will provide a different answer depending on the starting point. Global optimization is very difficult. As a professor friend of mine told me: "finding the global optimum requires trying all possibilities".
 
I tried to combine those 2 formulas but it didn't work. I tried using another case where there are 2 red balls and 2 blue balls only so when combining the formula I got ##\frac{(4-1)!}{2!2!}=\frac{3}{2}## which does not make sense. Is there any formula to calculate cyclic permutation of identical objects or I have to do it by listing all the possibilities? Thanks
Essentially I just have this problem that I'm stuck on, on a sheet about complex numbers: Show that, for ##|r|<1,## $$1+r\cos(x)+r^2\cos(2x)+r^3\cos(3x)...=\frac{1-r\cos(x)}{1-2r\cos(x)+r^2}$$ My first thought was to express it as a geometric series, where the real part of the sum of the series would be the series you see above: $$1+re^{ix}+r^2e^{2ix}+r^3e^{3ix}...$$ The sum of this series is just: $$\frac{(re^{ix})^n-1}{re^{ix} - 1}$$ I'm having some trouble trying to figure out what to...
Back
Top