Technically

Technically

What is Machine Learning?

How computers learn patterns from data: the foundation for everything from stock price prediction to ChatGPT.

Justin's avatar
Justin
Oct 07, 2025
∙ Paid
Share

The TL;DR

Machine Learning is how computers learn patterns from data, and use those patterns to understand what’s going to happen next.

  • If you have good data on a problem, ML can help machines find patterns in that data and predict what’s coming next

  • The ML model building process: curate, train, test, predict

  • Machine Learning can be supervised, unsupervised, or done via reinforcement learning

  • ML models come in all shapes and sizes, from simple linear regressions to complex neural networks

If you want to understand generative AI like ChatGPT and Claude, you’ll need to understand the basics of ML first. So read on!

Machine learning basics

⛓ Related resources ⛓

There are some incredible interactive visual resources on the web that explain how Machine Learning works more in depth. A great place to start is R2D3’s visual introduction to ML.

The ideas that make up modern Machine Learning have been around since the 1950s. At its core, it’s very simple: data has patterns, and you can use those patterns to predict what’s going to happen next. In fact, you already do this every day.

Imagine you’ve got a friend who is constantly late. You’ve got a party coming up, so your expectation is that he’s going to, shocker, be late again. You don’t know that for sure, but given that he has always been late, you figure there’s a good chance he will be this time. And if he shows up on time, you’re surprised, and you keep that new information in the back of your head; maybe next time you’ll adjust your expectations on the chance of him being late.

Your brain has millions of these models working all the time, but their actual internal mechanics are beyond our scientific understanding for now. So in the real world, we need to settle for algorithms – some crude, and some highly complex – that learn from data and extrapolate what’s going to happen in unknown situations. Models are usually trained to work for specific domains (predicting stock prices, or generating an image) but increasingly they’re becoming more general purpose.

Logistically, a Machine Learning model is sort of like an API: it takes in some inputs, and you teach it to give you some outputs. Here’s how it works:

  1. Curate some data – gather data on the problem you’re trying to predict and get it ready for a model to look over.

  2. Train the model – choose an algorithm (or two), and try to fit a model to the data.

  3. Predict – you show new data to the model, and it spits out what it thinks

You design the model’s interface – what kind of data it takes, and what kind of data it returns – to match whatever your task is.

An illustrated explanation of machine learning — in a nutshell.

Central to the idea of Machine Learning is figuring out how to frame something as a Machine Learning problem. For old school examples like predicting stock prices (or if your friend is going to be late), it’s straightforward. The data is historical stock prices, and the output is the stock price at a future date.

But what about something less obvious, like image classification? Imagine you’re a corn (and soybean) farmer in Iowa, and you want to develop a model that allows you to detect whether images of your crop have harmful pests in them or not. How would you frame that as a prediction problem?

Images, as represented on computers, are a bunch of pixels. Each pixel has a color value, and over several thousand of them in specific positions, you’ve got an image. This is how a computer sees a picture.

A visualization of how computers see photos (in pixels).

In image classification, you’ll typically organize hundreds of these images, some with harmful pests in them, and some without. Each will have a label: pests or no pests. When you train your model, it will learn to associate some combinations of pixels with pests, and some without. And then when you pass the model a new image it hasn’t seen before, it will apply those learnings and give you a best guess as to whether you’ve got bugs or not.

Tabular data (stocks) and images (Iowa) are two common ML use cases, but there are so many more. You just need to learn to frame problems in ML terms.

Types of ML: supervised, unsupervised, and RL

There are lots of ways that machines can learn from data. The two most popular types are supervised learning and unsupervised learning, and the major difference is how you present your data to the model.

Keep reading with a 7-day free trial

Subscribe to Technically to keep reading this post and get 7 days of free access to the full post archives.

Already a paid subscriber? Sign in
© 2025 Justin
Privacy ∙ Terms ∙ Collection notice
Start writingGet the app
Substack is the home for great culture