Welcome to Machine Learning

machine-learning
supervised-learning
How artificial intelligence, machine learning, and deep learning fit together, why explicit rules run out, and what this first course covers.
Published

Jul 3, 2026

The strange thing about starting a course on machine learning is that you have been using the subject all day without being told. It ran behind the last thing you searched for, the last video that was recommended to you, and the last email that quietly landed in your spam folder instead of your inbox. Not one of those programs was given a rule written specifically for you. Each of them worked out what to do by looking at data. That single idea is what this whole course is about, and this first page is a tour of where the idea came from and where it has ended up.

What Is Machine Learning?

Start with the most familiar example there is, the search box. You type three or four words into Google, Bing, or Baidu, and out of many billions of web pages the one you wanted is usually somewhere near the top. Nobody sat down and wrote a rule saying which page should win for your particular three words. There are too many possible searches for that to ever work. Instead, software learned to rank pages by studying an enormous record of which results people actually found useful, and it keeps learning as new pages appear.

The same thing is happening in a dozen places you would not think to look. When you upload a photo to Instagram or Snapchat and it recognizes your friends and offers to tag them, that is machine learning. Nobody wrote a description of your friend’s face. A program was shown many labeled faces until it could pick out the patterns that distinguish one person from another. When a streaming service finishes a movie and immediately suggests three more you might like, that is machine learning as well, learned from the viewing history of millions of people rather than from a critic’s list of rules.

Voice-to-text on your phone, asking Siri to play a song, and telling Google to show you nearby restaurants all rest on the same foundation. So does the humbler case sitting in your mailbox right now. An email titled “Congratulations! You have won a million dollars” gets flagged as spam, and it gets flagged even though the person who sent it has never used that exact wording before.

Notice what these examples have in common. Every one of them is a task where a human being can easily say whether the answer is right, but no human being can easily write down the recipe for producing it. That gap is exactly where machine learning lives.

Machine Learning in Industry

The consumer examples are the visible ones, but the same techniques have been moving into heavy industry for years, where the effects are larger and much less publicized.

  • Energy. Machine learning is used to predict wind conditions a few hours ahead and adjust turbines accordingly, which raises the amount of usable power a wind farm delivers and makes it a more dependable part of the grid. Squeezing more energy out of hardware that is already built is one of the cheaper contributions to the fight against climate change.
  • Healthcare. It is making its way into hospitals to help doctors read scans more accurately. The goal is not to replace the radiologist. It is to make sure that the faint thing at the edge of an X-ray is not the thing that gets missed at the end of a long shift.
  • Manufacturing. Computer vision systems watch items come off the assembly line and flag the defective ones. A camera does not get tired at hour seven, and it inspects every single unit rather than a sample.

None of these industries were software industries a generation ago. That is the point worth holding on to, and we will come back to it when we talk about where the remaining value is.

Formal Definition

The most widely cited definition of machine learning is attributed to Arthur Samuel (1959). He defined machine learning as:

The field of study that gives computers the ability to learn without being explicitly programmed.

To see what that definition means in practice, it is worth spending a moment on how Samuel earned the right to write it.

Back in the 1950s, working at IBM, he wrote a checkers-playing program. Computers at the time filled a room and were far slower than the phone in your pocket, so the obvious way to make one play checkers was to sit an expert player down and have them dictate their strategy line by line. Samuel could not do that, and here is the remarkable part. Arthur Samuel himself was not a very good checkers player. He did not know the strategy well enough to write it down.

So he did something else. He had the computer play games against itself, tens of thousands of them, and he had it keep track of which board positions tended to lead to wins and which tended to lead to losses. Nobody told the program that controlling the center of the board is valuable. It noticed, because positions of that shape kept showing up in the games it went on to win. Over time it built up its own sense of a good position and a bad one, and by steering toward the good ones it got better and better.

Figure 1: Arthur Samuel’s checkers program improved by learning from thousands of self-play games.

Eventually the program beat its own author. That is the detail people remember, and it is worth being precise about why it happened. Samuel did not become a worse player. The program simply had a kind of patience no person has. It could sit through tens of thousands of games and remember every one of them, and all of that experience went into its judgment. The principle underneath is one you will meet again and again in this course. The more opportunities you give a learning algorithm to learn, the better it will perform.

Review Questions

1. What would likely happen to the checkers program if it had played far fewer games against itself?

It would perform worse. The more data and experience a learning algorithm has, the better it performs. With fewer games, the program would have less information about which board positions lead to wins or losses, and would make poorer decisions.


1. Why is Arthur Samuel’s checkers program a good example of machine learning?

Samuel did not explicitly program the computer with checkers strategies. Instead, he gave it a framework to learn from its own experience (playing games against itself). The computer discovered winning patterns on its own, eventually surpassing its creator’s skill level.

Why Is Machine Learning So Widely Used?

Machine learning grew up as a sub-field of artificial intelligence, and before going any further it is worth sorting out how the three names you keep hearing actually fit together, because they are not three competing things. They are three circles, one inside the next.

Artificial intelligence is the widest of the three and by far the oldest. It covers any attempt to make a machine behave in a way we would call intelligent, and a great deal of it involves no learning at all. A classical chess engine searching millions of positions, or the navigation app in your phone finding the shortest route from A to B, is artificial intelligence in which a person worked out the method in advance and wrote it down as code. The machine is following instructions very quickly. It is not figuring anything out.

Machine learning is the part of artificial intelligence where the machine works out the method itself by looking at data, instead of being handed the method by a programmer. Samuel’s checkers program belongs here. So does the spam filter.

Deep learning is a part of machine learning, not an alternative to it. It is the name for machine learning done with neural networks that stack many layers of computation one after another. Nearly everything that has made the news over the last decade sits in this innermost circle, including speech recognition that finally works, image recognition, and language models such as ChatGPT. You will build networks of this kind yourself in the second course of this specialization.

Artificial Intelligence Any technique that makes a machine behave intelligently chess engines, GPS route finding, rule-based expert systems Machine Learning Learns its rules from data, not from a programmer spam filters, price prediction, recommendations Deep Learning Neural networks with many layers speech recognition, image recognition, language models such as ChatGPT
Figure 2: Deep learning sits inside machine learning, which sits inside artificial intelligence

The nesting is what makes the picture useful, because it tells you which statements are safe. Every deep learning system is a machine learning system, and every machine learning system is a piece of artificial intelligence. The reverse does not hold. Plenty of artificial intelligence involves no learning, and plenty of machine learning uses no neural networks at all. Some of the most widely deployed models in industry are decision trees, which live in the middle ring and which you will meet later in the specialization.

So why did the middle ring grow to swallow so much of the field? Because the outer ring kept running out of road.

The original goal of artificial intelligence was to build intelligent machines by writing down what intelligence does. That works beautifully for a small number of tasks. Finding the shortest path from point A to point B is one of them, which is why your GPS is not a mystery. But for most of the interesting problems, nobody could write the program, because nobody could say what the rules were.

  • Perform web search
  • Recognize human speech
  • Diagnose diseases from X-rays
  • Build a self-driving car

Take the spam filter and try to build it the old way, as a list of rules, and you can watch the approach fall apart in about four steps. You might start with something obvious. If the subject line contains the word “free”, mark the message as spam. That catches some junk, and it also throws away the note from your school about free tickets to a concert, so you add an exception. Then the senders start writing “f r e e” with spaces, and “FR33” with digits, and each dodge costs you another rule. The list grows and never finishes, because there is no finite set of rules that describes what spam is. There is only a moving target.

What people do instead is show a program a few million messages that humans have already sorted into spam and not spam, and let the program find the patterns for itself. When the senders change tactics next month, you do not rewrite anything. You show it the new examples.

That is the pattern behind every item on the list above, and it is why machine learning spread so far so fast. The only way we knew how to accomplish these tasks was to have a machine learn to do them by itself.

Today there are hundreds of thousands, perhaps millions, of people working on machine learning applications across nearly every industry you can think of. It is hard to name an industry that machine learning is unlikely to touch in a significant way now or in the near future.

Review Questions

1. Is every artificial intelligence system a machine learning system?

No. Machine learning is a circle inside artificial intelligence. A classical chess engine or a GPS route finder is artificial intelligence built from rules a programmer wrote down, with no learning involved. The nesting only works in one direction. Every machine learning system is artificial intelligence, but not the other way around.


1. Where does deep learning sit in the picture, and what makes it “deep”?

Deep learning is the innermost circle, a part of machine learning. It refers to machine learning done with neural networks that stack many layers of computation one after another, and deep simply refers to that stacking.


1. Why does a rule-based spam filter eventually fail?

Because there is no finite list of rules that describes spam. Every rule you add gets worked around, so the list grows forever and still misses new tricks. A learned filter is retrained on new labeled examples instead of rewritten.

Artificial General Intelligence

Looking further into the future, many researchers are excited about the dream of someday building machines as intelligent as humans. This is sometimes called Artificial General Intelligence (AGI).

It is worth being careful here, because this is the part of the subject that gets the most breathless coverage. AGI has been overhyped for as long as the term has existed, and we are still a long way from it. Notice what every system on this page actually does. The spam filter sorts email and cannot drive a car. The checkers program plays checkers and knows nothing about checkers strategy in any general sense. Each one is narrow, and being extremely good at one narrow thing is not the same as being generally intelligent. Honest estimates of how long AGI will take range from 50 years to 500 years to never, which is another way of saying that nobody knows.

What most researchers do agree on is the direction. The best route toward anything like general intelligence appears to run through learning algorithms, possibly ones that take some inspiration from how the human brain works, rather than through ever longer lists of hand-written rules. That is a good reason to learn the material in this course even if the far future turns out very differently from anyone’s prediction.

Economic Value of Machine Learning

According to a study by McKinsey, AI and machine learning is estimated to create an additional 13 trillion US dollars of value annually by the year 2030. That number is a forecast rather than a measurement, so treat it as an order of magnitude and not a fact, but the shape of the claim is what matters here.

The interesting part of the forecast is where the value is expected to come from. Machine learning is already creating tremendous amounts of value inside the software industry, in search, advertising, and recommendations, and those are the applications everyone has heard of. The larger share of what is left sits outside software altogether, in retail, travel, transportation, automotive, materials, and manufacturing. Those industries are enormous, they run on data they have been collecting for decades, and most of them have barely started.

Because of these untapped opportunities across so many different sectors, there is a large unfulfilled demand for machine learning skills today, and the demand is not only for researchers. Much of it is for people who understand a particular industry well and also know how to apply these algorithms to it. That is what makes this such a good time to be learning the subject.

Types of Machine Learning

There are two main types of machine learning algorithms:

  1. Supervised learning learns from data that includes the “right answers” (labeled data). It is the type used most in real-world applications and has seen the most rapid advancement and innovation.
  2. Unsupervised learning finds patterns in data without labeled answers.

Beyond these two, other important types include recommender systems and reinforcement learning.

By far, the most used types of learning algorithms today are supervised learning, unsupervised learning, and recommender systems. In this specialization (three courses total), the first and second courses focus on supervised learning. The third course covers unsupervised learning, recommender systems, and reinforcement learning.

Review Questions

1. What are the two main types of machine learning?

Supervised learning and unsupervised learning.


1. Which type of machine learning is used most in real-world applications today?

Supervised learning. It is the most widely used and has seen the most rapid advancements and innovation.

Practical Skills Matter

Learning the algorithms alone is not enough. Having the tools is important, but knowing how to apply them effectively matters just as much. Handing someone a state-of-the-art hammer and drill does not mean they can build a house. They also need to know which wall to put up first.

This sounds like the sort of advice you can safely skip, so here is why it is not. Experienced machine learning teams at large technology companies sometimes spend six months going in the wrong direction, collecting more data when the model was never the problem, or buying a bigger machine when the labels were wrong. These are not beginners making beginner mistakes. They are good engineers without a good process for deciding what to try next. In this course you will learn the algorithms and also the practical skills for developing systems around them, so you are less likely to lose those six months.

Course Roadmap

This is Course 1 of the three-course Machine Learning Specialization, and it teaches the foundations everything else is built on. By the end of it you will have written a working regression model and a working classifier, and you will understand exactly how each one learns from data. The material is organized in three parts.

  1. Introduction to machine learning. This page, then supervised learning and unsupervised learning. What the two main types are, what kind of problem each one solves, and how to tell which kind of problem you are looking at.
  2. Regression, predicting a number. Starting from the linear regression model, you meet the cost function that measures how wrong a model is, and gradient descent, the algorithm that fixes it. From there the model grows to many features, gets fast through vectorization, and gets practical through feature scaling, convergence checking, and feature engineering.
  3. Classification, predicting a category. Why regression is the wrong tool for a yes-or-no question, then logistic regression with its own cost function and gradient descent. The course closes with the first real failure mode you will meet, overfitting, and the standard cure for it, regularization.

Course 2, Advanced Learning Algorithms, picks up from there with neural networks and decision trees. Course 3, Unsupervised Learning, Recommenders, Reinforcement Learning, covers the rest of the map.

Each section of these notes ends with review questions. Use them to check your understanding as you go, and if you do not get them all right the first time, come back and try again.

Review Questions

1. What are the three parts of this course, in order?

First an introduction to machine learning and its two main types, then regression for predicting a number, and finally classification for predicting a category, closing with overfitting and regularization.


1. Which of the following is NOT an example of machine learning mentioned in this lesson?

  1. A search engine ranking web pages
  2. A calculator performing arithmetic
  3. An email service filtering spam
  4. A streaming service recommending movies

b. A calculator performing arithmetic follows explicit programmed rules. Machine learning is about systems that learn from data without being explicitly programmed for every case.


1. In your own words, what does it mean that machine learning allows computers to “learn without being explicitly programmed”?

Instead of a programmer writing specific rules for every possible input (for example, a rule for every type of spam email), the system is given data and a learning algorithm that discovers the patterns by itself. The programmer provides the learning framework, not the specific answers.


1. Why did machine learning become necessary, according to this lesson?

For most interesting tasks (web search, speech recognition, medical diagnosis, self-driving cars), we simply did not know how to write explicit programs to solve them. The only way to accomplish these tasks was to have a machine learn to do them by itself from data.


1. What is Artificial General Intelligence (AGI), and why is it considered a distant goal?

AGI refers to building machines that are as intelligent as humans across all domains. It is considered distant because we are still far from achieving it, with estimates ranging from 50 to 500+ years. Most researchers believe learning algorithms are the best path toward it, but the goal itself remains uncertain and far off.


1. Name two industries outside of software where machine learning could create significant value.

Any two of: retail, travel, transportation, automotive, materials, or manufacturing.

Back to top