Tutelage

Lessons › coding and computer science · taught by Leo

How AI learns from data: machine learning basics

Learn how AI uses data, labels, and feedback to find patterns, improve predictions, and generalize to new examples.

Learn this with Leo, freeA voiced lesson with a live whiteboard, quizzes and a tutor you can call, at tutelage.app

AI is pattern learning

AI is a tool that learns patterns from data. It does not magically know; it looks for regularities and makes predictions.

Think of it like a super-fast pattern finder.

The important question is: what data goes in, and what decision comes out?

Machine learning in one sentence

ML = examples in, learned rules out.

Machine learning means we give a computer examples, and it tunes itself to do a task better.

Instead of writing every rule by hand, we let the model learn rules from examples.

That is why data quality matters so much.

Predict: what must AI see first?

Before a model can learn to spot cats, what does it need most?

  1. Lots of labeled examples
  2. A perfect guess
  3. A faster keyboard
Show answer

Lots of labeled examples: Yes. Learning starts with examples, usually many of them.

Training changes model settings

Here is the training loop. The model guesses, checks itself, and then adjusts.

Each adjustment is tiny. Many tiny updates can make a big improvement.

That is how the system slowly gets better at the task.

Quick check: what happens next?

A model makes a wrong prediction. What should happen next in training?

  1. Adjust the model a little
  2. Throw away all data
  3. Stop forever
Show answer

Adjust the model a little: Correct. Training uses the error to make a small correction.

Why errors guide learning

This works because error is information. It tells the model which direction to move.

If the guess is too high, the settings move down. If it is too low, they move up.

That feedback loop is the heart of learning.

Data is split for fairness

We usually split data into parts. One part teaches, one part checks tuning, and one part gives the final score.

This helps us know whether the model truly learned, or just memorized examples.

That idea is called generalization.

Generalization is the goal

Learn patterns that transfer to new cases.

A good model does not just memorize. It works on new examples it has never seen before.

That is the whole point of machine learning: useful predictions on fresh data.

Your turn: memorizing or learning?

If a model gets perfect on homework examples but fails on new ones, what went wrong?

  1. It memorized instead of generalizing
  2. It learned too well
  3. It needs no data
Show answer

It memorized instead of generalizing: Exactly. It fit the training examples but did not generalize.

What AI is really doing

So the simple story is: data goes in, patterns get learned, predictions come out.

Then feedback updates the model again and again.

If you remember that loop, you understand the core of AI and machine learning.

Learn this with Leo, freeA voiced lesson with a live whiteboard, quizzes and a tutor you can call, at tutelage.app