• ↑↓ pour naviguer
  • pour ouvrir
  • pour sélectionner
  • ⌘ ⌥ ↵ pour ouvrir dans un panneau
  • ←→ pour naviguer
  • esc pour rejeter
⌘ '
raccourcis clavier

The Problem

We need to predict an output variable (price, category, probability) given input features, but the relationship is too complex to code manually.

Core Idea

Machine learning paradigm where models learn a mapping from input features to output labels using labeled training examples.

How It Works

  1. Collect labeled data: input features X and correct output labels y
  2. Choose model family: decision trees, linear models, neural networks, etc.
  3. Define loss function: measure prediction error (MSE for regression, cross-entropy for classification, impurity for trees)
  4. Optimize: adjust model parameters to minimize loss on training data
  5. Validate: assess generalization to unseen data

Decision trees use a different approach: instead of optimizing parameters, they recursively partition the data using attribute tests (Information Gain or Gini Index) until pure subsets are reached. This makes them interpretable but prone to overfitting without pruning.

Visual Explanation

G Features (X) Features (X) Model Model Features (X)->Model Predictions (ŷ) Predictions (ŷ) Model->Predictions (ŷ) Loss Function Loss Function Predictions (ŷ)->Loss Function Labels (y) Labels (y) Labels (y)->Loss Function Optimize Optimize Loss Function->Optimize

Key Properties

  • Labeled data required: need ground truth for every training example
  • Generalization goal: minimize error on unseen data, not just training data
  • Bias-variance tradeoff: simpler models have high bias, complex models have high variance
  • Inductive: learns specific-to-general mapping from examples

Connections

Edge Cases & Gotchas

  • Label noise: incorrect labels mislead the model
  • Class imbalance: rare classes get ignored by models optimizing overall accuracy
  • Concept drift: relationship between X and y changes over time
  • Covariate shift: training and test data have different feature distributions