AI and Machine Learning for Beginners › Module 1: Getting Started › Lesson 1.1

What AI and Machine Learning Really Are

Free previewLesson 1.1 · about 25 minutes · 4 exercises

0 of 4 exercises completed
Every exercise is checked for you, with a hint if you are stuck

Get the full course

10 modules of hands-on machine learning — an AI workbench to train real models and checked exercises in every lesson, in your browser, nothing to install. Lessons 1.1 and 1.2 are free; the rest of the course is Rs. 300 + 18% GST.

Enroll Now — Rs. 354.00

By the end of this lesson you will be able to

  • explain in plain words what artificial intelligence (AI) and machine learning are
  • describe the difference between a program that follows rules and a program that learns from examples
  • name the three main kinds of machine learning and give an everyday example of each
  • say what today's AI systems are good at, and where they go wrong
  • find your way around the course: the workshop, the people and the AI workbench
Welcome to the workshop

You are Eleanor Price, a technician at the Ashdown Robotics Workshop, which looks after Bramble, a humanoid robot that works as a guide in a small museum. Alice Bennett, the museum's curator, has a new wish. “Visitors ask Bramble hundreds of questions a day,” she says. “Where is the café? How much is a ticket? I cannot write an answer for every way of asking. Can Bramble learn?” Henry Wren, your mentor, smiles. “That,” he says, “is machine learning. Let us start at the beginning.”

This course does not assume that you have taken any of the workshop's other courses, that you have written a program before, or that you remember much mathematics from school. Everything you need is explained as you go, with small examples you can run and change.

Meet the people

PersonRole
Henry WrenSenior technician at the workshop, and your mentor.
Margaret EllisThe workshop manager. She decides what may be used with real visitors.
Alice BennettThe curator of the museum where Bramble works. She asks for new things for Bramble to do.
Oliver GrantBramble's daily operator at the museum. He sees what visitors actually do and say.
Thomas HaleThe previous technician, who has left, but whose old notes and records you will sometimes read.

Bramble, the workshop, the museum and the people are invented for this course, and so is every dataset you will use. No real company, product or person is described.

What is artificial intelligence?

Artificial intelligence, usually shortened to AI, is the name for computer systems that do tasks we would normally say need some intelligence: recognising a face in a photograph, understanding a spoken question, translating a sentence, choosing a good move in a game, or noticing that a machine is about to break down.

The name is a little misleading. An AI system does not think or understand in the way a person does. It is a program, written by people, that turns inputs (a photograph, a sentence, some measurements) into outputs (a name, an answer, a warning). What makes it seem intelligent is that it does this well for inputs it has never seen before.

Two ways to make a computer do something

Suppose Bramble must sort fruit for the museum café into apples, pears and lemons. There are two very different ways to program it.

Way 1: write the rules yourself. A person studies fruit and writes rules such as “if it weighs less than 125 grams, it is a lemon; otherwise, if it is wider than 7 centimetres, it is an apple; otherwise it is a pear.” This is ordinary programming. It works well when the rules are clear and few.

Way 2: let the computer learn from examples. A person collects many fruits that have already been sorted, measures each one, and gives the list to a learning program. The learning program finds its own rule that fits the examples, and then uses that rule on new fruit. This is machine learning.

Writing rules a person studiessome fruit and writes a rule:“under 125 g = lemon” the rule sortseach new fruit Machine learning many fruits,already sorted a learning programfinds its own rule the model sortseach new fruit The difference is in the middle box: who makes the rule.
Two ways to sort fruit. In the top lane a person writes the rule. In the bottom lane the computer finds a rule for itself from sorted examples, and that learned rule is called a model.

The rule that the computer learns is called a model. Using examples to build it is called training, and the examples are the training data. Once it has been trained, the model can make a prediction for something new: this fruit is probably a pear.

Machine learning is the part of AI that almost all of today's AI systems rely on, from the spam filter in an email account to the chatbots that write whole paragraphs. It is what this course is about.

See it happen

The box below is the AI workbench you will use throughout the course. It holds a short program. You do not need to understand the program yet: just press Run. It loads 60 fruits from the café's delivery records, learns from 45 of them, and then tests itself on the other 15, which it has never seen.

The program learned from examples and then sorted 14 of the 15 new fruits correctly, without anyone writing a rule about grams or centimetres. The chart shows why this is possible: each kind of fruit forms its own cloud of points, so a new fruit can be sorted by which cloud it lands in. One fruit is sorted wrongly; Lesson 3.4 shows why, and how to fix it. Mistakes like this are normal in machine learning, and much of the course is about measuring and reducing them.

Three kinds of machine learning

What AI is good at, and where it goes wrong

Machine learning is very good at spotting patterns in large amounts of data, often patterns too subtle or too many for a person to write down as rules. It is the reason a phone can recognise speech, and the reason a factory can be warned that a motor is wearing out.

It also has real limits, and a good practitioner keeps them in mind all the time:

How this course works

Most lessons have short programs for you to run and change, and exercises that are checked automatically. The programs are written in JavaScript, the programming language built into every web browser, so there is nothing to install. Module 2 teaches all the JavaScript this course uses.

Everything runs inside this page, on your own device. The models you build are small teaching models: they learn in a second or two from a few dozen or a few hundred examples. The ideas are exactly the ones used in large AI systems; the large systems simply use far more data and far more computing power.

About the mathematics

Machine learning is built on mathematics, but you only need what you met at school: adding, multiplying, averages and percentages. Where a formula helps, it is explained in words and with a worked example, and the workbench does the heavy arithmetic for you.

What you will learn

Exercises

This lesson's exercises are questions about the ideas. Choose your answer and press Check my answer.

Exercise 1 · Rules or learning?

Which of these tasks is machine learning, rather than ordinary programming with rules written by a person?

Exercise 2 · The words of machine learning

The café's fruit sorter learned from 45 fruits that were already marked apple, pear or lemon. What are the marks “apple”, “pear” and “lemon” on those examples called?

Exercise 3 · Which kind of learning?

The museum has records of how long each visitor spent in each room, but nobody has sorted the visitors into types. Alice asks Bramble to find groups of visitors who behave alike. Which kind of machine learning is this?

Exercise 4 · Knowing the limits

Choose every statement that is true.

0 of 4 exercises completed

Quick check

Four questions to confirm the main ideas. Choose an answer to see the explanation.

In machine learning, what is a model?

Why did the fruit program test itself on 15 fruits it had not learned from?

Which of these is the best everyday example of supervised learning?

Margaret will not let Bramble answer real visitors until someone can explain how it was trained and tested. Why is that a sensible rule?

Summary

  • AI means computer systems that do tasks we usually think need intelligence. Almost all of today's AI is built with machine learning.
  • In ordinary programming a person writes the rules; in machine learning the computer works out a rule, the model, from examples.
  • Training uses training data; the known answers on the examples are labels; the model's answers for new cases are predictions.
  • Supervised learning uses labelled examples, unsupervised learning finds patterns without labels, and reinforcement learning learns by trial and reward.
  • Models only know their examples, learn the faults in their data, can be confidently wrong, and must always be tested by a responsible person.

Found a mistake on this page, or something unclear? Report a problem and mention “AI Lesson 1.1”.