Skip to main content

SIMBSIG = SIMilarity Batched Search Integrated Gpu-based

License: BSD Version PythonVersion Documentation Status

SIMBSIG is a GPU accelerated software tool for neighborhood queries, KMeans and PCA which mimics the sklearn API.

The algorithm for batchwise data loading and GPU usage follows the principle of [1]. The algorithm for KMeans follows the Mini-batch KMeans described by Scully [2]. The PCA algorithm follows Halko's method [3]. The API matches sklearn in big parts [4,5], such that code dedicated to sklearn can be simply reused by importing SIMBSIG instead of sklearn. Additional features and arguments for scaling have been added, for example all data input can be either array-like or as a h5py file handle [6].

Eljas Röllin, Michael Adamer, Lucie Bourguignon, Karsten M. Borgwardt

Installation

SIMBSIG is a PyPI package which can be installed via pip:

pip install simbsig

You can also clone the repository and install it locally via Poetry by executing

poetry install

in the repository directory.

Example

>>> X = [[0,1], [1,2], [2,3], [3,4]]
>>> y = [0, 0, 1, 1]
>>> from simbsig import KNeighborsClassifier
>>> knn_classifier = KNeighborsClassifier(n_neighbors=3)
>>> knn_classifier.fit(X, y)
KNeighborsClassifier(...)
>>> print(knn_classifier.predict([[0.9, 1.9]]))
[0]
>>> print(knn_classifier.predict_proba([[0.9]]))
[[0.666... 0.333...]]

Tutorials

Tutorial notebooks with toy examples can be found under tutorials

Documentation

The documentation can be found here.

Overview of implemented algorithms

Class SIMBSIG sklearn
NearestNeighbors fit fit
kneighbors kneighbors
radius_neighbors radius_neighbors
KNeighborsClassifier fit fit
predict predict
predict_proba predict_proba
KNeighborsRegressor fit fit
predict predict
RadiusNeighborsClassifier fit fit
predict predict
predict_proba predict_proba
RadiusNeighborsRegressor fit fit
predict predict
KMeans fit fit
predict predict
fit_predict fit_predict
PCA fit fit
transform transform
fit_transform fit_transform

Contact

This code is developed and maintained by members of the Department of Biosystems Science and Engineering at ETH Zurich. It available from the GitHub repo of the Machine Learning and Computational Biology Lab of Prof. Dr. Karsten Borgwardt.

References:

[1] Gutiérrez, P. D., Lastra, M., Bacardit, J., Benítez, J. M., & Herrera, F. (2016). GPU-SME-kNN: Scalable and memory efficient kNN and lazy learning using GPUs. Information Sciences, 373, 165-182.

[2] Sculley, D. (2010, April). Web-scale k-means clustering. In Proceedings of the 19th international conference on World wide web (pp. 1177-1178).

[3] Halko, N., Martinsson, P. G., Shkolnisky, Y., & Tygert, M. (2011). An algorithm for the principal component analysis of large data sets. SIAM Journal on Scientific computing, 33(5), 2580-2594.

[4] Pedregosa, F., Varoquaux, G., Gramfort, A., Michel, V., Thirion, B., Grisel, O., ... & Duchesnay, E. (2011). Scikit-learn: Machine learning in Python. the Journal of machine Learning research, 12, 2825-2830.

[5] Buitinck, L., Louppe, G., Blondel, M., Pedregosa, F., Mueller, A., Grisel, O., ... & Varoquaux, G. (2013). API design for machine learning software: experiences from the scikit-learn project. arXiv preprint arXiv:1309.0238.

[6] Collette, A., Kluyver, T., Caswell, T. A., Tocknell, J., Kieffer, J., Scopatz, A., ... & Hole, L. (2021). h5py/h5py: 3.1. 0. Zenodo.

Metadata

Release files for simbsig 0.1.2

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

Source distribution (sdist)

Source distribution for simbsig 0.1.2
File Size Uploaded
simbsig-0.1.2.tar.gz 42.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for simbsig 0.1.2
File Interpreter ABI Platform
simbsig-0.1.2-py3-none-any.whl Python 3 none any Details

Total release size: 79.4 kB

Release files / simbsig-0.1.2.tar.gz

Download URL simbsig-0.1.2.tar.gz
Size 42.7 kB
Tags Source
SHA-256 checksum
How to use checksums
c73c91762e42783669f5c16b758ca45807ef6ee6b589704fc78cb930da697973
BLAKE2b-256 checksum
How to use checksums
7f294206fc0eda929a08dc78a1ed199015513ed2031836f53b54cbfddcc4f22f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.1.13 CPython/3.8.10 Linux/5.13.0-51-generic

Release files / simbsig-0.1.2-py3-none-any.whl

Download URL simbsig-0.1.2-py3-none-any.whl
Size 36.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ead5a2bb226da27864071007b7ef3eff412afcf8d248dc9af0d69a1ae5dfa8fb
BLAKE2b-256 checksum
How to use checksums
e9767542de5dd78ac91d3d188afa79d019bb2c9cdb8ccced9f3ab1fde6f28b47
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.1.13 CPython/3.8.10 Linux/5.13.0-51-generic

Release history Release notifications | RSS feed

This release

0.1.2 This release

2 release files

0.1.1

2 release files

0.1.0

2 release files

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