How does the Minkowski distance generalize Euclidean and Manhattan distances?

Quick Overview

Explain how the Minkowski distance family contains Manhattan, Euclidean and Chebyshev distance as settings of a single parameter p. Tests whether you know how p changes the weight of large coordinate gaps, when the distance is a valid metric, and how p is chosen for k-nearest neighbors.

How does the Minkowski distance generalize Euclidean and Manhattan distances?

Role: Machine Learning Engineer

Category: Machine Learning

Difficulty: easy

Interview Round: Other

How does the Minkowski distance generalize Euclidean and Manhattan distances? This comes up when you choose the distance function for a k-nearest neighbors model. ```hint Look at one parameter Write the distance with a free exponent on each coordinate difference, then ask what happens to the sum as that exponent grows or shrinks. ``` ### What a Strong Answer Covers - The general formula and the parameter values that recover Manhattan and Euclidean distance, plus the limit as the parameter grows without bound. - How the parameter changes the influence of the single largest coordinate difference. - The range of the parameter for which the distance is a true metric, and what breaks outside it. - How the parameter is set and tuned in practice for k-nearest neighbors. ### Follow-up Questions - Why does the triangle inequality fail when p is below 1, and what goes wrong in a ball tree when it does? - How does feature scaling interact with the choice of p? - In high-dimensional data, why can L1 keep more contrast between near and far points than L2? - When would you pick Chebyshev distance on purpose?

Overview: Explain how the Minkowski distance family contains Manhattan, Euclidean and Chebyshev distance as settings of a single parameter p. Tests whether you know how p changes the weight of large coordinate gaps, when the distance is a valid metric, and how p is chosen for k-nearest neighbors.

PracHub logo
General
Nov 24, 2026
easyMachine Learning EngineerOtherMachine Learning
0
0

How does the Minkowski distance generalize Euclidean and Manhattan distances?

This comes up when you choose the distance function for a k-nearest neighbors model.

What a Strong Answer Covers Guidance

  • The general formula and the parameter values that recover Manhattan and Euclidean distance, plus the limit as the parameter grows without bound.
  • How the parameter changes the influence of the single largest coordinate difference.
  • The range of the parameter for which the distance is a true metric, and what breaks outside it.
  • How the parameter is set and tuned in practice for k-nearest neighbors.

Follow-up Questions Guidance

  • Why does the triangle inequality fail when p is below 1, and what goes wrong in a ball tree when it does?
  • How does feature scaling interact with the choice of p?
  • In high-dimensional data, why can L1 keep more contrast between near and far points than L2?
  • When would you pick Chebyshev distance on purpose?