A technique employing knowledge at the intersection of linear algebra and statistics.
Using projections, as described in linear algebra, it's possible to map an n-dimensional matrix, A, to a vector, b, via a third vector, x, such that Ax=b.
Consider we wanted to simply devise a matrix that would map distance to a firing angle. In order to do this, we might create an 3-dimensional matrix, with values
A = [x^2, x, 1] for every x that we record, where x is the distance to our target at the time of firing, and a second vector,
b = [y] where y is the correct firing angle. After acquiring three data points, we'll be able to arrange our vectors in the form Ax=b, as such:
A = [[a^2, a, 1], [b^2, b, 1], [c^2, c, 1]]
x = [unknown1, unknown2, unknown3]
b = [[angle_a], [angle_b], [angle_c]]
Now we wish to solve for x. To do this, we project A onto b. Therefore, we first multiply both sides of the equation by to get:
And then multiply by the inverse of to reach . We now can compute x.
With x, it is possible to map distances to targets to firing angles, via simply inputing distance into the function:
Notice that the projection matrix, , was used to compute x rather than simply . This is because by using the projection matrix it is possible to compute x for any number of tuples. This is extremely useful since the alternative is to use a polynomial of dimension to fit a line through all of the data points.
This idea is also extremely powerful because it simplifies segmentation- in order to track another factor one simply appends a vector to A. For example, if one wanted to additionally track target velocity, one would simply append another vector to A, such that:
A = [[v, a^2, a, 1], [v, b^2, b, 1], [v, c^2, c, 1]]
where v is the target velocity. (x in this case would also need another element).