{"id":21068437,"url":"https://github.com/cascadingradium/cuda-hungarian-clustering","last_synced_at":"2025-05-16T03:33:18.124Z","repository":{"id":38395124,"uuid":"499595129","full_name":"CascadingRadium/CUDA-Hungarian-Clustering","owner":"CascadingRadium","description":"A GPU-Accelerated Clustering Algorithm that uses the Hungarian method","archived":false,"fork":false,"pushed_at":"2023-01-01T05:20:29.000Z","size":8096,"stargazers_count":5,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2023-03-06T21:55:25.636Z","etag":null,"topics":["clustering","cpp","cuda","gpu","hungarian-algorithm","parallel-computing"],"latest_commit_sha":null,"homepage":"","language":"Cuda","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/CascadingRadium.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}},"created_at":"2022-06-03T17:25:54.000Z","updated_at":"2022-12-12T19:07:15.000Z","dependencies_parsed_at":"2023-01-31T20:45:16.821Z","dependency_job_id":null,"html_url":"https://github.com/CascadingRadium/CUDA-Hungarian-Clustering","commit_stats":null,"previous_names":[],"tags_count":null,"template":null,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CascadingRadium%2FCUDA-Hungarian-Clustering","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CascadingRadium%2FCUDA-Hungarian-Clustering/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CascadingRadium%2FCUDA-Hungarian-Clustering/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CascadingRadium%2FCUDA-Hungarian-Clustering/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/CascadingRadium","download_url":"https://codeload.github.com/CascadingRadium/CUDA-Hungarian-Clustering/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225403648,"owners_count":17469004,"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","cpp","cuda","gpu","hungarian-algorithm","parallel-computing"],"created_at":"2024-11-19T18:21:10.785Z","updated_at":"2024-11-19T18:21:11.531Z","avatar_url":"https://github.com/CascadingRadium.png","language":"Cuda","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![GitHub license](https://img.shields.io/github/license/CascadingRadium/CUDA-Hungarian-Clustering)](https://github.com/CascadingRadium/CUDA-Hungarian-Clustering/blob/main/LICENCE)\n[![GitHub forks](https://img.shields.io/github/forks/CascadingRadium/CUDA-Hungarian-Clustering)](https://github.com/CascadingRadium/CUDA-Hungarian-Clustering/network)\n[![GitHub stars](https://img.shields.io/github/stars/CascadingRadium/CUDA-Hungarian-Clustering)](https://github.com/CascadingRadium/CUDA-Hungarian-Clustering/stargazers)\n[![GitHub issues](https://img.shields.io/github/issues/CascadingRadium/CUDA-Hungarian-Clustering)](https://github.com/CascadingRadium/CUDA-Hungarian-Clustering/issues)\n![GitHub repo size](https://img.shields.io/github/repo-size/CascadingRadium/CUDA-Hungarian-Clustering)\n![GitHub last commit](https://img.shields.io/github/last-commit/CascadingRadium/CUDA-Hungarian-Clustering)\n\u003cimg src=\"https://developer.nvidia.com/favicon.ico\" align ='right' width ='50'\u003e\n# CUDA-Hungarian-Clustering\nA GPU-Accelerated Clustering Algorithm that uses the Hungarian method\n\nWritten in CUDA and C++\n\nIntroduction:\n  - Parameterless (Almost) Clustering Algorithm\n  - Input is a single CSV file and the output will be a file named 'output.csv' which has the full original data + an extra 'label' column that specifies what cluster/group it belongs to.\n  - Does not need any prior knowledge of the number of clusters/groups present in the dataset\n  - Results similar to ones obtained from Spectral Clustering (but without the requirement of the number of clusters parameter)\n  - Combined the work of two research papers:\n      - A hierarchical clustering algorithm based on the Hungarian method, \u003ci\u003eJournal of Pattern Recognition Letters\u003c/i\u003e (2008) (https://doi.org/10.1016/j.patrec.2008.04.003)\n      - GPU-accelerated Hungarian algorithms for the Linear Assignment Problem, \u003ci\u003eJournal of Parallel Computing\u003c/i\u003e (2016)  (https://doi.org/10.1016/j.parco.2016.05.012)\n  - Mainly used to find the number of groups in the dataset with each group being a set of 'similar' rows similar to DBSCAN\n\nExecution instructions:\n\n```\nnvcc Clustering.cu\n\n./a.out [INPUT_FILE] [PARAMETER] [Number of Columns from right to skip/ignore] [Number of Rows from top to skip/ignore]\n\npython3 plot_output.py \n\n```\n\nINPUT FILE - Any file(.xlxs .csv) that can be opened in spreadsheet software like LibreOffice calc/MS Excel.\n\nPARAMETER - Integral value in the range [0,8] for most inputs (must be manually tuned) - 7 works for most datasets (Independent of the real number of clusters in the dataset)\n\nThe other two command-line arguments are meant to filter out the label column and the column header row respectively before passing on the raw data to the model\n\nConstraints:\n- The input file should only have numeric columns (float/ integer)\n- The input file should not have any NaN or null values - Dataset cleaning must be done prior\n- Parameter tuning can only be possible if a rough estimate of the number of values the label can take is known, otherwise, a pure unsupervised clustering without any tuning can be done by just assuming Parameter as 7\n- Sensitive to noise\n- Parameter, being fully independent of the dataset, cannot be estimated and is mostly tuned based on trial-and-error, but almost always takes a value in the range [0,10] \n\nWorking Example:\n\n```\nnvcc Clustering.cu\n./a.out data_banknote_authentication.csv 10 1 1\n```\nThis will now use parameter 10 and cluster the input .csv file into some number of groups and output a file named 'output.csv' which has an additional column called label which represents the groupID or the group to which it belongs.\n\nSample output images - using datasets in the TestedDataset directory:\n\n\u003cp float=\"left\"\u003e\n  \u003cimg src=\"TestedDatasets/data0.png\" width=\"32%\" title=\"data0.csv\" alt=\"data0\"\u003e\n  \u003cimg src=\"TestedDatasets/data1.png\" width=\"32%\" title=\"data1.csv\" alt=\"data1\"\u003e\n  \u003cimg src=\"TestedDatasets/data2.png\" width=\"32%\" title=\"data2.csv\" alt=\"data2\"\u003e\n\u003c/p\u003e\n\u003cp float=\"left\"\u003e\n  \u003cimg src=\"TestedDatasets/data3.png\" width=\"32%\" title=\"data3.csv\" alt=\"data3\"\u003e\n  \u003cimg src=\"TestedDatasets/data4.png\" width=\"32%\" title=\"data4.csv\" alt=\"data4\"\u003e\n  \u003cimg src=\"TestedDatasets/data5.png\" width=\"32%\" title=\"data5.csv\" alt=\"data5\"\u003e\n\u003c/p\u003e\n\u003cp float=\"left\"\u003e\n  \u003cimg src=\"TestedDatasets/data6.png\" width=\"32%\" title=\"data6.csv\" alt=\"data6\"\u003e\n  \u003cimg src=\"TestedDatasets/data7.png\" width=\"32%\" title=\"data7.csv\" alt=\"data7\"\u003e\n  \u003cimg src=\"TestedDatasets/data8.png\" width=\"32%\" title=\"data8.csv\" alt=\"data8\"\u003e\n\u003c/p\u003e\n\u003cp float=\"left\"\u003e\n  \u003cimg src=\"TestedDatasets/data9.png\" width=\"32%\" title=\"data9.csv\" alt=\"data9\"\u003e\n  \u003cimg src=\"TestedDatasets/data10.png\" width=\"32%\" title=\"data10.csv\" alt=\"data10\"\u003e\n  \u003cimg src=\"TestedDatasets/data11.png\" width=\"32%\" title=\"data11.csv\" alt=\"data11\"\u003e\n\u003c/p\u003e\n\u003cp float=\"left\"\u003e\n  \u003cimg src=\"TestedDatasets/data12.png\" width=\"32%\" title=\"data12.csv\" alt=\"data12\"\u003e\n  \u003cimg src=\"TestedDatasets/data13.png\" width=\"32%\" title=\"data13.csv\" alt=\"data13\"\u003e\n  \u003cimg src=\"TestedDatasets/data14.png\" width=\"32%\" title=\"data14.csv\" alt=\"data14\"\u003e\n\u003c/p\u003e\n\u003cp float=\"left\"\u003e\n  \u003cimg src=\"TestedDatasets/data15.png\" width=\"32%\" title=\"data15.csv\" alt=\"data15\"\u003e\n  \u003cimg src=\"TestedDatasets/data16.png\" width=\"32%\" title=\"data16.csv\" alt=\"data16\"\u003e\n  \u003cimg src=\"TestedDatasets/data17.png\" width=\"32%\" title=\"data17.csv\" alt=\"data17\"\u003e\n\u003c/p\u003e\n\u003cp float=\"left\"\u003e\n  \u003cimg src=\"TestedDatasets/data18.png\" width=\"32%\" title=\"data18.csv\" alt=\"data18\"\u003e\n  \u003cimg src=\"TestedDatasets/data19.png\" width=\"32%\" title=\"data19.csv\" alt=\"data19\"\u003e\n  \u003cimg src=\"TestedDatasets/data20.png\" width=\"32%\" title=\"data20.csv\" alt=\"data20\"\u003e\n\u003c/p\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcascadingradium%2Fcuda-hungarian-clustering","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcascadingradium%2Fcuda-hungarian-clustering","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcascadingradium%2Fcuda-hungarian-clustering/lists"}