{"id":18439483,"url":"https://github.com/idiap/zentas","last_synced_at":"2025-04-07T21:32:32.829Z","repository":{"id":144963937,"uuid":"68285955","full_name":"idiap/zentas","owner":"idiap","description":"Partitional data clustering around centers","archived":false,"fork":false,"pushed_at":"2019-06-27T05:40:22.000Z","size":612,"stargazers_count":8,"open_issues_count":0,"forks_count":3,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-03-23T01:02:34.714Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/idiap.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"COPYING","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":"2016-09-15T10:45:00.000Z","updated_at":"2024-02-06T06:11:51.000Z","dependencies_parsed_at":null,"dependency_job_id":"0f4d2f9b-0a25-40b7-b488-51b553e20384","html_url":"https://github.com/idiap/zentas","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/idiap%2Fzentas","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/idiap%2Fzentas/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/idiap%2Fzentas/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/idiap%2Fzentas/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/idiap","download_url":"https://codeload.github.com/idiap/zentas/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247732698,"owners_count":20986906,"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":[],"created_at":"2024-11-06T06:24:56.159Z","updated_at":"2025-04-07T21:32:32.820Z","avatar_url":"https://github.com/idiap.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ZENTAS\n\nA C++ and (optional) Python tool for partitional clustering. Optimised implementations of K-Medoids and K-Means, for various data types. More information is in our paper at [arXiv 1609.04723](https://arxiv.org/abs/1609.04723). \n\n\n\n### K-Medoids a.k.a. K-Centers\n\nGiven *N* elements *x(1)...x(N)*, select *K* elements indexed by *c(1)...c(K)*, to minimise  *sum(i=1...N) min(k=1...K) E(distance (x(i), x(c(k))))* where *distance* is a valid distance and *E* is a non-decreasing function with *E(0) = 0*.\n\n*distance* options are  \n  * for sparse and dense vectors : l-0, l-1, l-2, l-infinity\n  * for sequence data : Levenshtein and Normalised Levenshtein.\n    \nEnergy *E* options are  \n  * identity, quadratic, cubic, square-potential, exponential, and logarithmic.\n\n### K-Means for dense and sparse vector data  \n\n   * minimise sum of squares of l2 distances to cluster mean   \n   * minimise sum of l1 distances to cluster dimension-wise median\n\n\n## PREREQUISITES\n\n* CMake\n* for the Python library: Cython and Python\n\n\n## CONFIGURE WITH CMAKE\n\n\nCreate a build directory:\n```\nmkdir build; cd build;\n```\n\nIf you do NOT want the Python library, \n\n```\ncmake -DBUILD_PYTHON_LIB=NO ..\n```\n\nIf you do want the Python library, \n\n\n```\ncmake ..\n```\n\n## BUILD\n\nThe library can be built, from the `build` directory \n\n```\nmake -j5\n```\n\nThe shared library should now be in ./build/zentas (libzentas.so in Linux) and the Python shared library in ./build/python (pyzentas.so in Linux). These can be moved/copied elsewhere manually, there is currently no install option for zentas.\n\n\n## USING\n\nExample use cases of the C++ library and headers are in testsexamples, with the corresponding executables in build/testsexamples. There is an example of clustering dense vectors (exdense.cpp), sparse vectors (exsparse.cpp), and sequences (exwords.cpp). \n\nTo use the Python library, make sure pyzentas.so is on PYTHONPATH, for example you can use `sys.path.append(/path/to/pyzentas.so)`. Examples using pyzentas are in python/examples.py.  More information can be obtained from the doc strings, try \n```\nimport pyzentas\nhelp(pyzentas)\n``` \n\n\n## Doesn't work, or missing a feature?\n\nPlease raise an issue in the zentas repository\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fidiap%2Fzentas","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fidiap%2Fzentas","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fidiap%2Fzentas/lists"}