![]() Multiplication evolved from repeated addition, to scaling ( decimals), to rotations ( imaginary numbers), to "applying" one number to another ( integrals), and so on. Long story short, don't get locked into a single intuition. "The information in x is becoming a function, and we're passing itself as the parameter." Geometric scaling and linear composition have their place, but here I want to think about information. You can start estimating when you'll get a single value, or when you'll get a "permutation grid" as a result. In some cases it gets tricky because we store the data as rows (not columns) in the matrix, but now I have much better tools to follow along. This should give us a single value.Ĭan be worked through. In the first equation, we're treating $\theta$ (which is normally a set of data parameters) as a function, and passing in $x$ as an argument. I now have an instant feel of what's happening. Phew! How does this help us? When we see an equation like this (from the Machine Learning class): (This helps compute the covariance matrix, a measure of self-similarity in the data.) Putting The Intuition To Use It's the "function x" working on the "vector x". Here, we've mixed the data with itself in every possible permutation. The result is a grid where we've applied each function to each data point. When we see x * x' we mean x (as a set of functions) is working on x' (a set of individual data points). In other words, we've applied the data to itself. The result is the dot product ( read more). When we see x' * x we mean: x' (as a single function) is working on x (a single vector). f' is separated into three functions (each taking a single input).A single data vector, in a vertical column.Similarly, if f = is our row vector, then f' can mean: x' can still remain a data vector, but as three separate entries.If x was a column vector with 3 entries ( ), then x' is: The matrix transpose swaps rows and columns. This is getting neat: depending on the desired outcome, we can combine data and code in a different order. The vertical column of data could really be three distinct functions, each taking a single parameter.Īh. The row containing a horizontal function could really be three data points (each with a single element). This is a function taking three inputs and returning a single result.Īnd the aha! moment: data is code, code is data! Here, x is a vector of data (I'm using to separate each row). We take raw information like "3 4 5" treat it as a vector or function, depending on how it's written:īy convention, a vertical column is usually a vector, and a horizontal row is typically a function: (Compilers treat a program as text, modify it, and eventually output "instructions" - which could be text for another layer.) The result is a new recipe, which can be further tweaked, or executed as instructions to make a different pie, muffin, cake, etc. Adjust for altitude or different equipment.If you interpret the words as data, the text is prose that can be tweaked: If you interpret the words as instructions, you'll end up with a pie, muffin, cake, etc. (Some purists cringe at reducing beautiful algebraic structures into frumpy spreadsheets I sleep OK at night.) Programmer's Intuition: Code is Data is Code But mostly I think about information flowing through a system. Sometimes I'll think of data as geometric vectors, and sometimes I'll see a matrix as a composing functions. We can swap between the vector and function interpretation as needed.Some of the data are seen as functions to apply, others as data points to use.We store information in various spreadsheets ("matrices").I think of linear algebra as "math spreadsheets" (if you're new to linear algebra, read this intro): I'll put a programmer's viewpoint into the ring:ģ) Matrix multiplication is about information flow, converting data to code and back. We need another intuition for what's happening. However, sometimes the matrix being operated on is not a linear operation, but a set of vectors or data points. This is the technically accurate definition: yes, matrix multiplication results in a new matrix that composes the original functions. With large matrices I don't think about 500-dimensional vectors, just data to be modified.Ģ) Matrix multiplication composes linear operations. ![]() You probably don't think "Oh, I need the volume of a invitation-familysize-hunger prism!". ![]() If 20 families are coming to your BBQ, how do you estimate the hotdogs you need? ( Hrm… 20 families, call it 3 people per family, 2 hotdogs each… about 20 * 3 * 2 = 120 hotdogs.) Unfortunately, this can lead to an over-reliance on geometric visualization. ![]() This is useful when first learning about vectors: vectors go in, new ones come out. What does matrix multiplication mean? Here's a few common intuitions:ġ) Matrix multiplication scales/rotates/skews a geometric plane. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |