graphclust.vq.GrowWhenRequired#
- class graphclust.vq.GrowWhenRequired(*, activity_threshold=0.9, habituation_threshold=0.1, eps_b=0.1, eps_n=0.01, tau_b=0.3, tau_n=0.1, max_age=50, max_nodes=500, n_epochs=5, init='sample', random_state=None)[source]#
Bases:
BaseTopologyLearnerGrow when required network (GWR; Marsland, Shapiro and Nehmzow 2002).
A node is inserted as soon as the winner represents the current sample poorly, not at fixed intervals: when the activity \(a=\exp(-\|\mathbf{x}-\mathbf{w}_{s_1}\|)\) is below
activity_thresholdand the winner has already been trained (its habituation \(h_{s_1}\) has dropped belowhabituation_threshold), a new node is placed at \((\mathbf{w}_{s_1}+\mathbf{x})/2\) and linked to \(s_1\) and \(s_2\). Otherwise the winner and its neighbors move towards the sample with steps proportional to their habituation, which decays towards zero with use. Edges age as in GNG. GWR reacts quickly to new regions of the input space, which makes it popular for streaming data and robotics.activity_thresholdrefers to data scaled to roughly unit range.