To effectively realize fast and high accurate measurements of flatness error on the surface of machining workpiece, multiple sets of actual machining experimental data are used as samples, a soft-sensing model of flatness error on the surface of machining workpiece is established by using the speed n, the moving speed of carriage uy and the voltage U of piezoelectric ceramic micro-feed drive as arguments with SVM(Support Vector Machine), and adaptive genetic algorithm is used to optimize the allowable error ε, the number of positive gasification rules c and the parameters of kernel function r, the results of training, testing and practical application show, after the optimization of 200 steps, training mean relative error which became saturated is 3.4%, testing relative error is less than 2.6%, the range of average relative error between the soft measurement value of flatness error on the surface of machining workpiece and the test value of L-730 laser flatness measuring instrument is 1.2% to 2.4%.