In this study, optimal regression learner methods were used to predict the corrosion behavior of aluminum-silicon alloys (Al-Si) with various Si ratios in different media. Al-Si alloys with 0, 1%, 8%, 11.2%, and 15% Si were tested in different media with different pH values at different stirring speeds (0, 300, 600, 750, 900, 1050, and 1200 rpm). Corrosion behavior was evaluated via electrochemical potentiodynamic test. The corrosion rates (CRs) obtained from the corrosion tests were utilized in the formation of datasets of various machine regression learner optimization (MRLO) methods, namely, decision tree, support vector machine, Gaussian process regression, and ensemble method. Stirring speeds, solution pH, and Si ratio were adopted as inputs, whereas the CRs were employed as the outputs. These parameters were applied to build optimal models of the four MRLO methods. The regression learner methods were implemented and conducted in 2020b MATLAB/software regression learner toolbox. The MRLO methods were validated by comparing them with an artificial neural network (ANN) model. Experimental results showed that the CR of the Al-Si alloys increased with the increase in stirring speeds. The highest CR was recorded at pH 3.5. Moreover, the addition of Si to pure Al as a hypoeutectic alloy (1% and 8% Si) or a hypereutectic alloy (15% Si) improved the CR of pure Al. The CR in the solution containing only Al 2 O 3 particles with pH 7.75 was smaller compared with that of the solution containing H 2 SO 4 . The Gaussian process regression model had the highest CR prediction accuracy with the lowest minimum mean square error (0.000446607). The results demonstrated that the proposed GPR model was more effective than the ANN model.