## 4 Bayesian-Enhanced Least Squares Genetic Algorithm Optimization Method  
When integrating the research contents of Sections 2 and 3, there is a need for an optimization algorithm to address the stress distribution optimization problem, considering the errors and random fluctuations in the contact force. In this study, we introduce the BLSGAOM, an innovative approach that seamlessly integrates Genetic Algorithms (GAs) with Least Squares Boosting Models, as shown in Algorithm 1. Initially, GA parameters are established within specified bounds, after which an iterative optimization, steered by BLSGAOM's fitness function, adapts and fine-tunes these parameters. The specific settings for the input parameters are as follows: in the authors' previous study [29], three error values were identified as the input parameters, with their respective numeric bounds defined as [0 mm, 0.1 mm], [0 mm, 0.04 mm], and an unspecified range denoted by [0\({}^{\prime}\), 10\({}^{\prime}\)]. The three represent the bending deformation of the input crankshaft, the amount of pinion runout, and the hysteresis angle, respectively.  
Figure 7: Influence of maximum size on maximum equivalent stress (subjected to a force of 100 N vertically upwards).  
A salient feature of our BLSGAOM is its adept utilization of surrogate models during the Bayesian optimization phase. These surrogate models have become indispensable tools in engineering design, offering substantial advantages, especially when faced with computationally challenging tasks. The incorporation of surrogate models offers a dual benefit: they significantly reduce the computational overhead by efficiently approximating complex problem behaviors and provide flexibility, enabling the seamless application of classical optimization algorithms. This malleability helps to sidestep potential pitfalls such as local optima and high computational costs, which are often inherent to the original problem.  
Moreover, surrogate models enhance the interpretability of the foundational problem, making them invaluable in contexts where understanding the nuances of the problem is crucial. In scenarios characterized by expansive or intricate design spaces, these models proficiently navigate, identifying solutions that best align with specific criteria. Their inherent adaptability means they can easily assimilate new data, ensuring continuous refinement in their precision and efficiency.  
By leveraging the strengths of these surrogate models, BLSGAOM provides a judicious approximation to the true objective function. This methodological approach ensures thorough exploration and exploitation of the hyperparameter space without resorting to excessive evaluations of the primary objective. The culmination of this process is a refined model armed with optimal settings. To validate the robustness of our model, the predictions are critically assessed using a suite of error metrics, providing a holistic view of its performance and reliability. The optimized model is shown in Equation (17).  
\[\begin{array}{ll}\text{minimize}&f(b,f,d)=\max(\sigma(b,f,d))+\text{var}( \sigma_{\text{dist}}\left(b,f,d\right))\\ \text{s.t.}&0\leq\Delta_{b}\leq 0.1\\ &0\leq\Delta_{f}\leq 0.04\\ &0^{\prime}\leq\Delta_{d}\leq 10^{\prime}\end{array} \tag{17}\]  
where \(f(b,f,d)\) represents the objective function of optimization; \(\sigma(b,f,d)\) represents the maximum stress induced by the error terms; and \(\sigma_{\text{dist}}\left(b,f,d\right)\) represents the stress distribution caused by the error terms.