↑ BACK TO TOP
open sidebar menu
  • AI, it's not that complicated/The Basics
    Knowledge Bases
    Analyzing Software CompaniesBuilding Software ProductsAI, it's not that complicatedWorking With Data Teams
    Sections
    1: The Basics
    How do Large Language Models work?What's GPT-3?What’s a data science notebook?How do you train an AI model?The post about GPUsWhy do models hallucinate?What is Machine Learning?
    2: The Generative AI wave
    3: Tools and Products
Sign In

What is Machine Learning?

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

ai

Published: October 7, 2025

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!

Terms Mentioned

Open Source

Framework

Linear Regression

API

ChatGPT

Machine Learning

Loss Function

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.

Loading image...

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.

Loading image...

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.

Types of ML: supervised, unsupervised, and RL

Access the full post in a knowledge base

Knowledge bases give you everything you need – access to the right posts and a learning plan – to get up to speed on whatever your goal is.

Knowledge Base

AI, it's not that complicated

How to understand and work effectively with AI and ML models and products.

$0.00

What's a knowledge base? ↗

Where to next?

Keep learning how to understand and work effectively with AI and ML models and products.

It was never about LLM performance

Beware the benchmark.

The Generative AI wave
What is RAG?

Retrieval Augmented Generation is a way to make AI models more personalized

The Generative AI wave
What's a vector database?

A vector database is a place where developers store specially formatted data to use for machine learning and AI.

The Generative AI wave
Support
Sponsorships
Twitter
Linkedin
Privacy + ToS