Super-paramagnetic clustering (SPC) is a Monte Carlo iteration of the Potts model, a generalization of the Ising Model. SPC clustering is performed by evaluating simulated interactions (states) between individual data points and their respective K-nearest neighbors. In the context of spike sorting, this method was originally proposed by, where it was demonstrated that the data points from features in the same cluster, i.e. with similar spike waveforms, changed their states together and presented strong interactions, thereby facilitating classification. There are two steps to cluster spike waveforms with SPC. In the first step, the interaction strength between a pair of K-nearest neighbors and is defined as
where is a point in an ?-dimensional phase-space formed by the ? = 10 principal components of each spike waveform ?, and a is the average nearest-neighbors distance. In the second step, the simulated interactions are formed with respect to a varying temperature ? by running Monte Carlo iterations of the Wolf Algorithm . This method is based on the magnetic behavior of a spin glass, a disordered magnet. The system can be either in para-, ferro-, or super-paramagnetic state depending on the transition temperature that influences the individual interactions. In extreme cases, the magnets can switch states randomly despite their particle interactions (individually), or update their states jointly (single cluster) for high or low ? respectively. Notwithstanding, there exists an optimum range for ? where magnets (particles) grouped together change simultaneously and accurate clustering can be achieved. In the context of spike sorting, the behavior of the spin glass is mimicked through changes to the initial configuration of ? states. The states are formed given the interaction strength between neighbor pairs, the wavelet coefficients of different spikes. In this configuration, the state of a randomly selected point is changed to a new randomly selected state , and the state change produces a cascade reaction for the neighbors of the point with a state change probability,A frontier is created by the neighbors with state updates during an iteration until these no longer update . The state change probability of the points in the frontier is recalculated, and the frontier is updated. This process is repeated until the frontier no longer changes, at which point the process is restarted from a different random point and repeated several times. A threshold ? can be employed to evaluate pair-wise point correlations and determine whether a pair of points that remained close throughout the various temperate changes corresponds to the same cluster. The variables ? = 20, ? = 11, ? = 500, and ? = 0.5 resulted in accurate classification for every spike waveform in the revised extracellular recording. The sorting process was verified for every cluster by calculating the point to point deviation for every spike waveform in a cluster with respect to the cluster template, the average of all the spike waveforms in that cluster.