A performant implementation of the DenStream algorithm that relies heavily on FAISS
Project description
FAISSt DenStream
A performant implementation of the DenStream algorithm that relies heavily on FAISS.
Installation
Without GPU acceleration:
pip install faisst-denstream
With GPU acceleration via CUDA 11:
pip install faisst-denstream[gpu-cu11]
With GPU acceleration via CUDA 12:
pip install faisst-denstream[gpu-cu12]
Basic Usage
import numpy as np
from faisst_denstream.DenStream import DenStream
from random import randint
from sys import stderr
from loguru import logger
logger.remove()
logger.add(stderr, level="INFO")
# Create model
lamb = 0.05
beta = 0.5
mu = 10
epsilon = 2
n_init_points = int(test_dataset_size * 0.25)
stream_speed = 10
model = DenStream(lamb, mu, beta, epsilon, n_init_points, stream_speed)
# Multiple datasets to simulate fitting model to stream
X1 = np.random.normal(loc=randint(0, 10), scale=randint(1, 3), size=(1000, 2))
X2 = np.random.normal(loc=randint(0, 10), scale=randint(1, 3), size=(1000, 2))
# As long as model has consumed at least n_init_points points, `predict` and `fit_predict`
# can be called to get cluster labels for each point
model.fit(X1)
x1_labels = model.predict(X1)
x2_labels = model.fit_predict(X2)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
faisst_denstream-0.0.9.tar.gz
(486.2 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file faisst_denstream-0.0.9.tar.gz.
File metadata
- Download URL: faisst_denstream-0.0.9.tar.gz
- Upload date:
- Size: 486.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.0rc1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5e0977a18f3bb0edcd466c56b2103b664365cbfced4eaaf26d1329d49e0640d3
|
|
| MD5 |
b9859c5a5e4d7e7c605af6e8cda30cff
|
|
| BLAKE2b-256 |
73d7096d5e4e8d681897b6a2acf23fc6d1da7ba94515d54b7ae89d975863db7f
|
File details
Details for the file faisst_denstream-0.0.9-py3-none-any.whl.
File metadata
- Download URL: faisst_denstream-0.0.9-py3-none-any.whl
- Upload date:
- Size: 12.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.0rc1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
dc645b78407635a4cf4f44f0ee058e596be5431f09f7c9dd0929e36fce89d0d1
|
|
| MD5 |
7fe5dd69766ed97221bd85ec6df5ba21
|
|
| BLAKE2b-256 |
cb081d63c79d797482c9a980628d5bfb8cc8367df49cf4a896a7c97724cb5857
|