Don’t fear the math

ML can be intimidating when you first check out some online courses or do something gonzo like try to read a white paper. None are shy about flashing mathematical formulas and functions. It’s easy to allow your eyes to go out of focus, ignore what they scan and trust that the magic ML gnomes will continue to work their mystical powers under the hood.

Personally, I never liked that feeling. In earlier attempts to take online courses, it turned out to be one of my biggest sticking points. I’d stall on progress because every new concept would send me googling around to try to learn what the hell things like the mean squared error were and why it mattered. It quickly became the proverbial rabbit hole and I plunged right down it.

My background is certainly not mathematical and I did what I needed to in order to satisfy my high school’s/college’s math requirements. Some things stuck, some things didn’t. Part of the problem is like this TED talk describes. Math can be dry, purposefully hyper abstract, divorced from the history of what made it important and lacking a human touch.

Trying to be proficient in ML, it just doesn’t help to continue to live in ignorance. I had a massive math deficit and I had to pay it down BUT I also needed to make progress on my online courses. The promise I made to myself was that I would meet the deadlines of my online course first before I sated my math curiosities. Put into practice, I’d make sure to do my ML homework first and then, time permitting, take a deeper dive into the math of things.

That’s worked out pretty good and I’ve gained some level of math literacy that I haven’t had in the past. With math formulas, my biggest trouble was from the profusion of abstract, single character named variables that show up as coefficients, superscripts and subscripts. When I slowed things down and learned how to identify how they worked, it made things much more approachable and unlocked a whole host of formulas that were formerly beyond my reach. If you want an easy-to-digest sample for yourself, start with the formula for calculating averages since it has a formal definition to go along with its simple concepts.

Outside of just being able to read the mathematical sheet music, I’ve been trying to understand the relationships in math. That’s really where much of the magic of math happens. Everything is related in some way. If you know one or more pieces of information, you can calculate or discover new data. I just went through this whole unit on word embeddings and the vector space and one of the measures of word similarity is done by calculating the cosine between word vectors. There are a variety of related math concepts that made such an interesting feat possible.

What I truly desire is a mathematical intuition. I want to see a math formula and just have a feeling for what it does without having to be told exactly what it does and why. I want to know my way around such that I can diagnose when my ML model isn’t performing well and how I could improve it. I want to proactively improve my models with what I understand.

My understanding continues to evolve. Learning about linear algebra, trigonometry, calculus, and other areas has been a blast. I highly recommend YouTube tutorials and intros to math. There’s so much good information out there and there are some really enthusiastic and prolific math YouTubers. Khan Academy is excellent too with clear explanations and with some examples you can try. Give math a chance!