{"id":35207668,"url":"https://github.com/jo-phil/hopkins-statistic","last_synced_at":"2026-05-13T14:01:05.452Z","repository":{"id":331267036,"uuid":"1108713722","full_name":"jo-phil/hopkins-statistic","owner":"jo-phil","description":"A Python package for computing the Hopkins statistic to assess clustering tendency.","archived":false,"fork":false,"pushed_at":"2026-05-07T21:31:49.000Z","size":112,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-05-07T23:41:11.031Z","etag":null,"topics":["cluster-analysis","cluster-tendency","clustering","data-analysis","data-science","hopkins-statistic","machine-learning","python","statistical-analysis","statistics"],"latest_commit_sha":null,"homepage":"https://jo-phil.github.io/hopkins-statistic/","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/jo-phil.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-12-02T20:21:09.000Z","updated_at":"2026-05-07T21:28:32.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/jo-phil/hopkins-statistic","commit_stats":null,"previous_names":["jo-phil/hopkins-statistic"],"tags_count":7,"template":false,"template_full_name":null,"purl":"pkg:github/jo-phil/hopkins-statistic","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jo-phil%2Fhopkins-statistic","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jo-phil%2Fhopkins-statistic/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jo-phil%2Fhopkins-statistic/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jo-phil%2Fhopkins-statistic/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jo-phil","download_url":"https://codeload.github.com/jo-phil/hopkins-statistic/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jo-phil%2Fhopkins-statistic/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32985763,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-13T13:14:54.681Z","status":"ssl_error","status_checked_at":"2026-05-13T13:14:51.610Z","response_time":115,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["cluster-analysis","cluster-tendency","clustering","data-analysis","data-science","hopkins-statistic","machine-learning","python","statistical-analysis","statistics"],"created_at":"2025-12-29T15:55:49.365Z","updated_at":"2026-05-13T14:01:05.384Z","avatar_url":"https://github.com/jo-phil.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# hopkins-statistic\n\n[![CI](https://github.com/jo-phil/hopkins-statistic/actions/workflows/ci.yml/badge.svg)](https://github.com/jo-phil/hopkins-statistic/actions/workflows/ci.yml \"View workflow runs\")\n[![Coverage](https://img.shields.io/endpoint?url=https://gist.githubusercontent.com/jo-phil/dd436ee381602e21922433dfcdd0b9ec/raw/coverage.json)](https://github.com/jo-phil/hopkins-statistic/actions/workflows/ci.yml?query=branch%3Amain+event%3Apush \"View coverage report\")\n[![PyPI - Version](https://img.shields.io/pypi/v/hopkins-statistic)](https://pypi.org/project/hopkins-statistic/ \"View latest release on PyPI\")\n[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/hopkins-statistic)](https://pypi.org/project/hopkins-statistic/ \"View supported Python versions on PyPI\")\n[![Docs](https://github.com/jo-phil/hopkins-statistic/actions/workflows/docs.yml/badge.svg)](https://jo-phil.github.io/hopkins-statistic/ \"Read the documentation\")\n[![DOI](https://img.shields.io/badge/DOI-10.5281%2Fzenodo.18172791-blue)](https://doi.org/10.5281/zenodo.18172791 \"View on Zenodo\")\n\n[//]: # (--8\u003c-- [start:opener])\n\nhopkins-statistic is a library for computing the Hopkins statistic to assess\nclustering tendency (also known as clusterability) by testing for departure from\ncomplete spatial randomness (CSR) in point patterns.\n\nThis implementation defaults to the [Cross and Jain (1982)] formulation, raising\ndistances to the power of the data dimension. In two dimensions, this matches\nthe original definition by [Hopkins and Skellam (1954)]. Because the resulting\nstatistic follows a beta distribution under the null hypothesis, *p*-values can\nbe computed analytically, avoiding the need for Monte Carlo simulations.\n\n[Cross and Jain (1982)]: https://doi.org/10.1016/S1474-6670(17)63365-2 \"Measurement of Clustering Tendency\"\n[Hopkins and Skellam (1954)]: https://doi.org/10.1093/oxfordjournals.aob.a083391 \"A New Method for determining the Type of Distribution of Plant Individuals\"\n\n[//]: # (--8\u003c-- [end:opener])\n\n## Installation\n\n```bash\npip install hopkins-statistic\n```\n\n## Usage\n\n```python\nimport numpy as np\nfrom hopkins_statistic import hopkins\n\nrng = np.random.default_rng(42)\nX = rng.uniform(size=(100, 2))\n\nstatistic = hopkins(X, rng=rng)\nprint(f\"{statistic:.3f}\")\n#\u003e 0.514\n```\n\n## License\n\nThis project is licensed under the terms of the MIT license.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjo-phil%2Fhopkins-statistic","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjo-phil%2Fhopkins-statistic","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjo-phil%2Fhopkins-statistic/lists"}