How to Get Better at Math for Machine Learning

Math is difficult, but is extremely important for statistics and machine learning.  Sometimes when you work with great researchers, they can tell you what the performance of certain algorithms will look like on certain datasets before seeing the results due to understanding the mathematical properties of their algorithms.  This is hugely valuable as it avoids the need to throw darts blindfolded and hope one of them hits a bulls-eye.  Some people are naturally gifted at math: how can the rest of us keep up?  Here are some tips that I’ve found useful, as someone who isn’t particularly gifted but has spent a good chunk of time studying math, some of it at the graduate level:

    1. Never be afraid to fix your fundamentals.  If you’re trying to read a paper using techniques from measure theoretic probability and you haven’t mastered undergraduate analysis, you have two good options: a) get someone else to help you out who can explain everything you need as you need it or b) go back and learn your undergraduate analysis better.  Similarly, if you haven’t mastered certain techniques in calculus even, go back and learn them properly.  It’s better to go slowly but build on top of strong fundamentals than to go too quickly and never really understand what you’re doing.
    2. Do your best to understand every single line of what you’re reading.  If you ‘skip’ in math you’ll miss really important parts of the story.  If you get stuck, ask the best math person you know.  Ask on math stack exchange, forums, and cross-validated.  There are some really smart people out there.
    3. Once you understand every single line, see if you can describe the idea of what chunks of lines of math are doing.  Can you summarize each paragraph of a proof in one or two sentences?
    4. If you have trouble with a proof or derivation, highlight the particular lines you have trouble with.  Keep replicating those lines again and again until they are easy.
    5. Work on replicating the entire proof, both with and without the high-level summaries.

Always remember that unless you’re primarily a theorist, in which case you’re probably already very good at math or you shouldn’t be a theorist, you don’t need to make a huge leap in math skill to being excellent overnight.  What you need to do is keep plugging away at it and not ignore it.  For some solid fundamentals books in math and stats, see here.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.