Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.clickml.app/llms.txt

Use this file to discover all available pages before exploring further.

K-Nearest Neighbors Regressor finds the K training examples closest to the input and returns their average target value.

Configuration

ParameterDescriptionDefault
N NeighborsNumber of neighbors to consider.5
Weightsuniform — simple average. distance — weighted by inverse distance.uniform
MetricDistance metric: minkowski, euclidean, manhattan, chebyshevminkowski
PPower for minkowski. p=1 = Manhattan, p=2 = Euclidean.2

Input / Output

Type
InputX Train + Y Train
OutputTrained Model

When to use

Simple baseline that works well on small datasets. Always scale features before KNN.