  Spike sorting plays an irreplaceable role in understanding brain codes.
Traditional spike sorting technologies perform feature extraction and
clustering separately after spikes are well detected. However, it may often
cause many additional processes and further lead to low-accurate and/or
unstable results especially when there are noises and/or overlapping spikes in
datasets. To address these issues, in this paper, we proposed a unified
optimisation model integrating feature extraction and clustering for spike
sorting. Interestingly, instead of the widely used combination strategies,
i.e., performing the principal component analysis (PCA) for spike feature
extraction and K-means (KM) for clustering in sequence, we unified PCA and KM
into one optimisation model, which reduces additional processes with fewer
iteration times. Subsequently, by embedding the K-means++ strategy for
initialising and a comparison updating rule in the solving process, the
proposed model can well handle the noises and/or overlapping interference.
Finally, taking the best of the clustering validity indices into the proposed
model, we derive an automatic spike sorting method. Plenty of experimental
results on both synthetic and real-world datasets confirm that our proposed
method outperforms the related state-of-the-art approaches.
