Abstract:The difficulty in maintaining high prediction accuracy ofmachine tool thermal error prediction models under different working conditions is an important reason for thermal errors' poor actual compensation effect. This article proposes a modeling method for the thermal error of machine tools under different working conditions based on transfer learning. Firstly, the kernel mean matching algorithm is used to obtain the transfer weight between machine tool temperature data under different working conditions. And a thermal error modeling method based on transfer learning is proposed. Furthermore,the significance of differencesin thermal error data under different working conditions is tested, and a thermal error prediction modelis formulated by using the proposed method to analyze the modeling effect. Then, the actual prediction performance of the proposed modeling method and commonly used modeling methods are compared and analyzed. Finally, the compensation validation experiments areconducted to evaluate the effectiveness of the proposed method. The results show that the modeling method based on transfer learning proposed in this paper can effectively improve the modeling effect. The prediction accuracy and robustness of transfer learning combined with the LASSO algorithm under different working conditions reach 3.73 and 1.14 μm,respectively. After compensation,the thermal errors in the X/Y/Z directions of the machine tool remain within -2.3~3.1 μm,-3.4~3.9μm,and-3.3~4.6 μm,respectively.