## 1 Introduction  
Extracellular electrophysiology is a key method in neuroscience for recording brain activity, as detailed in [1]. With this technique, the electrodes are placed in the brain's cortex, and the action potentials, or \"spikes\", are recorded from nearby neurons. Through this technique, researchers can gain access in real time to the brain activities. However, the challenge lies in the noisy nature of brain signals and the presence of multiple spikes from adjacent neurons, which make it difficult to determine the specific source of each spike. To address this issue, researchers have developed spike-sorting algorithms that categorize these spikes into distinct clusters or classes. Traditionally, these algorithmsconsist of a series of stages: filtering raw data, detection of spikes, feature extraction of dominant features, and, finally, clustering of spikes according to their specific features [2]. Current research methods enhance these stages by incorporating new algorithms at each step. However, the effectiveness of spike sorting still largely depends on the clustering method's ability to separate different spikes efficiently. Within this research, the main focus will be on developing a new clustering algorithm to improve this aspect. Clustering algorithms, established and utilized for decades, are fundamental in data analysis [3]. The K-means algorithm, a well-recognized method introduced by [PERSON] et al. in 1967 [4] and later applied to spike sorting in 1988, is a prime example [5]. In K-means clustering, one can select the number of clusters (K) and initialize centroids within the data points. These centroids are then adjusted iteratively to minimize variance within each cluster. Despite its long-standing use and simplicity, the K-means algorithm faces challenges, particularly in initializing the centroids correctly and determining the right number of clusters, which can lead to inaccurate results. In addition to that, it is not applicable for unsupervised clustering. However, it remains a popular method in spike sorting, with various adaptations [6, 7]. In contrast to traditional K-means algorithm, the fuzzy C-means (FCM) algorithm was developed by [PERSON] et al. [8] in 1984, and offers a different approach based on soft computing. FCM allows data points to belong to several clusters, each with varying degrees of membership. The membership level of each data point is assigned as 0 or 1, where 1 indicates that the data point is closer to the centroid of the cluster and 0 indicates that the data point is far from the cluster centroid point. The algorithm's goal is to minimize the weighted sum of the squared distances from each data point to its respective cluster center, where the weights are based on the membership levels. In 2000, [PERSON] et al. [9] presented the first FCM application for spike sorting. Subsequently, various enhanced versions of FCM have been introduced for the clustering applications mentioned in [10]. The DBSCAN (density-based spatial clustering) [11] offers a density-based clustering alternative. DBSCAN, unlike K-means, does not require users to predefine the number of clusters. It determines clusters by estimating the local density of data points, relying mainly on two parameters: \"epsilon\", a distance threshold, and \"Minpts\", the minimum number of points needed for a dense region. In DBSCAN, clusters are formed by examining all data points within an epsilon distance of an arbitrary point and meeting the Minpts criteria. DBSCAN is known for its robustness against outliers, though selecting the appropriate \"epsilon\" and \"Minpts\" values remains a challenge. Similarly, [PERSON] et al. [12] introduced HDBSCAN (hierarchical density-based spatial clustering), an extension of DBSCAN. HDBSCAN, like DBSCAN, identifies clusters based on the density of data points but adds a hierarchical structure based on varying density levels, allowing for more refined cluster selection by the user.