elvis Profile picture
5 Nov, 20 tweets, 4 min read
People often ask me how to build better intuitions about different machine learning and deep learning methods. This is a thread about my experience (as an NLP Researcher) building better intuitions of ML/deep learning methods, including resources and tips.

🧵
Overview -- Building intuitions about concepts related to a field requires investing a lot of time and effort. For ML, it is no different. In this thread, I will share a bit of my journey and personal experience building intuitions about DL/ML algorithms & new research ideas.
I don't claim that the tips I share here will work for everyone. Doing a Ph.D. gave me enough time to explore ways to dig deeper into topics, so the context matters. I had access to great advisors that provided me a learning path to be productive in learning and building things.
High-level overview -- Before jumping deep into ML, I took courses like data mining & text mining to build a high-level understanding of methods for building predictive systems. Having this background allowed me to spend time on the problems/methods that I found interesting.
Here are books that I used in my studies to get that **high-level overview**:
📘 Artificial Intelligence: A Modern Approach
📘 Data Mining: Concepts and Techniques
📘 Text Mining: Predictive Methods for Analyzing Unstructured Information
Hands-on experience -- Using that high-level knowledge, I built and trained a lot of models from scratch using tools like R and Python. In order to better understand these models, I attempted to adapt them to different problems, including working on different datasets/tasks.
These books helped with getting that initial hands-on experience:
📘 Data Science from Scratch
📘 Hands-On Machine Learning with Scikit-Learn and TensorFlow: Concepts, Tools, and Techniques to Build Intelligent Systems

* I also dabbled with Kaggle during my studies.
Scope -- As I focused on a family of approaches that helped with the problems I was interested in (mostly NLP-related), I began to get interested in the inner works of these models. I used a combination of visualizations, coding, and math to help me build deeper intuition.
Math - Understanding the math behind ML models really helped me build enough intuitions to get comfortable experimenting with different ML models. I had a strong math background going into my graduate studies so I mostly had to refresh on statistics & advanced calculus...
These two books helped with improving my mathematical understanding of predictive models:
📘 Pattern Recognition and Machine Learning (by Christopher M. Bishop)
📘 The Elements of Statistical Learning (by Jerome H. Friedman, Robert Tibshirani, and Trevor Hastie)
Another book that more recently I have found to be an excellent resource for better understanding the mathematics behind machine learning is the following:
📘 Mathematics for Machine Learning ( by Marc Peter Deisenroth, A. Aldo Faisal, and Cheng Soon Ong)
Visualization -- Understanding the mathematics behind machine learning models is a difficult process especially if you lack a background in math. The good news is that we have excellent tools to help us with this. Graphing and visualization tools really come in handy here.
In terms of visualization, the following skills help:
- Visualize/Understand different probability distributions
- Plotting 2D/3D charts (line chart, scatter plots, bar charts, heat maps, etc)

Visualization is a powerful tool to build intuition... get enough practice here.
Deep learning involves a lot of different types of data transformations. It's important to understand what these transformations do (e.g., dot product, softmax, ReLU, etc.) to get better intuitions about what these models are attempting to do. It's all about exploring here.
These days we have a variety of interactive tools that make it so much easier to plot charts, debug models, visualize weights and predictions, produce loss curves, etc. Check out a few interactive tools put together by @__MLT__: github.com/Machine-Learni…
Interpretability -- Even though this is not discussed as much, being able to understand/evaluate ML models features/predictions is not only a great way to bet better intuitions but also an important skill as you aim to push ML models into the real world for decision making.
There is a whole area of research around evaluating model explanations and interpreting machine learning models. Here is a book I found really useful to get more familiar with how to make black box models explainable:
📘 Interpretable Machine Learning (by Christoph Molnar)
Tools -- The tools you use really shouldn't matter but the more tools you know the better. Just use what works for you or your team. I use Plotly, Pandas, scikitlearn, TensorFlow, and PyTorch. I explore a lot of deep learning models, so I tend to use PyTorch more often.
Overall, I build intuitions around ML methods by:
- reading key literature/establishing background/understanding theory
- running code (if available) & additional experiments
- analyzing/visualizing loss curves, weights, etc.
- analyzing/interpreting/explaining predictions, etc.
If this thread is helpful, I will improve it and publish it as an article in my blog, which you can find here: elvissaravia.substack.com

• • •

Missing some Tweet in this thread? You can try to force a refresh
 

Keep Current with elvis

elvis Profile picture

Stay in touch and get notified when new unrolls are available from this author!

Read all threads

This Thread may be Removed Anytime!

PDF

Twitter may remove this content at anytime! Save it as PDF for later use!

Try unrolling a thread yourself!

how to unroll video
  1. Follow @ThreadReaderApp to mention us!

  2. From a Twitter thread mention us with a keyword "unroll"
@threadreaderapp unroll

Practice here first or read more on our help page!

More from @omarsar0

23 Oct
Before you jump into deep learning, I would strongly advise you to do a few introductory machine learning courses to get up to speed with fundamental concepts like clustering, regression, evaluation metrics, etc.

Here is a thread including a few recent courses you can explore:
"Create machine learning models"

by Microsoft

Note: the module on clustering is really good!

docs.microsoft.com/en-gb/learn/pa…
"Stanford CS229: Machine Learning"

by Stanford and Andrew Ng

Note: One of my favorite ML courses of all time!

youtube.com/playlist?list=…
Read 10 tweets
13 Oct
I have always emphasized on the importance of mathematics in machine learning.

Here is a compilation of resources (books, videos & papers) to get you going.

(Note: It's not an exhaustive list but I have carefully curated it based on my experience and observations)
📘 Mathematics for Machine Learning

by Marc Peter Deisenroth, A. Aldo Faisal, and Cheng Soon Ong

mml-book.github.io

Note: this is probably the place you want to start. Start slowly and work on some examples. Pay close attention to the notation and get comfortable with it.
📘 Pattern Recognition and Machine Learning

by Christopher Bishop

Note: Prior to the book above, this is the book that I used to recommend to get familiar with math-related concepts used in machine learning. A very solid book in my view and it's heavily referenced in academia.
Read 9 tweets
11 Oct
It's really concerning to see so much false advertisement on this idea that applying machine learning is easy.

I talk from both a research and application perspective. The process is rigurous. It's highly iterative and that should give you a hint of why it's hard.
There is rarely a straightforward answer on how to properly apply ML algorithms to dynamic real world datasets. It's a lot of experimentation. First, you need to organize and understand your data very well.

A good experimentation framework helps but that's just the beginning.
A lot of the toy datasets and problems used to teach ML today are clean and binary.

Things in the real world are rarely binary.

You need to spend time cleaning and understanding your data and in some cases dealing with other aspects of it like access, control, privacy,...
Read 10 tweets
2 Oct
For the last couple of months, I have been doing some research on ML in production.

I have shared a few resources here, from repositories to blogs.

However, I have found some of the best content in books.

If anyone is interested, here is a list of books I am studying

🧵
Designing Data-Intensive Applications

by Martin Kleppmann
Building Machine Learning Pipelines

By Hannes Hapke and Catherine Nelson
Read 15 tweets
19 Sep
A couple of days ago I shared a few books that got me started in machine learning.

Here a few books that could help you get started in NLP (in no particular order) 👇
1) Introduction to Natural Language Processing

mitpress.mit.edu/books/introduc…

by Jacob Eisenstein
2) Speech and Language Processing

by Dan Jurafsky and James H. Martin

web.stanford.edu/~jurafsky/slp3/
Read 12 tweets
16 Sep
When I was getting started with machine learning, I remember reading a few books.

I didn't touch a course until I made sure I had a good understanding of some fundamentals.

This approach worked really well for me because it challenged me to build my own intuitions first.
I wasn't perfect. Some intuitions were wrong. And the courses that I took after helped me with that.

That early preparation (reading books) really helped connect the dots quickly.

Doing research is an essential part of learning things and helping build a strong foundation.
Jumping straight to a course may result in a bad experience.

Sometimes, this doesn't have anything to do with the quality of the course.

Most courses are built with the idea that you already have at least some exposure to some concepts.

That's where books help.
Read 5 tweets

Did Thread Reader help you today?

Support us! We are indie developers!


This site is made by just two indie developers on a laptop doing marketing, support and development! Read more about the story.

Become a Premium Member ($3/month or $30/year) and get exclusive features!

Become Premium

Too expensive? Make a small donation by buying us coffee ($5) or help with server cost ($10)

Donate via Paypal Become our Patreon

Thank you for your support!

Follow Us on Twitter!