{"id":20858905,"url":"https://github.com/subham-agrawall/clustering-scratch","last_synced_at":"2025-08-03T21:39:27.398Z","repository":{"id":202576220,"uuid":"356564636","full_name":"subham-agrawall/clustering-scratch","owner":"subham-agrawall","description":"This repository has some clustering techniques implemented from scratch to understand and grasp basic concepts.","archived":false,"fork":false,"pushed_at":"2021-04-10T14:50:14.000Z","size":301,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-19T07:24:36.536Z","etag":null,"topics":["clustering","dbscan-algorithm","kmeans-algorithm"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/subham-agrawall.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-04-10T11:44:50.000Z","updated_at":"2021-04-11T06:01:42.000Z","dependencies_parsed_at":null,"dependency_job_id":"5e1bee0c-2b5d-486f-97b6-88d1f4240b20","html_url":"https://github.com/subham-agrawall/clustering-scratch","commit_stats":null,"previous_names":["subham-agrawall/clustering-scratch"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/subham-agrawall%2Fclustering-scratch","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/subham-agrawall%2Fclustering-scratch/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/subham-agrawall%2Fclustering-scratch/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/subham-agrawall%2Fclustering-scratch/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/subham-agrawall","download_url":"https://codeload.github.com/subham-agrawall/clustering-scratch/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243230100,"owners_count":20257644,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["clustering","dbscan-algorithm","kmeans-algorithm"],"created_at":"2024-11-18T04:47:57.393Z","updated_at":"2025-03-12T14:14:37.619Z","avatar_url":"https://github.com/subham-agrawall.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Clustering from scratch\nThis repo contains implementation of k-means and DBSCAN algorithm from scratch on a sample dataset. \n\n## Dataset\nIn the below figure, green and blue points represent cluster 1 and cluster 2 respectively. Red points represent noise.  \n\u003cimg src=\"https://github.com/subham-agrawall/clustering-scratch/blob/main/output/dataset.jpeg\" width=\"400\" height=\"300\"\u003e\n\n## K-Means output\nApplying K-means clustering algorithm for given dataset with k=2,  \n\u003cimg src=\"https://github.com/subham-agrawall/clustering-scratch/blob/main/output/kmeans.jpeg\" width=\"400\" height=\"300\"\u003e  \nTRUE POSITIVE RATE FOR CLUSTER-1 = 15%  \nTRUE POSITIVE RATE FOR CLUSTER-2 = 16%  \nNo noise points\n\n## DBSCAN output\n\u003cimg src=\"https://github.com/subham-agrawall/clustering-scratch/blob/main/output/kdist.jpeg\" width=\"350\" height=\"250\"\u003e\nAs 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,    \n\u003cimg src=\"https://github.com/subham-agrawall/clustering-scratch/blob/main/output/dbscan.jpeg\" width=\"400\" height=\"300\"\u003e\n\nTRUE POSITIVE RATE FOR CLUSTER-1 = 100%   \nTRUE POSITIVE RATE FOR CLUSTER-2 = 100%\u003cbr/\u003e\n\nThus, DBSCAN performs better than k-means for the given dataset from figures and true positive rates.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsubham-agrawall%2Fclustering-scratch","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsubham-agrawall%2Fclustering-scratch","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsubham-agrawall%2Fclustering-scratch/lists"}