What Is Machine Learning? How Computers Learn From Data
- 10 views
- 0 likes
- 0 comments
- All languages combined

Sign in and earn +31 points by reading this
Read to the end, wait a few seconds, then tap the claim button below.
In short
Machine learning is a branch of artificial intelligence in which software, called a model, learns patterns from examples instead of following rules a programmer writes by hand, and then uses those patterns to make predictions or generate content [1][7]. It learns by making guesses on training data, measuring how wrong they are and adjusting itself, over and over [2].
Key takeaways
- Machine learning (ML) means training a model on data so it can make useful predictions or generate content, rather than programming every rule by hand [1][5].
- Training works by comparing the model's guesses with known answers and adjusting the model to reduce the difference, called the loss [2].
- The main types are supervised learning (labelled examples), unsupervised learning (finding groups in unlabelled data), reinforcement learning (rewards and penalties) and generative AI [1].
- Neural networks are a family of models built from layers of connected nodes; deep learning uses networks with many layers [3][5].
- Machine learning is one way of doing AI, and most recent advances in AI have come from it [5].
- Models are only as good as their data: unrepresentative data, overfitting and biased examples lead to wrong or unfair results [2][4][5].
- The idea is not new: Arthur Samuel's 1959 checkers program learned to play better than the person who wrote it [6].
On this page 13 sections
- What is machine learning in simple words?
- How does machine learning work?
- What are the main types of machine learning?
- What is a neural network?
- What is machine learning in the context of AI?
- Where is machine learning used in everyday life?
- Why do machine learning models make mistakes?
- How is machine learning used in data science?
- Where did machine learning come from?
- Common mistakes
- Frequently asked questions
- Glossary
- Sources
What is machine learning in simple words?
Machine learning is a way of building software that learns from examples: instead of writing every rule, people show a model lots of data and it works out the patterns itself, then uses them to predict or create [1][5].
Google's introductory course puts it in basic terms: ML is the process of training a piece of software, called a model, to make useful predictions or generate content such as text, images, audio or video from data [1]. The US National Institute of Standards and Technology (NIST) defines it as the development and use of computer systems that adapt and learn from data with the goal of improving accuracy [7].
The difference from ordinary programming is easiest to see with an example. To predict rainfall the traditional way, you would build a physical model of the atmosphere and solve huge numbers of fluid-dynamics equations, which is extremely difficult. With machine learning, you give a model enormous amounts of past weather data until it learns the mathematical relationship between weather patterns and rainfall, then feed it today's conditions and it predicts the rain [1].
MIT Sloan compares traditional programming to baking from a recipe with exact amounts and times: the computer follows detailed instructions. Some tasks, such as recognising different people in photos, are easy for humans but almost impossible to write as instructions. Machine learning lets the computer learn such tasks from experience instead [5].
In short: ordinary software is rules in, answers out; machine learning is examples in, rules out, and those learned rules are then used to answer new questions.
How does machine learning work?
A model starts with poor guesses, compares them with the right answers in its training data, measures the error and adjusts itself, repeating this until its predictions are good on data it has not seen [2].
Google's course breaks supervised machine learning into five ideas [2]:
- Data. Datasets are made of examples, like rows in a spreadsheet. Each example has features, the values used to predict, and a label, the answer. In a rainfall model the features might be temperature, humidity, wind direction and air pressure; the label is the amount of rain [2].
- Model. The model is a complex collection of numbers that defines the mathematical relationship between input features and output labels; it discovers these patterns through training [2].
- Training. The model makes a prediction, compares it with the real label and updates its numbers based on the difference, called the loss. It repeats this for every example, sometimes many times over, until it makes the best predictions on average [2].
- Evaluating. The trained model is tested on labelled data it was not trained on: it sees only the features, and its predictions are compared with the true labels [2]. MIT Sloan describes the same practice of holding back some data to check accuracy on new data [5].
- Inference. Once the results are good enough, the model is used to make predictions on new, unlabelled examples, such as tomorrow's weather [2].
Data quality matters as much as the method. Good datasets are both large and diverse: a hundred years of rainfall data for July alone would still predict January badly [2]. More features can help, but not always, because some features have no real connection to the label [2].
What are the main types of machine learning?
The main types are supervised learning, unsupervised learning, reinforcement learning and generative AI; they differ in what kind of data and feedback the model learns from [1].
- Supervised learning learns from examples that include the correct answer, like a student studying old exams with the answers. Its two most common uses are regression, predicting a number such as a house price or travel time, and classification, predicting a category such as whether an email is spam or a photo contains a cat [1]. MIT Sloan calls it the most common type used today [5].
- Unsupervised learning looks for meaningful patterns in data without answers. A common technique is clustering, which groups similar examples; for instance, clustering weather data by temperature can reveal groups that look like seasons, which a person then names [1]. Businesses use it to find types of customers in sales data [5].
- Reinforcement learning learns by trial and error from rewards and penalties for actions in an environment, building a strategy, called a policy, that earns the most reward. It is used to train robots to perform tasks and programs to play games [1][5].
- Generative AI is a class of models that create new content, such as text, images, music or code, from a user's input. These models learn patterns in existing data in order to produce new but similar data; they are usually first trained to mimic their training data and may then be trained further with supervised or reinforcement learning [1].
Real systems often combine several types. Google notes that ML systems can fall into one or more of these categories [1].
What is a neural network?
A neural network is a type of machine learning model made of layers of connected nodes that pass numbers to one another; it can learn complicated, non-linear patterns on its own, and networks with many layers are called deep learning [3][5].
The name comes from a loose analogy with the brain: an artificial neural network has many processing nodes connected and organised into layers [5]. Each node takes inputs, processes them and sends an output to nodes in the next layer [5]. The connections have weights, numbers that set how much each input counts, and training adjusts those weights [5].
A network has three kinds of layers:
- an input layer that receives the features, such as pixel values of an image;
- one or more hidden layers in between, where nodes combine inputs and apply an activation function that lets the network represent curved, non-linear relationships [3];
- an output layer that gives the prediction, for example whether a picture contains a cat [5].
Why bother? Simpler models draw straight-line boundaries, and an engineer has to invent clever combinations of features to handle curved patterns. Google explains that neural networks are designed to find such non-linear patterns in data and, during training, learn the useful feature combinations automatically to reduce the loss [3]. They are trained with an algorithm called backpropagation, which works out how much each weight contributed to the error and adjusts it [3].
Deep learning simply means neural networks with many layers. In an image recognition system, early layers may pick out simple features and later layers combine them into whole objects [5]. Deep learning powers uses such as chatbots and self-driving systems, but it needs a great deal of computing power, which raises economic and environmental concerns [5].
What is machine learning in the context of AI?
Artificial intelligence is the broad goal of machines doing tasks that seem to need intelligence; machine learning is the main method used to reach it today, and deep learning and generative AI are parts of machine learning [5][1].
MIT Sloan describes machine learning as a subfield of AI, which is broadly defined as the capability of a machine to imitate intelligent human behaviour [5]. NIST uses the same framing: a branch of AI in which systems learn from data [7]. AI also includes approaches that do not learn from data, such as hand-written expert rules.
The terms are often used as if they were the same, and there is a reason. MIT professor Thomas Malone has said that machine learning has become arguably the most important way most parts of AI are done, and that most current advances in AI have involved it [5].
Think of nested circles:
- AI: any technique that lets a computer perform tasks associated with intelligence.
- Machine learning: AI that learns its behaviour from data [7].
- Deep learning: machine learning with many-layered neural networks [5].
- Generative AI: models that create new content; most modern ones are deep learning models [1].
Chatbots are a familiar example of all these layers working together; our guide "What Is ChatGPT? How It Actually Works" explains how one is built and trained. Whether today's systems will lead to human-level general intelligence is a separate and much-debated question, covered in "What Is AGI? Definitions and Why Timelines Differ".
Where is machine learning used in everyday life?
Machine learning is behind translation apps, spam filters, recommendations, predictive text, fraud alerts, photo search, weather and travel-time estimates, and much more [1][5].
Google's course lists predicting the weather, estimating travel times, recommending songs, auto-completing sentences, summarising articles and generating new images among the things ML can do [1]. MIT Sloan adds several common uses [5]:
- Recommendations: the suggestions for what to watch, read or buy, and the order of posts in social media feeds, come from models that try to learn your preferences.
- Image analysis: identifying objects in photos and examining medical images for signs of disease.
- Fraud detection: spotting card transactions, log-in attempts or spam emails that do not fit someone's usual pattern.
- Chatbots and helplines: systems that learn from records of past conversations to respond to customers.
- Self-driving technology: much of it is based on machine learning, especially deep learning.
Machine learning works best where there is a lot of data, often thousands or millions of examples such as customer conversations, sensor logs or transactions [5]. It can also do things at a scale and speed people never could, such as showing possible answers every time someone types a search query [5].
Why do machine learning models make mistakes?
Models learn whatever patterns are in their data, including wrong, outdated or biased ones; they can also memorise their training examples instead of learning general rules, which is called overfitting [4][5].
- Overfitting. An overfit model matches its training set so closely that it fails on new data, like an invention that works in the lab but not in the real world. Google calls it a common problem, not a hypothetical one, caused by training data that does not represent real life, a model that is too complex, or both [4].
- Data that does not match reality. A model generalises well only if its training data resembles the data it will meet later and that data does not change much over time [4]. Tastes, prices and behaviour shift, so a model trained on the past can fail on the future [4].
- Shortcuts. MIT Sloan describes an X-ray model that seemed to beat doctors but had actually learned to recognise the older machines used in places where tuberculosis was more common, not the disease itself [5].
- Bias. If the training data reflects existing inequities, the model learns and repeats them [5].
- Explainability. It can be hard to know why a model made a decision; experts warn against treating a model as an oracle and recommend checking the rules of thumb it seems to use [5].
For these reasons NIST's AI Risk Management Framework, released in January 2023, describes trustworthy AI as valid and reliable, safe, secure and resilient, accountable and transparent, explainable and interpretable, privacy-enhanced, and fair with harmful bias managed [8]. A useful habit for everyone: treat a model's output as a prediction to check, not a fact.
How is machine learning used in data science?
In data science, machine learning is one of the main tools for turning data into predictions and categories; data scientists and machine learning engineers collect and clean data, build and test models and keep them up to date [9].
The US Bureau of Labor Statistics (BLS) describes data scientists as people who use analytical tools and techniques to extract meaningful insights from data. Their typical duties include deciding which data are useful, collecting and analysing data, creating, validating, testing and updating algorithms and models, and presenting findings [9]. BLS notes that they develop algorithms and models to support machine learning programs, use machine learning to classify data or make predictions, and test models for accuracy, including when new data arrive [9].
Much of the work happens before any learning starts. Raw data is often messy and has to be cleaned and structured before software can analyse it [9]. MIT Sloan likewise stresses that machine learning starts with data that is gathered and prepared as training data [5].
What is a machine learning engineer? Job titles vary between employers, but the role usually focuses on the engineering side of the same pipeline: preparing data, training and evaluating models, and putting them into real products where they must keep working as data changes. BLS's profile of data scientists, which covers closely related work, notes that a bachelor's degree in mathematics, statistics, computer science or a related field is the typical entry point, with some employers preferring a master's or doctorate [9].
For learners, the free introductory courses from universities and technology companies cover the same core ideas as this guide: data, models, training, evaluation and overfitting [1][2][4].
Where did machine learning come from?
The term goes back at least to the 1950s: in 1959 IBM researcher Arthur Samuel published a study of a checkers program that learned to play better than he could [6].
Samuel's paper, "Some Studies in Machine Learning Using the Game of Checkers", appeared in the IBM Journal of Research and Development in 1959 [6]. It investigated two machine-learning procedures and reported that a computer could be programmed to learn to play a better game of checkers than the person who wrote the program, in only 8 or 10 hours of machine-playing time [6]. The program was given just the rules, a sense of direction and an incomplete list of parameters whose correct weights were unknown, and worked out the weights by itself [6]. Samuel wrote that the principles were applicable to many other situations [6].
A popular definition of machine learning, "the field of study that gives computers the ability to learn without explicitly being programmed", is widely attributed to Samuel [5]. Whatever its exact origin, it captures the idea well.
What has changed since then is scale. The core loop of guessing, measuring error and adjusting is the same one used in modern courses [2], but today's models train on vastly more data, and deep learning in particular needs a great deal of computing power [5]. The basic questions remain those Samuel faced: what to learn from, how to measure success, and whether the lessons carry over to new situations.
| Aspect | Traditional programming | Machine learning |
|---|---|---|
| What people provide | Step-by-step rules | Examples (data), often with answers |
| What the computer produces | Answers from the rules | A model that predicts or generates |
| Rainfall example | Physics equations of the atmosphere | Patterns learned from past weather data |
| Good fit for | Clear, fixed procedures | Patterns too complex to write as rules |
| Main risk | Bugs in the rules | Poor or biased data, overfitting |
| Type | Learns from | Typical task | Example |
|---|---|---|---|
| Supervised | Labelled examples with correct answers | Regression or classification | Spam filter; house-price estimate |
| Unsupervised | Unlabelled data | Clustering | Grouping customers or weather patterns |
| Reinforcement | Rewards and penalties for actions | Learning a strategy (policy) | Robots; game-playing programs |
| Generative AI | Large amounts of existing content | Creating new content | Text, images, music or code from a prompt |
| Term | What it means | Relationship |
|---|---|---|
| Artificial intelligence | Machines imitating intelligent behaviour | The broad field |
| Machine learning | Systems that learn from data | A branch of AI |
| Neural network | Layers of connected nodes with learned weights | A family of ML models |
| Deep learning | Neural networks with many layers | A part of machine learning |
| Generative AI | Models that create new content | Built mostly on deep learning |
Common mistakes
Thinking machine learning and AI are exactly the same.
Fix: ML is a branch of AI, though most current AI advances come from it [5][7].
Assuming more data always means a better model.
Fix: Data must also be diverse and representative of real use [2][4].
Judging a model by its score on its own training data.
Fix: Evaluate on data it has not seen; good training scores can hide overfitting [2][4].
Believing models understand like people.
Fix: They learn statistical patterns, which can include shortcuts unrelated to the real task [5].
Treating model output as neutral.
Fix: Models can repeat biases in their training data [5][8].
Thinking a model, once trained, stays accurate forever.
Fix: When the world changes, models need testing and updating with new data [4][9].
Frequently asked questions
What is machine learning in the context of AI?
It is the branch of AI in which systems learn from data rather than hand-written rules, and it drives most current AI progress [5][7].
What is machine learning in AI, in one sentence?
Training software, called a model, on data so it can make predictions or generate content [1].
What is a machine learning engineer?
Someone who prepares data, trains and tests models and puts them into products; BLS describes closely related work under data scientists [9].
What is machine learning in data science?
A core tool for classifying data and making predictions; data scientists build, test and update models as part of their work [9].
What is machine learning in simple words?
Learning from examples: show a computer lots of data and it works out the patterns to predict or create new things [1][5].
What is the difference between machine learning and deep learning?
Deep learning is machine learning that uses neural networks with many layers [5].
Do you need to know maths to understand machine learning?
Not to understand the ideas; building models professionally usually involves maths, statistics or computer science study [9].
Who invented machine learning?
No single inventor, but Arthur Samuel's 1959 checkers paper is an early, influential use of the term [6].
Glossary
- Model
- The collection of numbers that maps input features to predictions, learned from data [2].
- Feature
- An input value used to make a prediction, such as temperature [2].
- Label
- The correct answer in a training example, such as the amount of rain [2].
- Loss
- How far a model's prediction is from the true value; training tries to reduce it [2].
- Inference
- Using a trained model to make predictions on new data [2].
- Overfitting
- Memorising the training data so closely that predictions on new data are poor [4].
- Neural network
- A model of connected nodes in layers that learns non-linear patterns [3].
- Backpropagation
- The algorithm used to train neural networks by adjusting weights to reduce loss [3].
Sources
- What is Machine Learning? (Introduction to Machine Learning) Google for Developers · 2026-01-27
- Supervised Learning (Introduction to Machine Learning) Google for Developers · 2025-08-25
- Neural networks (Machine Learning Crash Course) Google for Developers · 2025-08-25
- Overfitting (Machine Learning Crash Course) Google for Developers · 2025-12-03
- Machine learning, explained MIT Sloan School of Management · 2021-04-21
- Some Studies in Machine Learning Using the Game of Checkers (A. L. Samuel, IBM Journal of Research and Development 3(3):210) IBM Journal of Research and Development
- Machine Learning - Glossary NIST Computer Security Resource Center
- AI Risk Management Framework (AI RMF 1.0, NIST AI 100-1) US National Institute of Standards and Technology (NIST) · 2023-01-26
- Data Scientists (Occupational Outlook Handbook) US Bureau of Labor Statistics
Comments
Top comments