3 ms·
Here goes: You think that Microsoft's stock price is directly related to how much it rained in Seattle. So you look at one day and see it rained 10 inches and
by jastr 14y ago
Here goes:
You think that Microsoft's stock price is directly related to how much it rained in Seattle. So you look at one day and see it rained 10 inches and the stock price was $20. On the next day, it rained 6 inches and the stock price fell to $12. What's the relationship between rain and stock price? Obviously 2x. How would your figure that out mathematically?
(Inches of rain) * ( relationship ) = ( stock price )
So we must find a relationship ( we'll call it r) that works for both of these equations
(10)(r) = 20
(6)(r) = 12
Obvs r=2. That was easy. What if you think this is too simple and the stock price is actually related to both rain fall and the temperature.
We need a new equation
(Inches of rain)(relationship 1) + (temperature)(relationship 2) = ( stock price )
Relationship 1 and relationship 2 are different values, because maybe rain has a much bigger impact on the stock price than temperature. So we need to solve for r1 and r2. (Try making up numbers for rain, temperature, and price on 3 days, and you'll find this gets ugly to solve.)
Then you decide again this is too simple, and the stock price replies on rain, temperature, the moons distance from the earth, the amount of red cars you see on the way to work, etc. Now we have a lot of big equations, that we'd like to solve. Once we solve them we can determine the relationships each factor has on the stock price and tomorrow we can look at all the inputs (temperature, rainfall, etc) and predict the stock price. Matrices are a way of representing all these equations at once.
Matrices are just a data structure, a way of representing equations. Just like computer data structures, matrices have certain functions that you can perform on them, like adding or multiplying them with other matrices.
There are lots of applications that use really really big matrices with thousands of inputs and we'd like to solve these matrices ( ie. find the relationships ).
There are a lot of ways of solving this, like Gauss-Jordan Elimination (which you probably know how to do even if you don't know that you know how). The problem is that most of these algorithms are very slow, because they perform lots of computations manipulating the matrices in order to solve them.
(I have to get back to work so the rest is real short.) In short, this new algorithm is just a really clever guess and check, sort of like genetic algorithms. The algorithm guesses possible values for each relationship. If a set of relationships (aka a vector) fits some of the equations (but not all), then the algorithm generates more relationships similar to it. This goes on until the algorithm finds a set of values for relationships that work in each equation.