Matrix Math
To upgrade our system to multiple variables, you’ll need to know about two operations on matrices. I don’t want to introduce those operations at the last moment, while we’re busy coding. Instead, we’ll take a few pages to get them out of the way now.
A matrix is a bi-dimensional array. For example, here is a (4, 3) matrix, meaning that it has four rows and three columns:
The two operations that we’ll cover are matrix multiplication and matrix transpose. Both are ubiquitous in ML, and each deserves its own section.
Multiplying Matrices
Did you ever wonder why ML is usually done on those big racks of GPUs? That’s because ML systems spend ...
Get Programming Machine Learning now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.