 This paper presents a novel thermal error modeling technique for computer numerical control, CNC, machine tools. It uses a combination of particle swarm optimization, PSO, radial basis function neural networks, RBFNN, and K-means clustering algorithm to identify temperature-sensitive variables and then use them to build a more accurate thermal error model. The results show that the proposed method outperforms existing techniques in terms of predictive accuracy and robustness. This article was authored by Zhiming Feng, Xinglong Min, Wei Jiang, and others.