What is the difference between lazy learning and eager learning?

Quick Overview

A machine learning interview question comparing lazy learners such as KNN with eager learners such as linear models, trees and neural nets. It tests understanding of when each does its computation, the costs of training, prediction and memory, and how indexes help lazy learners scale.

What is the difference between lazy learning and eager learning?

Role: Machine Learning Engineer

Category: Machine Learning

Difficulty: easy

Interview Round: Other

What is the difference between lazy learning and eager learning? ```hint Where the work happens Compare when each kind of learner does its computation, at training time or at query time, and what it has to keep around afterwards. ``` ### What a Strong Answer Covers - When each approach does its computation, and what it keeps after training - Training cost, prediction cost and memory for each, with example algorithms in each group - Global versus local approximation of the target function - Practical consequences: adding new data, prediction latency, and the indexes that let lazy learners scale ### Follow-up Questions - How do KD-trees or approximate nearest neighbor indexes change the prediction cost of KNN, and where do they stop helping? - Is a kernel SVM lazy or eager, given that it keeps its support vectors? - When would you choose a lazy learner in production despite its query cost?

Overview: A machine learning interview question comparing lazy learners such as KNN with eager learners such as linear models, trees and neural nets. It tests understanding of when each does its computation, the costs of training, prediction and memory, and how indexes help lazy learners scale.

General logo
General
Nov 25, 2026
easyMachine Learning EngineerOtherMachine Learning
0
0

What is the difference between lazy learning and eager learning?

What a Strong Answer Covers Guidance

  • When each approach does its computation, and what it keeps after training
  • Training cost, prediction cost and memory for each, with example algorithms in each group
  • Global versus local approximation of the target function
  • Practical consequences: adding new data, prediction latency, and the indexes that let lazy learners scale

Follow-up Questions Guidance

  • How do KD-trees or approximate nearest neighbor indexes change the prediction cost of KNN, and where do they stop helping?
  • Is a kernel SVM lazy or eager, given that it keeps its support vectors?
  • When would you choose a lazy learner in production despite its query cost?