Thread: OPR
View Single Post
  #17   Spotlight this post!  
Unread 05-03-2015, 10:26
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 8,126
Ether has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond repute
Re: OPR

Quote:
Originally Posted by Spoam View Post
Adding on to this, if anyone truly wants to do the math themselves it's worth mentioning that you'll end up with an over-determined system and a non-invertible matrix. Because of this, |Ax-b|=0 probably doesn't exist (every robot would have to contribute the exact same amount of points every match for that to happen) and you have to settle for minimizing |Ax-b| instead. This is done via a formula called linear least squares, which is essentially just left-multiplying both sides by the pseudo-inverse of A, to pseudo-solve it, if you will.
It's important to note that in your (excellent) discussion above, [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 look carefully at the way saikiranra defined the matrix [A] and the column vector [b], you'll see that his [A] is actually [N]=[AT][A] and his [b] is actually [d]=[AT][b].

[N] will be a 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).

Quote:
you have to settle for minimizing |Ax-b| instead. This is done via a formula called linear least squares...
It is also important to note that least squares is not the only criterion for minimizing the residual vector ε=[A][x]-[b]. For example, you could choose to minimize the L1 norm of ε (least absolute deviation) instead of minimizing the L2 norm (least squares).

Quote:
which is essentially just left-multiplying both sides by the pseudo-inverse of A, to pseudo-solve it, if you will.
That is conceptually true, but it is far faster (computationally) to form the system [N][x]=[d] and solve it that way.


Reply With Quote