graphclust.manifold.TRNMap#

class graphclust.manifold.TRNMap(n_nodes=100, *, n_components=2, mapping='metric', fine_tune=False, normalize=True, max_iter=None, eps=(0.3, 0.05), lam=None, lifetime=None, prune=True, alpha=(0.3, 0.01), sigma=None, random_state=None)[source]#

Bases: _NodeMapper

Topology representing network map (Vathy-Fogarassy, Kiss and Abonyi 2008).

  1. The data are scaled to the unit hypercube (normalize=True).

  2. A TopologyRepresentingNetwork with n_nodes nodes (initialized on random samples) quantizes the data and learns their topology; prune removes links that no sample supports at the end of training.

  3. Disconnected parts of the graph are joined by their shortest inter-component edges.

  4. Geodesic distances between the nodes are computed along the graph.

  5. The graph is mapped to n_components dimensions by metric MDS (mapping="metric", the distance-preserving DP-TRNMap), non-metric MDS ("nonmetric", the neighborhood-preserving NP-TRNMap) or classical MDS ("classical").

  6. Optionally (fine_tune=True) the positions are refined online towards the geodesic distances as in GNLP-NG.

The node vectors provide component planes (graphclust.plotting.plot_component_planes()); the nodes are natural prototypes for clustering the map.

Attributes:
nodes_ (in the scale of the input data), adjacency_ (original TRN graph),
connected_adjacency_, dist_matrix_ (geodesic), embedding_, trn_ (fitted network).