RFoT.clustering package
Contents
RFoT.clustering package#
Submodules#
RFoT.clustering.component module#
Treats a single component as a cluster.
RFoT.clustering.gmm module#
Gaussian Mixture Model clustering.
- RFoT.clustering.gmm.GaussianMixture_find_n(M_r, min_, max_, random_state)[source]#
Finds the optimal number of clusters using BIC score for component r of KRUSKAL tensor M_i.
- Parameters
M_r (np.ndarray) -- latent factor.
min (int) -- Min clusters.
max (int) -- Max clusters.
random_state (int) -- Random state.
- Returns
Number of clusers.
- Return type
int
- RFoT.clustering.gmm.GaussianMixture_get_labels(M_r, n, random_state)[source]#
Extracts the cluster labels for KRUSKAL tensor M_r for n clusters. M_r is the rth component of the KRUSKAL tensor M_i.
- Parameters
M_r (np.ndarray) -- latent factor.
n (int) -- Number of clusters.
random_state (int) -- Random state.
- Returns
Labels.
- Return type
np.ndarray
RFoT.clustering.ms module#
Mean Shift clustering