Skip to content

Model Training & Adaptation

k-nearest neighbors

Making a prediction by looking at the most similar examples already stored.

Example

A new item receives the category most common among its nearest examples.

Why people use it

It makes a prediction by comparing a new case with familiar nearby cases.

What you'll hear

“Which earlier cases look most like this one?”

What this means for you

Check scaling, features and the number of neighbors used.

Can you control it?

Developer-only

The people building or running the AI choose this setup. An everyday user generally needs their help to change how this part works.

Common questions

Does it need stored examples when making a prediction?
Usually, yes. It compares the new case with available examples instead of relying only on a compact learned rule.
What does 'nearest' mean here?
It means most similar under the chosen comparison, not necessarily physically nearby.
Can irrelevant details affect the neighbors?
Yes. The comparison can be distorted if unhelpful measurements receive too much influence.

Related terms

Still have questions?

Up to 500 characters.

Ask LATHIC about AI. Relevant glossary entries may be included.

Your question, the glossary entries it matches, and a rotating pseudonymous identifier go to Microsoft Azure’s OpenAI service through Vercel AI Gateway to generate an answer. Zero retention and no training are required of the provider, and LATHIC does not save your question or answer. Privacy Notice