AbstractAmong the data clustering algorithms, the k-means (KM) algorithm is one of the most popular clustering techniques because of its simplicity and efficiency. However, KM is sensitive to initial centers and it has a local optima problem. The k-harmonic means (KHM) clustering algorithm solves the initialization problem of the KM algorithm, but it also has a local optima problem. In this paper, we develop a new algorithm for solving this problem based on a modified version of particle swarm optimization (MPSO) algorithm and KHM clustering. In the proposed algorithm, MPSO is equipped with the cuckoo search algorithm and two new concepts used in PSO in order to improve the efficiency, fast convergence, and escape from local optima. MPSO updates the positions of particles based on a combination of global worst, global best with personal worst, and personal best to dynamically be used in each iteration of the MPSO. The experimental result on eight real-world data sets and two artificial data sets confirms that this modified version is superior to KHM and the regular PSO algorithm. The results of the simulation show that the new algorithm is able to create promising solutions with fast convergence, high accuracy, and correctness while markedly improving the processing time.