Towards a High-Level Understanding of Machine Learning

Sean Gahagan
3 min readAug 21, 2022

--

In 2018, I took Stanford’s Machine Learning course by Professor Andrew Ng through Coursera, and I highly recommend it for anyone looking to get a more in-depth, hands-on understanding of the mechanics behind machine learning (ML). In 2019, I began sharing my key high-level learnings with my coworkers at a large tech company. Since then, several coworkers and friends have urged me to share them publicly. So, here we go.

While most of us probably don’t need an in-depth understanding of ML, most of us encounter ML-powered experiences every day, and so I believe that ML should be demystified so that we can have more meaningful conversations about how and where we use ML in society.

Starting Off

What exactly is machine learning?

Machine learning gives computers the ability to learn without being programmed explicitly. Here’s a classic description:

“A computer program is said to learn from experience E with respect to some task T and performance P if its performance on T (as measured by P) improves with more experience E.”

In other words, machine learning is what occurs when giving a program “more experience” with a task makes it better at performing that task.

Types of Machine Learning

Machine learning can generally be broken into two categories:

  1. Supervised learning: when the “right answers” are given in the examples that the model learns from. Some types of supervised learning are: (a) "Regression" problems, where a model gives a continuous output. An easy example of this is using data from previous home sales to train a model to predict the price that a new home will sell for (e.g., $504,000). The data would include the different homes' final sale prices as "the right answers", and then include other traits such as square footage, number of bedrooms, and number of bathrooms to help the model predict the answer; (b) "Classification" problems, where a model gives discrete outputs. A common (but somber) example is using medical diagnosis data from a set of tumors to train a model to predict whether or not a new tumor is malignant (i.e., either "Yes, it is." or "No, it isn't."). The data would include the final diagnosis as "the right answer", and could also include other traits such as size and density to help the model predict the answer.
  2. Unsupervised learning: when no “right answers” are given, but the model finds structure or patterns in the data. “Clustering” problems are a type of unsupervised learning, where a model assigns group membership to different entities represented in the data. A classic example of this is customer segmentation, where a model uses a set of customer data to segment the customers into groups with similar traits. The data could include things like monthly purchases, average purchase value, average purchase volume, and time since last purchase, but there is no “right answer” that the model is trying to predict.

In the examples above, it’s easy to visualize how the models might be making their predictions and decisions. You can visualize a home’s sale price from its square footage (a 2D plot) and even from both the square footage and the number of bedrooms (a 3D plot). But machine learning models can make predictions based on a theoretically unlimited number of inputs.

For example, many machine learning models use hundreds of inputs to predict things like how likely it is that a specific person might buy a certain product. The logic involved in these types of predictions is impossible for us to visualize, but these predictions are what make machine learning so powerful and valuable to our society.

Next Up

Next, I’ll share a note on key terminology, some light notation, and a common method for training machine learning models.

--

--