3 ms·
The crux of the matter is the linear program. All that math using vec(), diag(), and Hadamard / Kronecker products serves only to build the Q matrix. If the nu
by RodCarvalho 16y ago
The crux of the matter is the linear program. All that math using vec(), diag(), and Hadamard / Kronecker products serves only to build the Q matrix.
If the numbers of bookies and outcomes are small, then you can build the Q matrix by hand (like I did in the example at the end of the post). However, if m and n are relatively large, then it's nice to have an algorithm that builds the Q matrix automatically. Note that vec() and diag() in MATLAB are reshape() and diag(). The Kronecker product in MATLAB is kron(). If one's acquainted with the esoteric matrix operations being used, then it's very easy to convert the math into code.
If you know basic matrix theory, and you learn the basics of linear programming:
http://en.wikipedia.org/wiki/Linear_programming http://en.wikipedia.org/wiki/Linear_programming
then the following matrix cookbook should contain all the recipes (vec(), diag(), Kronecker / Hadamard products) you need to follow my blog post:
http://research.microsoft.com/en-us/um/people/minka/papers/matrix/ http://research.microsoft.com/en-us/um/people/minka/papers/m...
Any questions, feel free to ask.
- geuis 16y agoThanks. Wow, I still have next to no idea of what you're describing but I'll happily take a look at the links. It sounds like I should start by learning about basic matrix theory then?
- RodCarvalho 16y agoThe ideas are simple. Instead of having a double sum, we can have a matrix product of the form 1_m^T X 1_n, which is nothing more than a compact way of writing the sum of all the entries of matrix X. Note that vec(X) is a mn-dimensional vector that contains the n stacked columns of X. Hence, 1_m^T X 1_n = 1_mn^T vec(X) which is an inner product. Note that the equality 1_mn^T vec(X) = c defines a hyper-plane, whereas the inequality 1_mn^T vec(X) <= c defines a half-space: http://en.wikipedia.org/wiki/Half-space http://en.wikipedia.org/wiki/Half-space The intersection of half-spaces defines a polytope, which is nothing more than the higher dimensional equivalent of a polyhedron. Take a look at Boyd & Vanderberghe's book on Convex Optimization for details: http://www.stanford.edu/~boyd/cvxbook/ http://www.stanford.edu/~boyd/cvxbook/