Skip to main content
. 2020 Oct 23;20(21):6033. doi: 10.3390/s20216033
Algorithm 1 Neuron agglomerative clustering.
  • 1:

    For each layer l in the network:

  • 2:

    Let neuil=[Wi,1l,Wi,2l,Wi,3l,,Wi,nl1l,bil];

  • 3:

    Construct neuron set Sl={neu1l,neu2l,neu3l,,neunll};

  • 4:

    Cluster the neurons in set Sl into kl groups using agglomerative clustering;

  • 5:

    Construct a set of cluster centroids Pl={p1l,p2l,p3l,,pkll};

  • 6:

    Agglomerate neurons of the same cluster into its cluster centroid;

  • 7:

    Remember the agglomerating list Rl=[r1l,r2l,r3l,,rnll];

  • 8:

    Calculate W˜i,pl+1=j=1nlI(rjl=p)Wi,jl+1, i=1,,nl+1, p=1,,kl, where I(·) is the indication function;

  • 9:

    Agglomerate connections of layer l+1 into W˜i,pl+1. Bias remains unchanged.