MATLAB: About implementation of lsqnonlin

lsqnonlinobjective-functionparameter estimation

Hi
I have time-course data variable 'prodconcnumbers', size 18000X22 meaning 18000 data points for each of the 22 molecules in my model.
I have 30 parameters to be fit.
I invoke fitting using lsqnonlin as follows:
karbitraryvalues (My initial value parameters)=row vector of some 30 starting values.
lb and ub were again assigned bounds.
lsqnonlinoptions=optimset('Algorithm','Levenberg-Marquardt');
[kestimates,errorperspecies]= lsqnonlin(@lsqnonlin_fun, karbitraryvalues,lb,ub,lsqnonlinoptions);
So, first I built my objfunction as follows:
for eachspecies from 1 to 22
errorpermolecule(eachspecies)=prodconcnumbers(:,eachspecies)-estimatedconcnumbers(:,eachspecies);
end
So, in conclusion, my obj.function I want to minimize errorperspecies is of length 22 where as I have 30 parameters to b estimated using this lsqnonlin.
I am getting the following error:
??? Error using ==> lsqncommon at 102
Levenberg-Marquardt and Gauss-Newton algorithms do not handle bound constraints and trust-region-reflective algorithm requires at least as
many equations as variables; aborting.
What mistake am I doing? Appreciate your time and help.

Best Answer

Since you have bound constraints, there was no point choosing the Levenberg-Marquardt algorithm, since it will not handle those. When it saw that you were applying bounds, lsqnonlin defaulted back to the trust-region-reflective algorithm.
The other problem was that you are trying to fit 30 parameters with only 22 data points. The trust-region-reflective algorithm cannot process under-determined problems, but even if it could, you would get poor results because your problem is undetermined.
Find more data points with which to do the fit.
Related Question