[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
leasqr minimization and distance functions
From: |
octaveuser001 |
Subject: |
leasqr minimization and distance functions |
Date: |
Sat, 15 Oct 2011 11:30:39 -0700 (PDT) |
Hi,
I have a question on the usage of leasqr function for non-linear least
squares.
I have a set of N 3D points and i have to fit a geometric model to it.
Lets say the geometric model has 5 DOF i.e it is parameterized by 5
variables and N >> 5. I have a distance function that determines the
distance of the 3D point to a given model.
My objective is to find the 5 parameters from the N points such that the
total distance is minimized and close to zero. If we want to formulate it in
least squares sense and use leasqr (which uses non-linear
Levenberg-Marquardt), i have
[f,pout] = leasqr(pts,zeros(N,1),pin,distfunc);
where pin is my initial parameter vector (of length 5 here) and distfunc is
a handle to the distance function and pout is the expected output.
The confusion i have here is my observed variables (i.e y) will be zeros,
since i want the (distance) values to be zero. This sounds a bit different
from a normal regression and i am not sure if leasqr will give stable
results for this use-case.
I am not getting good fit for the parameters and wanted to make sure i am
using this function for what it was intended. I even played around with
giving my own Jacobian (derivative function) but still i dont get good
results. Could someone please advice if i am using the function for what it
was intended to?
And what is a good value for the scalar tolerance - the default 0.0001
works really bad for my use-case and wanted to understand if that is the one
generally used.
Thanks in advance for your response.
--
View this message in context:
http://octave.1599824.n4.nabble.com/leasqr-minimization-and-distance-functions-tp3907989p3907989.html
Sent from the Octave - General mailing list archive at Nabble.com.
- leasqr minimization and distance functions,
octaveuser001 <=