Skip to content
Quantoros

With nonnegative normalized neighbor weights, can KNN regression predict outside the target range of its selected…

Classic MLLevel: IntermediateNeighbor interpolation range

With nonnegative normalized neighbor weights, can KNN regression predict outside the target range of its selected neighbors?

Hints
  • Locate a weighted average between its inputs.
  • Nonnegative weights are important to the claim.

Answer

No. The prediction is a convex weighted average of their targets. It interpolates local observed outcomes rather than freely extrapolating a trend.

Source and licence: scikit-learn 1.7.2 — neighbors · BSD-3-Clause · answer: Quantoros editorial

Related questions