Machine Learning Basics
What Is Machine Learning?
Machine learning defined: training, features, labels, and predictions, plus supervised, unsupervised, and reinforcement learning.
Tutorial overview
What you will learn
- Define machine learning and contrast it with explicit programming
- Use the terms training
- features
- labels
- and predictions correctly
- Tell supervised
- unsupervised
- and reinforcement learning apart
By the end, you will have
- A precise vocabulary for how machines learn from data
Introduction
Machine learning is a way of building software where the computer learns patterns from examples instead of following rules a programmer wrote by hand. In traditional programming, a person writes the exact instructions and the computer applies them. In machine learning, a person supplies data and a goal, and the system adjusts itself until its outputs match the goal well. That shift, from writing rules to learning from data, is the single idea behind most of the AI you use today.
This lesson gives you the precise vocabulary: training, features, labels, predictions, and the three major types of learning.
What you will build or practice
You will work through one complete example, a spam filter, and label every part of it with the correct machine learning term. By the end you will be able to read a sentence like the model was trained on labeled data and know exactly what it means.
Before you begin
You need a notes app and about thirty minutes. No coding or math. It helps to have read What Is Artificial Intelligence? first, since machine learning is the branch of AI that makes learned systems possible.
Key concept
Four terms cover most of machine learning:
- Training is the process of showing the system many examples and letting it adjust its internal settings to reduce mistakes.
- Features are the measurable signals in each example, such as the sender address and word choices in an email.
- Labels are the correct answers attached to training examples, such as spam or not spam.
- Predictions are the system's outputs on new, unseen examples after training.
A trained system is called a model. The model is only as good as its data: if the examples are unrepresentative or the labels are wrong, the predictions will be too.
Step 1: Walk through the spam filter example
Imagine ten thousand emails, each marked spam or not spam by people. The emails are the data, the human marks are the labels, and signals like suspicious links, unusual senders, and certain phrases are the features. During training, the model learns which feature combinations tend to appear in spam. Afterward, it can score a brand-new email it has never seen. That score is a prediction.
Step 2: Learn the three types of learning
- Supervised learning uses labeled examples, like the spam filter. Most practical systems, from price estimation to medical image screening, work this way.
- Unsupervised learning gets data with no labels and finds structure on its own, such as grouping customers into similar segments.
- Reinforcement learning learns by trial and feedback: the system tries actions, receives rewards or penalties, and improves, the way game-playing agents learn.
A quick test: if a person had to provide correct answers up front, it is supervised.
Step 3: Separate training from using the model
Training happens once, on historical data, and usually needs heavy computation. Using the model, called inference, happens every time you interact with it and is fast. When a spam filter checks your inbox, it is not learning in that moment; it is applying what it already learned.
Step 4: Classify systems you know
In your notes, classify these: a music app grouping songs by sound similarity (unsupervised), a photo app trained on tagged faces (supervised), a thermostat that experiments with schedules to cut energy use (reinforcement). Then add two systems from your own life and classify them.
Practice exercise
Pick any prediction you would like software to make, such as which emails deserve a fast reply. Write down what the examples would be, which features might matter, where labels would come from, and which type of learning fits. You have just sketched a machine learning problem the way practitioners do.
Common mistakes
- Saying the algorithm knows instead of the model predicts; predictions carry uncertainty.
- Forgetting that labels come from people, so human error and bias flow into models.
- Confusing training with inference and expecting a deployed model to learn from your corrections instantly.
Check your understanding
- How does machine learning differ from explicit programming?
- In the spam example, what are the features and what are the labels?
- Which type of learning requires no labeled answers?
Key takeaways
- Machine learning replaces hand-written rules with patterns learned from examples.
- Training, features, labels, and predictions describe the full workflow.
- Supervised, unsupervised, and reinforcement learning differ in what feedback the system gets.
Next steps
For the intuition behind these definitions, including why models make mistakes, read Machine Learning in Plain English. Keep the machine learning terms cheat sheet handy as a reference.
Related resources
Newsletter or next lesson
Join the newsletter for clear weekly lessons, or continue to Machine Learning in Plain English