{"id":28356947,"url":"https://github.com/mikulatomas/binsdpy","last_synced_at":"2025-07-23T13:04:57.568Z","repository":{"id":43689933,"uuid":"439890115","full_name":"mikulatomas/binsdpy","owner":"mikulatomas","description":"Python implementation of binary similarity and distance measures.","archived":false,"fork":false,"pushed_at":"2023-03-20T07:24:39.000Z","size":96,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-29T00:52:23.076Z","etag":null,"topics":["distance","measures","python","similarity"],"latest_commit_sha":null,"homepage":"","language":"Python","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/mikulatomas.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-12-19T14:51:22.000Z","updated_at":"2021-12-21T16:36:41.000Z","dependencies_parsed_at":"2022-08-22T06:30:11.492Z","dependency_job_id":null,"html_url":"https://github.com/mikulatomas/binsdpy","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/mikulatomas/binsdpy","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mikulatomas%2Fbinsdpy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mikulatomas%2Fbinsdpy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mikulatomas%2Fbinsdpy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mikulatomas%2Fbinsdpy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mikulatomas","download_url":"https://codeload.github.com/mikulatomas/binsdpy/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mikulatomas%2Fbinsdpy/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266682592,"owners_count":23967837,"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-07-23T02:00:09.312Z","response_time":66,"last_error":null,"robots_txt_status":null,"robots_txt_updated_at":null,"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":["distance","measures","python","similarity"],"created_at":"2025-05-28T07:10:19.290Z","updated_at":"2025-07-23T13:04:57.557Z","avatar_url":"https://github.com/mikulatomas.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![build](https://github.com/mikulatomas/binsdpy/actions/workflows/build.yml/badge.svg?branch=main)](https://github.com/mikulatomas/binsdpy/actions/workflows/build.yml?query=branch%3Amain)\n[![codecov](https://codecov.io/gh/mikulatomas/binsdpy/branch/main/graph/badge.svg?token=HI1I1OVOXK)](https://codecov.io/gh/mikulatomas/binsdpy)\n[![PyPI version](https://badge.fury.io/py/binsdpy.svg)](https://badge.fury.io/py/binsdpy)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)\n\n\n# binsdpy - binary similarity and distance measures\nPython implementation of binary similarity (see [1]) and distance measures (see [2]). The `bitsets` (immutable ordered set data type) and `numpy.ndarray` are suported as feature vectors.\n\n## Example\nExample based on `bitsets`:\n```python\nfrom bitsets import bitset\nfrom binsdpy.similarity import jaccard\nfrom binsdpy.distance import euclid\n\nColors = bitset(\"Colors\", (\"red\", \"blue\", \"green\", \"yellow\"))\n\na = Colors.frommembers([\"red\", \"blue\"])\nb = Colors.frommembers([\"red\", \"yellow\"])\n\njaccard(a, b)\n# \u003e 0.3333333333333333\neuclid(a, b)\n# \u003e 1.4142135623730951\n```\n\nExample based on `np.ndarray`:\n```python\nimport numpy as np\nfrom binsdpy.similarity import jaccard\nfrom binsdpy.distance import euclid\n\na = np.array([1, 1, 0, 0], dtype=bool)\nb = np.array([1, 0, 0, 1], dtype=bool)\n\njaccard(a, b)\n# \u003e 0.3333333333333333\neuclid(a, b)\n# \u003e 1.4142135623730951\n```\n\n## Installation\nPackage is avaliable in alpha version via `pip`.\n\n```bash\n$ pip install binsdpy\n```\n\n## Dependencies\nbinsdpy requires:\n\n* Python (\u003e= 3.6)\n* bitset\n* numpy\n\n## Reference\n\u003e [1] Brusco, M., Cradit, J. D., \u0026 Steinley, D. (2021). A comparison of 71 binary similarity coefficients: The effect of base rates. Plos one, 16(4), e0247751.\nhttps://journals.plos.org/plosone/article?id=10.1371/journal.pone.0247751\n\n\u003e [2] Choi, S. S., Cha, S. H., \u0026 Tappert, C. C. (2010). A survey of binary similarity and distance measures. Journal of systemics, cybernetics and informatics, 8(1), 43-48.\nhttp://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.352.6123\u0026rep=rep1\u0026type=pdf\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmikulatomas%2Fbinsdpy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmikulatomas%2Fbinsdpy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmikulatomas%2Fbinsdpy/lists"}