|
|
|
![]() |
|
|||||||
|
||||||||
|
|
Thread Tools | Rate Thread | Display Modes |
|
#12
|
||||
|
||||
|
Re: [FTC]: Championship OPR?
Quote:
Here's the Octave script I used: format longAttached is the output list of Team OPR's generated by the above script using your data. Quote:
When you have a set of overdetermined linear equations: [A][x]≈[b] (notice the approx equal sign "≈" because there is no exact solution since the system is overdetermined) ...if you multiply both sides by [A]T, you get: [A]T[A][x]=[A]T[b] => [N][x]=[d] ...which is a set of n equations in n unknowns, where "n" in this case is the number of columns in [A] (the number of teams). Notice the "≈" sign has changed to "=" since the system now has an exact solution. The above are called the normal equations (of the overdetermined linear system), and solving these normal equations for [x] gives the least-squares solution to the original [A][x]≈[b] problem. But if you're using a language with a linear algebra library, you can solve the overdetermined [A][x]≈[b] for the least squares solution directly. In Octave the syntax is called "left division" (x = A\b). In Python you use np.linalg.lstsq(A,b). Be aware that "least squares" (min L2 norm of residuals) is only one of many possible "best fit" solutions to the overdetermined system [A][x]≈[b]. For example, there's the "Least Absolute Deviations (LAD)" solution (min L1 norm of residuals). And there are other "robust regression" methods. |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|