graphclust.vq#

Vector quantization and topology learning.

The estimators of this module replace the \(N\) samples by \(n\ll N\) representatives (codebook vectors, nodes, neurons) \(\mathbf{w}_1,\dots,\mathbf{w}_n\) and, except for LBG, also learn a graph over them that reflects the topology of the data. They share one interface (BaseTopologyLearner):

fit(X) sets

nodes_ (n, D) representatives, adjacency_ symmetric sparse graph weighted by the Euclidean edge lengths, labels_ index of the nearest node of every training sample, n_nodes_, n_edges_.

Fitted learners provide predict(X), transform(X), quantization_error(X) and graph_distances().

All the incremental algorithms draw one sample per iteration, so their results depend on random_state; the parameter schedules use graphclust._utils.decay().

LBG, neural gas, topology representing networks and growing networks.

Classes#

BaseTopologyLearner()

Common interface of the vector quantizers and topology learners.

DynamicTopologyRepresentingNetwork(*[, ...])

Dynamic topology representing network (DTRN; Si, Lin and Vuong 2000).

GrowWhenRequired(*[, activity_threshold, ...])

Grow when required network (GWR; Marsland, Shapiro and Nehmzow 2002).

GrowingNeuralGas([max_nodes, max_iter, ...])

Growing neural gas (GNG; Fritzke 1995).

LBG([n_nodes, delta, max_iter, tol, graph, ...])

Linde--Buzo--Gray vector quantizer: k-means with codebook splitting.

NeuralGas([n_nodes, max_iter, eps, lam, ...])

Neural gas vector quantization (Martinetz and Schulten 1991).

TopologyRepresentingNetwork([n_nodes, ...])

Topology representing network (TRN; Martinetz and Schulten 1994).

WeightedIncrementalNetwork([n_nodes, ...])

Weighted incremental neural network (WINN; Muhammed 2004).