The theory of tune feedback correction and the principle of a feedback algorithm based on machine learning are introduced, with a focus on the application of lasso regression for tune feedback correction. Simulation verification and online feedback correction results are presented. The results show that, after applying machine learning, the feedback accuracy of the tune feedback system was higher, and the betatron tune stability was further improved.