Sign in to follow this  

Vector-argument function minimization

Recommended Posts

Hey,

I have this function: http://www.HostMath.com/Show.aspx?Code=%0AF(%5Cvec%20v_g)%20%3D%20%5Csum_%7Bi%3D1%7D%5E%7Bn%7D%20(%5Cvec%20v_i%20%5Cvec%20v_i%5ET%20-%20%5Cvec%20v_i%20%5Cvec%20v_g%5ET%20%5Cvec%20v_g%20%5Cvec%20v_i%5ET%20)%0A%5C%5C%0A%5Cvec%20v_i%20%3D%20p_i%20-%20p_g

This is formula for the sum of squared distances of points $p_i$ from a line defined by point $p_g$ and unit direction vector $v_g$.

Now I want to find such $v_g$ unit vector that function $F$ is minimized. How to do so?

Share this post


Link to post
Share on other sites

I took solution from here https://www.geometrictools.com/Documentation/LeastSquaresFitting.pdf chapter 2. I find the eigenvalue using numerical power method presented here https://mathsupport.mas.ncl.ac.uk/images/9/9a/Numrcl_detrmntn_eignvl_eignvc.pdf

 

Thanks for pointing out the total least squares though. I've gone through some "least squares" solutions but none applied to my problem.

I think the total least squares is referenced here http://math.stackexchange.com/questions/701051/how-is-the-derivative-with-respect-to-vector-is-taken-in-linear-regression?rq=1

From what I understand beta vector holds the input points. But what is stored in X matrix and t parameter?

Share this post


Link to post
Share on other sites

I took solution from here https://www.geometrictools.com/Documentation/LeastSquaresFitting.pdf chapter 2. I find the eigenvalue using numerical power method presented here https://mathsupport.mas.ncl.ac.uk/images/9/9a/Numrcl_detrmntn_eignvl_eignvc.pdf


All that seems correct, although the numerical power method can be very slow in some circumstances.


I think the total least squares is referenced here http://math.stackexchange.com/questions/701051/how-is-the-derivative-with-respect-to-vector-is-taken-in-linear-regression?rq=1
From what I understand beta vector holds the input points. But what is stored in X matrix and t parameter?


That looks like standard least squares to me, where you measure errors vertically.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this