Graph-Based Clustering and Data Visualization in PythonThe graphclust toolbox

Appendix B
From the MATLAB toolbox to graphclust

The algorithms of the 2013 monograph were distributed as a MATLAB toolbox organized in one folder per method. Table B.1 relates its functions to the classes and functions of graphclust. Three conventions differ throughout. First, data matrices have one row per sample, as in scikit-learn; several MATLAB functions expected one column per sample. Second, parameters with an initial and a final value are passed as tuples, for example eps=(0.3, 0.05) instead of epszi, epszf, and the number of iterations defaults to 200n. Third, randomness is controlled by random_state rather than by the global generator, so that every result is reproducible.

Table B.1: MATLAB functions and their counterparts in graphclust.

MATLAB toolbox

graphclust

kmeans

sklearn.cluster.KMeans; graphclust.LBG for codebook splitting

neural_gas, nglearning

NeuralGas

trn

TopologyRepresentingNetwork (additionally prune and edge_strength_)

dtrn

DynamicTopologyRepresentingNetwork

winn

WeightedIncrementalNetwork (node and edge weights returned)

—

GrowingNeuralGas, GrowWhenRequired (new)

mst_gg, mst, GGclust

HybridMSTGG, graphs.minimum_spanning_tree, fuzzy.GathGeva

MST_Clustering (treeclust, iterclust)

MSTClustering

validity, clustmeas

validity.dunn_mst_index, fukuyama_sugeno, fuzzy_hypervolume, clustering_rate

improve_JP, jarpat

fuzzy_neighborhood_similarity, FuzzyNeighborhoodClustering, JarvisPatrick

knngraph2

graphs.knn_graph, graphs.shared_neighbor_counts

displayVAT

vat.vat, vat.ivat

dijk, dijkstra, geo_dist

graphs.geodesic_distances

conn

graphs.connect_components

cmdscale, mdscale, mds

classical_mds, MetricMDS, NonMetricMDS

sammon

SammonMapping

LPP, constructW

LocalityPreservingProjection

Isomap, IsomapII

Isomap

isotop

Isotop (re-implemented from the original publication)

cca

CurvilinearComponentAnalysis, geodesic=True for CDA

oving, oving_mds

OnlineVisualizationNG

gnlp

GeodesicNLPNG

trnmap_comp, np_trnmap

TRNMap(mapping="metric"), TRNMap(mapping="nonmetric"), fine_tune=True

trustcont

metrics.trustworthiness_continuity

stress_sammon, stress_mds, stress_metr_mds

metrics.sammon_stress, metrics.mds_stress, metrics.residual_variance

figdrawn

plotting.plot_graph, plotting.plot_component_planes

dataloading, data files

datasets (load_boxlinecircle ships the original data)

The data sets Variety, ChainLink, and Curves of the monograph are replaced by generators with the same characteristics (make_variety, make_chainlink, make_curves); the numbers of samples agree, but the samples themselves differ, so results reported in this book do not reproduce the figures of the monograph point by point. The breast cancer data of scikit-learn is the 30-feature diagnostic version of the Wisconsin data, and the scikit-learn digits replace the Semeion digits.