Quote:
Originally Posted by Ether
Caleb explained it very clearly in the previous post.
If you need more detail, this post shows a simple AWK script for creating the necessary matrix and column vectors, and a simple Octave script for doing the linear algebra.
|
Also note the following: in Caleb's discussion, [A] is a non-square binary matrix (each element is either 1 or 0) with 2M rows and T columns, where M is the number of matches and T is the number of teams... and [b] is a 2M by 1 column vector of alliance scores. So [A][x]≈[b] is indeed an overdetermined system which has no exact solution.
But if you left-multiply each side of [A][x]≈[b] by [A
T], you get
[N][x]=[d], where
[N] is [A
T][A] and
[d] is [A
T][b]
[N] will be an invertible square symmetric positive definite matrix, and [N][x]=[d] will have an exact solution because it's already in the Normalized Equations form. The exact solution to [N][x]=[d] will be the least-squares approximate solution to [A][x]≈[b] (to within computer floating-point rounding error).
You can generate [N] (and [d]) directly from the raw score data, but it's more straightforward to generate the binary matrix [A] in sparse form.