fuzzyclust.cluster#

Core hard and fuzzy partitioning algorithms, generalized fuzzifiers and cluster-number estimators.

Hard and fuzzy prototype-based clustering: K-means, K-medoids, FCM, Gustafson–Kessel, Gath–Geva.

Classes#

KMeans([n_clusters, tol, max_iter, init, ...])

Hard c-means (k-means) clustering with the fuzzyclust interface.

KMedoids([n_clusters, medoid, tol, ...])

Hard k-medoids clustering (prototypes are data points).

FCM([n_clusters, m, norm, tol, max_iter, ...])

Fuzzy c-means clustering (Dunn, Bezdek).

GK([n_clusters, m, rho, gamma, beta, tol, ...])

Gustafson–Kessel (GK) fuzzy clustering.

GG([n_clusters, m, gamma, beta, tol, ...])

Gath–Geva (GG) fuzzy clustering.

RegularizedFCM([n_clusters, regularization, ...])

Fuzzy c-means by entropy or quadratic regularization, with optional deterministic annealing.

PolynomialFuzzifierFCM([n_clusters, beta, ...])

Fuzzy c-means with the polynomial fuzzifier of Klawonn and Höppner.

SubtractiveClustering([radii, squash, ...])

Subtractive clustering (Chiu, 1994): cluster centers from the potential of the data points.

MountainClustering([grid_size, max_nodes, ...])

Mountain method (Yager & Filev, 1994): cluster centers from a mountain function on a grid.

CompatibleClusterMerging([base_estimator, ...])

Compatible cluster merging: find the number of clusters by merging from a large start.

Functions#

entropy_memberships(d2, lam)

Memberships of the entropy-regularized c-means, \(\mu_{ik}\propto\exp(-D^2_{ik}/\lambda)\).

quadratic_memberships(d2, lam)

Memberships of the quadratically regularized c-means (Miyamoto & Umayahara).

polynomial_memberships(d2, beta)

Memberships of fuzzy c-means with the polynomial fuzzifier (Klawonn & Höppner).

polynomial_fuzzifier(U, beta)

Polynomial fuzzifier \(g(\mu)=\frac{1-\beta}{1+\beta}\mu^2+\frac{2\beta}{1+\beta}\mu\) of Klawonn and Höppner.

cluster_similarity(U)

Pairwise similarity of fuzzy clusters from their membership columns (fuzzy Jaccard index).

geometric_compatibility(V, F[, ...])

Compatibility of cluster pairs from centers and covariances (Krishnapuram & Freg).

reference_fuzziness(U, m[, m_ref])

Rescale an FCM-type partition obtained with exponent m to the one exponent m_ref would give.