Spectral Bridges clustering algorithm
Project description
Spectral Bridges
Spectral Bridges is a Python package that implements a novel clustering algorithm combining k-means and spectral clustering techniques. It leverages efficient affinity matrix computation and merges clusters based on a connectivity measure inspired by SVM's margin concept. This package is designed to provide robust clustering solutions, particularly suited for large datasets.
Features
- Spectral Bridges Algorithm: Integrates k-means and spectral clustering with efficient affinity matrix calculation for improved clustering results.
- Scalability: Designed to handle large datasets by optimizing cluster formation through advanced affinity matrix computations.
- Customizable: Parameters such as number of clusters, iterations, and random state allow flexibility in clustering configurations.
Installation
You can install the package via pip:
pip install spectral-bridges
Usage
Example
from spectralbridges import SpectralBridges
import numpy as np
# Generate sample data
np.random.seed(0)
X = np.random.rand(100, 10) # Replace with your dataset
# Initialize and fit Spectral Bridges
model = SpectralBridges(n_clusters=5, n_nodes=10, random_state=42)
model.fit(X)
# Predict clusters for new data points
new_data = np.random.rand(20, 10) # Replace with new data
predicted_clusters = model.predict(new_data)
print("Predicted clusters:", predicted_clusters)
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
spectral_bridges-0.2.2.tar.gz
(4.5 kB
view hashes)
Built Distribution
Close
Hashes for spectral_bridges-0.2.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6d10a6f86b2509d4bde82b5c31a2841c6067497113b156c7401674aef39d62c7 |
|
MD5 | eaca70d8069523f85a26750b5e5e1678 |
|
BLAKE2b-256 | 361cdda2d4e703cebcaaeb3908610fb8a46123d92227b88a2e2c0a0b72ba0237 |