tag:blogger.com,1999:blog-514266239752272007.post950782869398258348..comments2013-04-13T15:36:05.171-05:00Comments on Ike's Baseball Blog: Corrections, Part 4: Methods and thingsIsaac Hallhttps://plus.google.com/106971760655606781075noreply@blogger.comBlogger4125tag:blogger.com,1999:blog-514266239752272007.post-62213738530291371172013-03-29T08:32:06.867-05:002013-03-29T08:32:06.867-05:00I think I have the essential idea of what you are ...I think I have the essential idea of what you are doing, but I still have some questions and one suggestion. No time now to go further but I'll get back here later today.Alan Nathannoreply@blogger.comtag:blogger.com,1999:blog-514266239752272007.post-17569540746559423952013-03-29T00:27:06.173-05:002013-03-29T00:27:06.173-05:00Sorry about the notation...my mathtype program was...Sorry about the notation...my mathtype program was unavailable when I wrote the bulk of this...<br /><br />So the inversion process is still trying to find a 3x3 matrix, as I am going to apply that same matrix to the positions, velocities, and accelerations. The process of applying the matrix treats it as a 9x9, but a block diagonal 9x9 with the same 3x3 in each block. <br /><br />So in order to turn the problem of Ax = b where A is 3x3 (or 9x9 block-diagonal) and x and b are my data vectors into something I can actually solve, I instead turn A into a vector "a" and X into a big 3N x 9 (although I later grew it to 9Nx9 with the additions of velocities and positions) matrix, and b is just a column vector of the appropriate pitch parameters of each pitch mapping at the other park.<br /><br />I should probably write out the form of X and b...<br /><br />(non-fixed width fonts might screw this up)<br />X = [[ x y z 0 0 0 0 0 0 ]<br /> [ 0 0 0 x y z 0 0 0 ]<br /> [ 0 0 0 0 0 0 x y z ]<br /> [vx vy vz 0 0 0 0 0 0 ]<br /> [ 0 0 0 vx vy vz 0 0 0 ]<br /> [ 0 0 0 0 0 0 vx vy vz] <br /> [ax ay az 0 0 0 0 0 0]<br /> [ 0 0 0 ax ay az 0 0 0]<br /> [ 0 0 0 0 0 0 ax ay az]<br /><br />Thats for one data point, at one park (the park we are transforming from. Further data points just get added below. the b vector is just the column vector of pitch parameters for the pitch being matched to at the other park, and the 'a' vector is the column vector [a11 a12 a13 a21 a22 a23 a31 a32 a33].<br /><br />Does that help?Isaac Hallhttps://www.blogger.com/profile/18010171992951029821noreply@blogger.comtag:blogger.com,1999:blog-514266239752272007.post-47376033535748324222013-03-29T00:13:43.792-05:002013-03-29T00:13:43.792-05:00Ike...it's getting late. Let me take back wha...Ike...it's getting late. Let me take back what I said. To get 81 equations, you only need 9 pitches.Alan Nathannoreply@blogger.comtag:blogger.com,1999:blog-514266239752272007.post-13470456836162572222013-03-29T00:03:57.042-05:002013-03-29T00:03:57.042-05:00Ike...I can sort of follow what you are doing. Ho...Ike...I can sort of follow what you are doing. However, your notation is a bit clumsy, as your use of html tags. It makes it difficult to follow. Let me see if I can state things myself and you can tell me if you agree:<br /><br />We want to find transformation A that takes x into y, where x is the 3xN matrix of accelerations for N pitches in stadium X and y is the same for stadium Y. A is a 3x3 matrix, so there are nine numbers for you to determine by solving the set of linear equations. One technique for solving the equations is Singular Value Decomposition (SVD). I'm sure you know the technique, but if not you can read about it in Numerical Recipes and other places.<br /><br />Now, if you include position, velocity, and acceleration in the transformation, then x and y are 9xN matrices and A is a 9x9 matrix. To find 81 numbers, you will need at least 81 equations, meaning 81 pitches. Perhaps you can eliminate off-diagonal terms connecting "unlike" quantities (e.g., accelerations with velocities).<br /><br />Am I on the right track?Alan Nathannoreply@blogger.com