Hi all, First, thank you for your efforts in providing the octave packages. This would not be possible without you!
PROBLEM: I'm quite new to octave but have managed to cobble a script together that uses leasqr with bounded parameters to fit model parameters to experimental values. The code has been working well, but with certain initial parameters the bounds I've set are not respected and the value of some parameters, almost always only one, become -ve (they should all be +ve). I've searched the archive and the web for reports of similar problems but couldn't find anything relevant. VERSION DETAILS: octave: 3.2.3 optim: 1.0.12 os: kubuntu 10.04 RELEVANT CODE: ## generate parameters for leasqr pin_ones = ones(length(pin),1); stol=0.0001; # scalar tolerance on fractional improvement in scalar sum ofsquares = sum((wt.*(y-f))^2); default stol = .0001; niter=40; # maximum number of iterations; default = 20; wt = 1 ./ (0.05*expt_data .* ones(length(expt_data),1)).^(2); # statistical weighting = 1/(variance)^2 dp = 0.001*pin_ones; # fractional increment of p for numerical partial derivatives default = .001*ones(size(pin)); dFdp = 'dfdp'; # name of partial derivative function in quotes; default is 'dfdp' max_Dnt = 1e40; options.bounds = [ 1e-30*pin_ones, max_Dnt*pin_ones ]; # constraints (also applied to optimised input file parameters) ## Call ctave fitting routine [f,p,kvg,iter,corp,covp,covr,stdresid,Z,r2] = leasqr(expt_Vg_all, expt_data, pin, 'F', stol, niter, wt, dp, dFdp, options); DETAILS: Unless I've made a obvious mistake in the above code, I realise it may be of little use, other than highlighting that the bug exists. I can post the whole script or show you some examples of the output parameters. The majority of the rest of the script is concerned with passing the parameters to an external C program which generates the model data, and with reading in and processing that data. Has anyone encountered this problem or can help find a solution to it? Gary ------------------------------------------------------------------------------ _______________________________________________ Octave-dev mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/octave-dev
