---
title: "Discussion on \"A simplistic intuition behind the K-NN algorithm\" | Hashnode"
description: "Discussion on \"A simplistic intuition behind the K-NN algorithm\". How does the K-NN machine learning algorithm work? A simple and intuitive explanation of the model's mechanism."
url: "https://hashnode.com/posts/a-simplistic-intuition-behind-the-k-nn-algorithm/642052202b285a14e7727d1f"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [A simplistic intuition behind the K-NN algorithm](https://adityasanyal.hashnode.dev/a-simplistic-intuition-behind-the-k-nn-algorithm?utm_source=hashnode&utm_medium=feed)

How does the K-NN machine learning algorithm work? A simple and intuitive explanation of the model's mechanism.

Mar 26, 2023 · 3 min read · adityasanyal.hashnode.dev  
Read the article

-   [#machine-learning](https://hashnode.com/tag/machine-learning)
-   [#classification](https://hashnode.com/tag/classification)
-   [#artificial-intelligence](https://hashnode.com/tag/artificial-intelligence)
-   [#algorithms](https://hashnode.com/tag/algorithms)

## Written by

[Aditya Sanyal](https://hashnode.com/@AdiSan)

@AdiSan · Kolkata, India

  
[View profile](https://hashnode.com/@AdiSan)

I am a student, not only in my college but in life as well. ;)

I love technology, and have an interest in ML/DL, I love to think about solving problems that shape the lives of millions.

## Responses 1

Markdown supported · ⌘↵ to post

[Anthony Fung](https://hashnode.com/@anthonyf)

[Mar 29, 2023](https://hashnode.com/posts/a-simplistic-intuition-behind-the-k-nn-algorithm/642052202b285a14e7727d1f/comment/6424c554bb5fefa80796c4b7)

Nice overview. I remember using this in one of my coursework projects during my studies.

I remember one of the tricky aspects when I tried it was how to initialise the clusters.

When I picked random data points as the cluster centres, the results could be quite poor if they happened to be initialised near others.

[Aditya Sanyal](https://hashnode.com/@AdiSan)

[Mar 30, 2023](https://hashnode.com/posts/a-simplistic-intuition-behind-the-k-nn-algorithm/642052202b285a14e7727d1f/comment/6424c554bb5fefa80796c4b7#reply-6424efb3bb5fefa80796c998)

Ya, this algorithm can make unwanted predictions if the data is not preprocessed properly
