๐Š-๐ฆ๐ž๐š๐ง๐ฌ ๐‚๐ฅ๐ฎ๐ฌ๐ญ๐ž๐ซ๐ข๐ง๐  ๐š๐ง๐ ๐ข๐ญโ€™๐ฌ ๐‘๐ž๐š๐ฅ ๐ฎ๐ฌ๐ž-๐œ๐š๐ฌ๐ž ๐ข๐ง ๐ญ๐ก๐ž ๐’๐ž๐œ๐ฎ๐ซ๐ข๐ญ๐ฒ ๐ƒ๐จ๐ฆ๐š๐ข๐ง

Mohit Mathur
3 min readJul 20, 2021

--

What is Clustering ?

โ€œClustering is a process of dividing the datasets into groups, consisting of similar data pointsโ€. It means grouping of objects based on the information found in the data, describing the objects based on the information found in the data, describing the objects or their relationship.

Clustering is dividing data points into homogeneous classes or clusters:

  • Points in the same group are as similar as possible
  • Points in the different groups are as dissimilar as possible

When a collection of objects is given, we put objects into groups based on similarity.

The various types of clustering are:

  • Hierarchical clustering
  • Partitioning clustering

Hierarchical clustering is further subdivided into:

  • Agglomerative clustering
  • Divisive clustering

Partitioning clustering is further subdivided into:

  • K-Means clustering
  • Fuzzy C-Means clustering

๐–๐ก๐š๐ญ ๐ข๐ฌ ๐ค-๐ฆ๐ž๐š๐ง๐ฌ?

Clustering is the task of dividing the population or data points into a number of groups such that data points in the same groups are more similar to other data points in the same group than those in other groups. In simple words, the aim is to segregate groups with similar traits and assign them into clusters. The goal of the k-means algorithm is to find groups in the data, with the number of groups represented by the variable k. The algorithm works iteratively to assign each data point to one of k groups based on the features that are provided. In the reference image below, k=2, and there are two clusters identified from the source dataset.

The outputs of executing a k-means on a dataset are:

  • k centroids: Centroids for each of the k clusters identified from the dataset.
  • Complete dataset labeled to ensure each data point is assigned to one of the clusters.

Algorithm steps Of K Means โ€”

The working of the K-Means algorithm is explained in the below steps:

Step-1: Select the value of K, to decide the number of clusters to be formed.

Step-2: Select random K points which will act as centroids.

Step-3: Assign each data point, based on their distance from the randomly selected points (Centroid), to the nearest/closest centroid which will form the predefined clusters.

Step-4: place a new centroid of each cluster.

Step-5: Repeat step no.3, which reassign each data point to the new closest centroid of each cluster.

Step-6: If any reassignment occurs, then go to step-4 else go to Step 7.

Step-7: FINISH

Use Cases in the Security Domain

Here are some use cases of K-Means in security domain:

1. Crime Document Classification

Enclose a document in multiple categories based on the documentโ€™s tag, subject, and content. This is a very standard classification problem and kmeans is a very suitable algorithm for these purposes. The first step in the document is to identify commonly used terms that are needed to represent each document as a vector and help classify the document using term frequency. The document vectors are then clustered to help identify the similarity of the document groups.

2. Crime Identification

It can provide good insights into crime-vulnerable areas within a city or region through data on crime, crime categories, crime areas and the relationships between the two, available in specific areas of the city. ..

Thank you for reading,

I hope you liked itโ€ฆ

If you want to connect with me, hereโ€™s the LinkedIn URL-

https://www.linkedin.com/in/mohit-mathur-1803/

Sign up to discover human stories that deepen your understanding of the world.

Free

Distraction-free reading. No ads.

Organize your knowledge with lists and highlights.

Tell your story. Find your audience.

Membership

Read member-only stories

Support writers you read most

Earn money for your writing

Listen to audio narrations

Read offline with the Medium app

--

--

Mohit Mathur
Mohit Mathur

Written by Mohit Mathur

Believe in inner peace...

No responses yet

Write a response