Jump to content
  • Advertisement
Sign in to follow this  
maxest

Vector-argument function minimization

This topic is 575 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

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
Advertisement

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
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!