fuzzyclust.viz#

Visualization of high-dimensional fuzzy clustering results.

Projections

pca_projection() principal component projection of data and prototypes Sammon Sammon’s nonlinear mapping (all pairwise distances) FuzzySammon fuzzy Sammon mapping (FUZZSAM): sample–prototype distances only sammon_stress(), recomputed_membership(), projection_quality()

Topology preserving clustering

FuzzySOM fuzzy self-organising map based on regularized FCM grid_laplacian()

Plot helpers

plot_projection(), plot_stress(), plot_map(), plot_som_lattice()

Data generators for the examples

make_ellipsoids(), make_spiral_3d(), make_hemisphere()

PCA, Sammon and fuzzy Sammon projections, projection quality, fuzzy self-organizing map.

Classes#

Sammon([n_components, max_iter, alpha, ...])

Sammon's nonlinear mapping to a low-dimensional space.

FuzzySammon([n_components, max_iter, alpha, ...])

Fuzzy Sammon mapping (FUZZSAM) of a fitted fuzzy clustering.

FuzzySOM([grid_shape, m, regularization, ...])

Fuzzy self-organizing map: regularized fuzzy c-means on a grid.

Functions#

pca_projection(X[, n_components, centers])

Project the data and the cluster prototypes onto the first principal components.

grid_laplacian(grid_shape[, order])

Regularization matrix \(\mathbf{L}=\mathbf{G}^T\mathbf{G}\) of a rectangular grid.

sammon_stress(X, Y)

Sammon's stress of an embedding Y of the data X.

recomputed_membership(Y, Z[, m])

Fuzzy memberships recomputed in the projected space.

projection_quality(U, Y, Z[, m, X])

Measures of how well a 2-D (or q-D) projection represents a fuzzy partition.

plot_projection(Y[, Z, labels, U, ax, ...])

Scatter plot of a 2-D projection with projected prototypes and membership contours.

plot_stress(histories[, labels, ax, ylabel])

Stress versus iteration for one or several stress_history_ arrays.

plot_map(som[, kind, feature, X, ax, cmap, ...])

Draw a fuzzy SOM as a colored grid: U-matrix, a component plane or the hit histogram.

plot_som_lattice(som[, X, dims, ax, labels, s])

Prototypes of a fuzzy SOM in the data space, with grid neighbors connected.

make_ellipsoids([n_clusters, ...])

Elongated Gaussian clusters with random orientations in \(n\) dimensions.

make_spiral_3d([n_samples, turns, noise, ...])

Noisy points along a part of a helix in 3-D (Migály et al., first example).

make_hemisphere([n_samples, noise, random_state])

Noisy points on the upper half of the unit sphere (Migály et al., second example).