Level 1 · FoundationsStage 03

Lesson 9 of 38 · Written learning

How machine learning learns from examples

Distinguish learning setups and design data splits that make evaluation more honest.

6 min read Free course lessonWeeks 6–8

In supervised learning, examples come with target labels. In unsupervised learning, the system looks for structure without those labels. Self-supervised learning creates training targets from the data itself; predicting the next token in a text sequence is one example. Each setup provides a different learning signal, not a guarantee that the result is useful.

Separate fitting from checking

Training data updates the model. Validation data helps compare choices such as model size or learning rate. A test set is held back for a final, less biased estimate. If near-duplicate documents or future information leak across these splits, performance can look impressive without representing real use.

  • Features are inputs; labels are targets when labels exist.
  • Underfitting means the model has not captured useful structure; overfitting means it fits training details that do not generalize.
  • Regularization and careful data collection can reduce overfitting, but neither substitutes for a good test design.
  • Data leakage can occur through duplicated records, preprocessing, timestamps, or benchmark answers embedded in training material.

Return to the Machine learning and deep learning stage · Suggested timing is flexible; move at your own pace.