https://github.com/subham-agrawall/clustering-scratch
This repository has some clustering techniques implemented from scratch to understand and grasp basic concepts.
https://github.com/subham-agrawall/clustering-scratch
clustering dbscan-algorithm kmeans-algorithm
Last synced: 3 months ago
JSON representation
This repository has some clustering techniques implemented from scratch to understand and grasp basic concepts.
- Host: GitHub
- URL: https://github.com/subham-agrawall/clustering-scratch
- Owner: subham-agrawall
- Created: 2021-04-10T11:44:50.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2021-04-10T14:50:14.000Z (about 4 years ago)
- Last Synced: 2025-01-19T07:24:36.536Z (5 months ago)
- Topics: clustering, dbscan-algorithm, kmeans-algorithm
- Language: Python
- Homepage:
- Size: 294 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Clustering from scratch
This repo contains implementation of k-means and DBSCAN algorithm from scratch on a sample dataset.## Dataset
In the below figure, green and blue points represent cluster 1 and cluster 2 respectively. Red points represent noise.## K-Means output
Applying K-means clustering algorithm for given dataset with k=2,![]()
TRUE POSITIVE RATE FOR CLUSTER-1 = 15%
TRUE POSITIVE RATE FOR CLUSTER-2 = 16%
No noise points## DBSCAN output
![]()
As observed from the above figure and also from code, we get epsilon=1.22 for given data and k=4. Applying DBSCAN algorithm with a value of k=4,TRUE POSITIVE RATE FOR CLUSTER-1 = 100%
TRUE POSITIVE RATE FOR CLUSTER-2 = 100%Thus, DBSCAN performs better than k-means for the given dataset from figures and true positive rates.