Skip to main content

Table 2 Algorithm of stream-based Hebbian Eigenfilter for spike sorting

From: Stream-based Hebbian eigenfilter for real-time neuronal spike discrimination

Input:
Neuronal spikes, x (i) ;
Initial synaptic weight, W (1) ;
Learning rate, η;
Output:
Principal components of neuronal spikes, W (N) ;
1. Initialize synaptic weight W (1) and learning rate η, j = 1
2. Calculate the mean vector of n aligned spikes
   a. i= 1, μ =0
    b. When new spike x (i) arrives μ = μ + x (i)
    c. If i equals to n, μ = μ /n, and go to step 3. Otherwise i = i + 1, go to Step 2.b
3. When new spike arrives, subtract the mean vector obtained from step 2
    x (i) = x (i) - μ i > n
4. Perform Hebbian x learning on x (i)
    y (j) = W (j) x (i)
    LT(j) = LT y (j) y T (j)
    dW(j) =  η y (j) x T ( i ) - LT(j) W (j)
    W (j + 1) = W (j) + dW(j)
5. If j= N, the algorithm stops, otherwise j = j + 1, go to step 3