{"id":15048027,"url":"https://github.com/orrorcol/soinn","last_synced_at":"2025-12-14T16:05:14.238Z","repository":{"id":57469186,"uuid":"360066827","full_name":"orrorcol/soinn","owner":"orrorcol","description":"SOINN / 聚类 / 无监督聚类 / 快速 / clustering / unsupervised clustering / fast","archived":false,"fork":false,"pushed_at":"2021-04-28T12:45:11.000Z","size":1097,"stargazers_count":20,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-09-24T23:58:27.941Z","etag":null,"topics":["clustering","clustering-algorithm","cpp14","python","soinn","unsupervised-clustering","unsupervised-learning"],"latest_commit_sha":null,"homepage":"","language":"C++","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/orrorcol.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-04-21T07:10:54.000Z","updated_at":"2025-04-11T11:34:04.000Z","dependencies_parsed_at":"2022-09-13T19:31:30.796Z","dependency_job_id":null,"html_url":"https://github.com/orrorcol/soinn","commit_stats":null,"previous_names":["uestc-lfs/soinn"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/orrorcol/soinn","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/orrorcol%2Fsoinn","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/orrorcol%2Fsoinn/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/orrorcol%2Fsoinn/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/orrorcol%2Fsoinn/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/orrorcol","download_url":"https://codeload.github.com/orrorcol/soinn/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/orrorcol%2Fsoinn/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":27730961,"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","status":"online","status_checked_at":"2025-12-14T02:00:11.348Z","response_time":56,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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","clustering-algorithm","cpp14","python","soinn","unsupervised-clustering","unsupervised-learning"],"created_at":"2024-09-24T21:07:10.092Z","updated_at":"2025-12-14T16:05:14.214Z","avatar_url":"https://github.com/orrorcol.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"```\n ____   ___ ___ _   _ _   _ \n/ ___| / _ \\_ _| \\ | | \\ | |\n\\___ \\| | | | ||  \\| |  \\| |\n ___) | |_| | || |\\  | |\\  |\n|____/ \\___/___|_| \\_|_| \\_|\n\n```\nSOINN is a blazing fast unsupervised clustering algorithm.\nThis is the repo for python package soinn.\n\n\n## Install\n`\npip install soinn\n`\n\n## Build by hand\n`\npython -m build\n`\n\n\n\n## API\n\n`learn(data: object = None, dead_age: int = 100, lambda: int = 100, noise: float = 0.5, num_layer: int = 1) -\u003e object`\n\n**input** : numpy array of shape (n, dim)\n\n**dead_age** : the dead age of edges during the learning process, default 100\n\n**lamda** : the number of iterations before removing noise, default 100\n\n**noise** : the ratio of noise in input data, default 0.5\n\n**num_layer** : the number of soinn layer, default 1\n\n**return** : return a numpy array contaning all learned cendrioids, shape (n1, dim) where\nn1 represents the number of cendrioids.\n\n\n\n## Run demo\nHere is a simple code using SOINN to learn cendroids of the input data\n\n\n\n```python\nfrom scipy.io import loadmat\n\nimport matplotlib.pyplot as plt\n\nimport soinn\n\n\n\ndata = loadmat(\"train.mat\")['train']\n\nprint('Load data with shape', data.shape)\n\n\n\nax=plt.subplot(121)\n\nax.set_title('origin data')\n\nplt.plot(data[:,0], data[:,1], '.')\n\n\n\nclus = soinn.learn(data)\n\nprint('soinn learned clusters with shape', clus.shape)\n\nax=plt.subplot(122)\n\nax.set_title('learned cendroids')\n\nplt.plot(clus[:,0], clus[:,1], '.')\n\n\n\nplt.show()\n```\n\nYou can run it by:\n\n`\ncd demo \u0026\u0026 python demo.py\n`\n\nYou can get the following result\n![image](https://github.com/uestc-lfs/soinn/blob/master/demo/result.png)\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Forrorcol%2Fsoinn","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Forrorcol%2Fsoinn","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Forrorcol%2Fsoinn/lists"}