Skip to Main Content
The nearest centroid classifier (NCC) is based on finding the arithmetic means of the classes from the training instances and unseen-class instances are classified by measuring the distance to these means. It may work well if the classes are well separated which is not the case for many practical datasets. In this paper, particle swarm optimization (PSO) is utilized to find the centroids under an objective function to minimize the error of classification. Three different measures are investigated namely the Euclidean distance, the Mahalanobis distance and a weighted distance to represent the distance function. The performance is tested on eight practical datasets. Simulation results show that the PSO based centroid classifier improves the classification results especially for datasets that the basic NCC does not handle well.