AI From Zero · AI Fundamentals

What Is Machine Learning?

Learn what machine learning is, how it differs from traditional programming, and how computers can learn patterns from data.

Estimated learning time: 10 minutes

What You'll Learn

By the end of this lesson, you will be able to:
- Explain machine learning in simple terms.
- Understand the relationship between data, patterns, and predictions.
- Explain the difference between traditional programming and machine learning.
- Identify everyday examples of machine learning.
- Understand why machine learning is an important part of modern AI.

What Is Machine Learning?

Machine learning is a way of creating computer systems that can learn useful patterns from data instead of being explicitly programmed with every rule they need to follow.

The basic idea is surprisingly simple: give a computer examples, let it find patterns in those examples, and then use what it has learned to make predictions or decisions.

Traditional Programming vs Machine Learning

In traditional programming, a programmer writes the rules. The computer follows those rules to produce an output.

For example, imagine creating a program that decides whether a number is even or odd. A programmer can explicitly write the rule: if a number can be divided by two with no remainder, it is even.

Machine learning approaches a problem differently. Instead of writing every rule manually, we can provide the system with many examples and allow it to discover useful patterns.

For example, suppose we want a computer to recognize whether an email is spam. Spam emails can look very different from one another, so writing a perfect list of rules would be difficult. Instead, we can provide many examples of emails that humans have already identified as spam or not spam. A machine learning system can study those examples and learn patterns that help it classify new emails.

Learning From Data

Data is central to machine learning. The data might consist of numbers, text, images, audio, video, or other information.

During training, a machine learning system examines examples in the data and adjusts its internal parameters so that it becomes better at the task it is being trained to perform.

The system is not learning in the same way a human learns. It is finding mathematical patterns and relationships within data.

A Simple Example

Imagine that you want a system to estimate the price of a house. You could give it information about many houses, such as:

  • Size of the house
  • Number of bedrooms
  • Location
  • Age of the property
  • Previous selling price

Along with those examples, the system receives the actual prices of the houses.

By studying these examples, the machine learning model can learn relationships between the features of a house and its price. When it later receives information about a new house, it can use those learned patterns to estimate a price.

Training and Prediction

Two important ideas in machine learning are training and prediction.

During training, the model learns from examples. After training, the model can be given new data that it has not seen before and produce a prediction or classification.

For example:

Training: Show the system thousands of examples of emails labelled as spam or not spam.

Prediction: Give the trained system a new email and ask whether it is likely to be spam.

Where Do We See Machine Learning?

Machine learning is already part of many systems that people use every day.

  • Email spam filtering
  • Recommendation systems
  • Voice recognition
  • Image recognition
  • Fraud detection
  • Search ranking
  • Personalized advertising
  • Navigation and traffic prediction

Many of these systems do not look like "AI" to the user. They simply appear to be useful software features. Behind the scenes, machine learning may be helping the system make predictions or decisions.

Is Machine Learning the Same as AI?

Machine learning and artificial intelligence are related, but they are not exactly the same thing.

Artificial intelligence is the broader field of creating systems that can perform tasks associated with aspects of human intelligence.

Machine learning is one important approach used to build AI systems.

A useful way to remember the relationship is:

AI is the broader field. Machine learning is one of the major methods used to create AI systems.

Why Machine Learning Matters

Traditional software works extremely well when we can clearly describe the rules of a problem. But many real-world problems are too complicated to describe with a simple list of rules.

Recognizing faces, understanding speech, detecting unusual transactions, recommending products, and interpreting natural language are examples of problems where manually writing every possible rule would be extremely difficult.

Machine learning provides another approach: instead of trying to write every rule ourselves, we can use data and algorithms to learn useful patterns.

What Machine Learning Does Not Mean

Machine learning does not mean that a computer suddenly becomes human-like or understands the world in the same way people do.

A machine learning model is trained for particular tasks and depends heavily on the quality and characteristics of the data used to train it.

If the training data is incomplete, inaccurate, or biased, the resulting system can also produce poor or biased results.

The Big Picture

Machine learning is one of the foundations of modern AI. It allows computers to learn patterns from examples and use those patterns to make predictions, classifications, or other decisions.

As we continue through this course, we will explore how machine learning works in greater detail, including different types of learning, models, training data, and how modern AI systems are built.

Key Takeaways

Machine learning allows computers to learn useful patterns from data rather than relying entirely on rules written manually. Traditional programming gives the computer explicit rules, while machine learning learns patterns from examples. Training is the process of learning from examples. A trained model can use what it learned to make predictions or classifications on new data. Machine learning is an important approach within the broader field of artificial intelligence. The quality of training data strongly affects the quality of a machine learning system.

Try It Yourself

Think of one everyday application you use that probably relies on machine learning. Write down what data you think the system might use and what prediction or decision the system is making.

Test Your Knowledge

You've reached the end of this lesson.

Test what you've learned with the What Is Machine Learning? — Quiz.

Take the Quiz
← AI vs Traditional Software
What Is Deep Learning? →
Back to Course