Skip to main content

Clustered Hierarchical Entropy-Scaling Search of Astrophysical and Biological Data

CHESS is a search algorithm for large data sets when the data exhibits certain geometric properties. The paper is available on the arXiv.

We have extended CHESS to perform Manifold Learning and Anomaly Detection. We are working on adding Dimensionality Reduction and Visualization abilities, and on 3-d Object Recognition from point clouds. One of the major problems with this extension is that we need a new name. Stay tuned.

Language grade: Python codecov Documentation Status

Installation

python3 -m pip install CHESS-python

Usage

import numpy as np

from chess.datasets import bullseye
from chess.manifold import Manifold
from chess import criterion

# Get the data.
data, _ = bullseye()
# data is a numpy.ndarray in this case but it could just as easily be a numpy.memmap if your data cannot fit in RAM.
# We used memmaps for the research, though it does impose file-io costs.

manifold = Manifold(data=data, metric='euclidean')
# Any metric allowed by scipy's cdist function is allowed in Manifold.
# You can also define your own distance function. It will work so long as scipy allows it.

manifold.build(criterion.MaxDepth(20), criterion.MinRadius(0.25))
# Manifold.build can optionally take any number of early stopping criteria.
# chess.criterion defines some criteria that we have used in research.
# You are free to define your own.
# Take a look at chess/criterion.py for hints of how to define custom criteria.

# A sample rho-nearest neighbors search query
query, radius = data[0], 0.05
results = manifold.find_points(point=query, radius=radius)
# results is a dictionary of indexes of hits in data and the distance to those hits.

# A sample k-nearest neighbors search query
results = manifold.find_knn(point=query, k=25)

chess.Manifold relies on the Graph and Cluster classes. You can import these and work with them directly if you so choose. We have written good docs for each class and method. Go crazy.

Contributing

Pull requests and bug reports are welcome. For major changes, please first open an issue to discuss what you would like to change.

License

MIT

Metadata

Release files for CHESS-python 2.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for CHESS-python 2.0.0
File Size Uploaded Provenance
CHESS-python-2.0.0.tar.gz 24.0 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for CHESS-python 2.0.0
File Interpreter ABI Platform
CHESS_python-2.0.0-py3-none-any.whl Python 3 none any Details

Total release size: 38.3 kB

Release files / CHESS-python-2.0.0.tar.gz

Download URL CHESS-python-2.0.0.tar.gz
Size 24.0 kB
Tags Source
SHA-256 checksum
How to use checksums
45fdd2dc1959e82e83be14394c1026c912a5ac1cae778eafb583bbdc91d7c1db
BLAKE2b-256 checksum
How to use checksums
60a3f905898bca40a99bd015d09afc7383ce80affae5c628306afc0d11356340
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.41.1 CPython/3.8.0

Release files / CHESS_python-2.0.0-py3-none-any.whl

Download URL CHESS_python-2.0.0-py3-none-any.whl
Size 14.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
363ab8db3bb764b285c4bb5d1e6be6792ea5a6f96051f4c8c31bfa82f4d543f7
BLAKE2b-256 checksum
How to use checksums
e65dfa66802a87ced00f0144867f7386c22ac0474d1ddb0f54629d8b4ae71398
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.41.1 CPython/3.8.0

Security for CHESS-python 2.0.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page