ferrolearn-cluster
Clustering algorithms for the ferrolearn machine learning framework.
Algorithms
| Model | Description |
|---|---|
KMeans |
K-Means with k-Means++ initialization and parallel assignment via Rayon |
MiniBatchKMeans |
Mini-batch variant of K-Means for large datasets |
DBSCAN |
Density-based clustering — discovers clusters of arbitrary shape |
AgglomerativeClustering |
Hierarchical clustering (Ward, complete, average, single linkage) |
GaussianMixture |
Gaussian Mixture Models via EM (full, tied, diagonal, spherical covariance) |
MeanShift |
Non-parametric mode-seeking clustering |
SpectralClustering |
Graph Laplacian eigenmap clustering |
OPTICS |
Ordering Points To Identify the Clustering Structure |
Example
use ;
use ;
use array;
let x = array!;
let model = new.with_max_iter;
let fitted = model.fit.unwrap;
// Assign new points to clusters
let labels = fitted.predict.unwrap;
// Get distances to each centroid
let distances = fitted.transform.unwrap;
License
Licensed under either of Apache License, Version 2.0 or MIT License at your option.