graphclust.vq.GrowingNeuralGas#
- class graphclust.vq.GrowingNeuralGas(max_nodes=100, *, max_iter=None, eps_b=0.05, eps_n=0.006, max_age=50, lambda_=100, alpha=0.5, d=0.995, init='sample', random_state=None)[source]#
Bases:
BaseTopologyLearnerGrowing neural gas (GNG; Fritzke 1995).
Starts with two nodes and grows: the winner \(s_1\) of each drawn sample accumulates the squared error, moves towards the sample with step \(\varepsilon_b\), its graph neighbors with \(\varepsilon_n\); \(s_1\) and the second nearest node \(s_2\) are linked (age 0), edges older than
max_ageare deleted together with the nodes left isolated, and everylambda_steps a new node is inserted halfway between the node \(q\) with the largest error and its neighbor \(f\) with the largest error. Errors decay byalphaat insertion and bydin every step. Training stops aftermax_itersteps or whenmax_nodesis reached.