Two-dimensional design and analysis issues on the meridional surface, which is important in the preliminary design procedure of compressors, are highly dependent on the accuracy of empirical models, such as the prediction of total pressure loss model and turning flow angle. Most of the widely used models are derived or improved from experimental data of some specific cascades with low-loading and low-speed airfoil types. These models may work for most conventional compressors but are incapable of accurately estimating the performance for some specific cases like transonic compressors. The errors made by these models may mislead the final design results. Therefore, surrogate models are developed in this work to reduce the errors and replace the conventional empirical models in the through-flow calculation procedure. A group of experimental data considering a two-stage transonic compressor is used to generate the airfoils database for training the surrogate models. Sensitivity analysis is applied to select the most influential features. Two supervised learning approaches including support vector regression (SVR) and Gaussian process regression (GPR) are used to train the models with a Bayesian optimization algorithm to obtain the optimal hyper parameters. The trained models are integrated into the through-flow code based on streamline curvature method (SLC) to predict the overall performance and internal flow field of the transonic compressor on five rotational speed lines for validation. The predictions are compared with the experimental data and the results of conventional empirical models. The comparison shows that SVR and GPR respectively reduce the predicted error of empirical models by 62.2% and 55.2% for the total pressure ratio and 48.4% and 50.1% for adiabatic efficiency on average. This suggests that the surrogate models constitute an alternative way to predict the performance of airfoils in through-flow calculation where empirical models are inefficient.