Eduspheria Wiki
Intro7 min read

What learning actually is

A program is rules you write by hand. A model is rules the machine extracts from examples. Start there.

Before "machine learning" there was just software: a human thinks about the problem, writes down rules, and the computer executes them. That works — until the rules depend on judgment you can't write down.

Try pricing a used car by hand. You know the year, mileage, make, and there's some sense of how each matters — but nobody can write the exact formula from intuition. Machine learning inverts the whole approach: show the computer many solved examples, and let the formula be discovered.

The core inversion

Classical programming: rules in, data in, answers out. Machine learning: data and answers in, rules out. The model is the output, not the program.

Learning = fitting a line (and everything else)

The simplest learned model is a straight line through noisy data. Below, scoring is squared error — for every point, how far off was the line's prediction, squared, then summed. Drag the sliders and try to minimize it. That's it. That's machine learning reduced to its skeleton: a family of functions to choose from, a score for how wrong each choice is, and a search for the best choice.

Fit y = w·x + b — minimize the squared error

squared error: 46.0

Try to reach the minimum: the smallest error a straight line can score on this data is ≈ 1.2 — find the sliders that hit it. (That line is what least squares computes in closed form; the orange stubs are per-point errors, and squaring them is one possible scoring choice — not the only one. That choice is the next lesson.)

Play with it for a minute. Notice three things:

  1. The score jumps as you move the sliders — it's a landscape over slider positions. You're texture-reading it by hand.
  2. When you get close to the minimum, small slider moves barely change the score; far away, every move hurts. Smoothness means later (in gradient-descent) a simple direction-to-follow rule works.
  3. There is one best line given these points. Different data → different learned model. That's why data quality decides model quality before anything else does.

What the sliders stand for

Every learnable system — a used-car price predictor, a spam filter, GPT — is the same shape: numbers inside the model (1 and 2 here, billions in GPT) that someone or something must set. Training is the process of setting them automatically. Nobody hand-moved GPT's sliders; that's what the training chapter of the LLM book is for.

The vocabulary you'll need all book

  • Model — the family of functions (here: y = w·x + b).
  • Parameters — the adjustable numbers inside it (w, b).
  • Training data — the solved examples.
  • Loss — one number scoring wrongness across all examples.
  • Fitting / training / learning — searching parameters until loss is small. Three words, one activity.

What it isn't

It isn't magic, and it isn't truth. The model learns exactly what your data contained, judged exactly by your scoring function — nothing stronger. Change the scoring (squared vs. absolute error, for instance) and the "best" model changes with it. That sensitivity is not a bug to fix so much as a dial to make deliberate, which is the next lesson's job.

Illustrative vs real

The artifact uses 10 hand-made points and two parameters. Real regression searches over a continuous parameter space with gradient methods rather than sliders — the math is up next.

Where next: loss-functions catalogs the scoring functions; gradient-descent replaces your hands with a numerical procedure.