fuzzyclust.graph.IsomapFCM#

class fuzzyclust.graph.IsomapFCM(n_clusters=3, n_components=2, n_neighbors=10, radius=None, bridge_penalty=1.0, m=2.0, tol=0.0001, max_iter=300, init='random', n_init=1, random_state=None, verbose=0)[source]#

Bases: BaseFuzzyClusterer

Fuzzy c-means on the Isomap projection (Feil and Abonyi, Algorithm I).

The manifold exploration is left entirely to Isomap: geodesic distances on the neighborhood graph are embedded in \(q\) dimensions by classical multidimensional scaling, fuzzy c-means is run on the projected data, and every center is “re-projected” into the feature space as the sample whose projection is closest to it. The paper’s Algorithm II (GeodesicFCM) avoids the projection step, which is the bottleneck of this approach: Isomap can only embed a connected graph, so disconnected components are bridged first (see geodesic_distances()), and a projection that fails to unfold the manifold spoils the clustering.

Parameters:
n_clustersint, default=3
n_componentsint, default=2

Dimension \(q\) of the Isomap embedding.

n_neighborsint, default=10
radiusfloat or None, default=None
bridge_penaltyfloat, default=1.0

Graph construction, see GeodesicFCM (components are always connected here, because MDS needs finite distances).

m, tol, max_iter, init, n_init, random_state, verbose

Passed to the FCM run on the embedding.

Attributes:
embedding_ndarray of shape (n_samples, n_components)

Isomap coordinates \(\mathbf{y}_k\) of the training data.

embedded_centers_ndarray of shape (n_clusters, n_components)

FCM centers in the embedding.

medoid_indices_ndarray of shape (n_clusters,)

Samples closest to the centers in the embedding.

cluster_centers_ndarray of shape (n_clusters, n_features)

The re-projected centers X[medoid_indices_].

membership_, labels_, distances_, objective_, objective_history_, n_iter_

Of the FCM run in the embedding.

geodesic_objective_float

\(J\) evaluated with geodesic distances to the re-projected centers – the quantity the paper compares between the algorithms.

residual_variance_float

Share of the MDS eigenvalue mass not captured by the embedding.

geodesic_distances_, neighbors_graph_, n_components_, component_labels_, bridge_edges_

See GeodesicFCM.

Notes

New samples are embedded through their nearest training sample (predict_proba(), transform()): the proxy keeps training points exact and is adequate close to the manifold.

References

[1]

B. Feil, J. Abonyi, “Geodesic distance based fuzzy clustering”, in: Soft Computing in Industrial Applications, Advances in Soft Computing 39, Springer, 50–59, 2007.

[2]

J. B. Tenenbaum, V. de Silva, J. C. Langford, “A global geometric framework for nonlinear dimensionality reduction”, Science 290, 2319–2323, 2000.

Examples

>>> from fuzzyclust.graph import IsomapFCM
>>> from fuzzyclust.datasets import make_curved_manifold
>>> X, y = make_curved_manifold(n_samples=300, random_state=0)
>>> iso = IsomapFCM(n_clusters=2, n_neighbors=5, random_state=0).fit(X)
>>> iso.embedding_.shape, iso.cluster_centers_.shape
((300, 2), (2, 2))
fit(X, y=None)[source]#

Embed the data by Isomap, cluster the embedding with FCM, re-project the centers.

Parameters:
Xarray_like of shape (n_samples, n_features)
yIgnored
Returns:
selfobject

Examples using fuzzyclust.graph.IsomapFCM#

Geodesic paths, the S-curve, and clustering of the Isomap projection

Geodesic paths, the S-curve, and clustering of the Isomap projection