There must be an easier way...
Dec. 22nd, 2008 06:20 pmI was reading up on a body tracking algorithm. All was going well until I came across this lovely equation
k = (y-mk)TK-1(y-mk) (
(y is a 5 value vector, m is a mean value for expected y and K is a 5x5 covariance matrix).
Most of this is fine. The problem I have is K-1. Are we really trying to find the inverse of a 5x5 matrix? I have no idea how to do that. I'm only a simple computer scientist and I'm sure we can find an easier way to work out probabilities.
I really need to read up on this stuff.
k = (y-mk)TK-1(y-mk) (
(y is a 5 value vector, m is a mean value for expected y and K is a 5x5 covariance matrix).
Most of this is fine. The problem I have is K-1. Are we really trying to find the inverse of a 5x5 matrix? I have no idea how to do that. I'm only a simple computer scientist and I'm sure we can find an easier way to work out probabilities.
I really need to read up on this stuff.
(no subject)
Date: 2008-12-22 07:32 pm (UTC)The inverted matrix multiplies a vector, so you don't have to do the full matrix inverse. I can't do your equation notation, so I'll improvise. If vector z denotes inverse K times (y-mk), then Kz = y-mk. This is a 5x5 set of simultaneous equations so you solve those for z with a standard library algorithm such as Gaussian elimination with interchanges. Then you multiply y-mk (transposed) by z (which is a scalar product).
Hope that helps. D.
(no subject)
Date: 2008-12-22 08:12 pm (UTC)My maths is so rusty.
(no subject)
Date: 2008-12-22 10:35 pm (UTC)(no subject)
Date: 2008-12-23 11:18 am (UTC)