# Data-Driven Identification of Crane Dynamics Using Regularized Genetic Programming
## 3 Experiment and Results
### \(\lambda\) Hyperparameter Selection  
In (5), hyperparameter \(\lambda\) determines the level of sparsity of the coefficient vector \(\theta\) and, therefore, needs to be selected appropriately. In this section, we compare optimizing hyperparameter \(\lambda\) based on grid search 3-fold cross-validation and setting a constant \(\lambda\), which was selected empirically, throughout the G3P-SR run. In the case of the grid search, it was important to determine the value of \(\lambda\) for which the zero vector would be a critical point of (5). Since the model terms' initial values were set to zero, we obtained  
\[\eta\phi^{T}y\leq\sqrt{2\lambda\eta} \tag{8}\]  
The step size \(\eta\) was not constant in Algorithm 1, but, since the initial value was chosen to be \(\eta=1/L\), where \(L\) was the Lipschitz constant which, for (5), was given by \(L=\sigma_{max}(\phi)^{2}\),where \(\sigma_{max}(\cdot)\) was the largest singular value, we could obtain  
\[\lambda\geq\frac{\eta\text{max}\big{(}\phi^{T}y\big{)}^{2}}{2} \tag{9}\]  
Therefore, in the interval \(0\leq\lambda<\frac{\eta\text{max}\big{(}\phi^{T}y\big{)}^{2}}{2}\), we had a non-zero vector of model term coefficients. For the 3-fold cross validation, four values of \(\lambda\) were chosen, logarithmically spaced, from the interval \(\frac{\eta\text{min}\big{(}\phi^{T}y\big{)}^{2}}{2}\leq\lambda\leq 0.65 \frac{\eta\text{max}\big{(}\phi^{T}y\big{)}^{2}}{2}\). The coefficient 0.65 was chosen, as values closer to the limit \(\frac{\eta\text{max}\big{(}\phi^{T}y\big{)}^{2}}{2}\) tend to have very few model terms included. In order to promote sparsity, the value of \(\lambda\) chosen from the 3-fold CV was the value within one standard deviation from \(\lambda\) that resulted in the minimum MSE. \begin{table}
\begin{tabular}{c c} \hline \hline
**Parameters** & **Values** \\ \hline Population size & 100 \\ Number of generations & 500 \\ Initialization method & PTC2 \\ Max tree depth during initialization & 6 \\ Max number of candidate model terms & 50 \\ Tournament size & 2 \\ Subtree crossover probability & 0.75 \\ High-level crossover probability & 0.15 \\ Mutation probability & 0.1 \\ Max number of prox. evaluations iterations & 5000 \\ \hline \hline \end{tabular}
\end{table} 
Table 4: G3P-SR hyperparameters. \begin{table}
\begin{tabular}{c c l} \hline \hline \(\mathbf{(S)}\) & \(\mathbf{:=}\) & \(\left\langle\mathbf{exp_{b1}}\right\rangle\mathbf{(T)}\) \\ \hline \(\left\langle\exp_{b1}\right\rangle\) & \(\mathbf{:=}\) & \(\times\left\langle\exp_{b1}\right\rangle\left\langle\exp_{b1}\right\rangle \left\lvert\times\left\langle\exp_{p}\right\rangle\right\rangle\left\lvert \exp_{b1}\right\rangle\left\lvert\Upsilon\right\rangle\) \\ \(\left\langle\exp_{u}\right\rangle\) & \(\mathbf{:=}\) & \(\mathbf{:=}\) \\ \(\left\langle\exp_{b2}\right\rangle\) & \(\mathbf{:=}\) & \(\mathbf{:=}\) \\ \(\left\langle\exp_{b2}\right\rangle\) & \(\mathbf{:=}\) & \(\mathbf{:=}\) \\ \(\left\langle\exp_{p}\right\rangle\) & \(\mathbf{:=}\) & \(\mathbf{:=}\) \\ \(\left\langle\text{int}\right\rangle\) & \(\mathbf{:=}\) & \(\mathbf{:=}\) \\ \(\left\langle\text{T}\right\rangle\) & \(\mathbf{:=}\) & \(\mathbf{:=}\) \\ \(\left\langle\text{T}\right\rangle\) & \(\mathbf{:=}\) & \(\mathbf{:=}\) \\ \(\left\langle\text{T}_{i}\right\rangle\) & \(\mathbf{:=}\) & \(\mathbf{:=}\) \\ \(\left\langle\text{T}_{p}\right\rangle\) & \(\mathbf{:=}\) & \(\mathbf{:=}\) \\ \hline \hline \end{tabular}
\end{table} 
Table 3: Grammar used to obtain the sway model. To determine if the 3-fold CV resulted in better models for describing crane dynamics as opposed to a constant \(\lambda\), a total of 10 runs were carried out for the identification of the crane velocity submodel, with the constant \(\lambda=0.001\). The Wilcoxon rank sum test was performed to determine if the medians of the RMSE obtained with a constant \(\lambda\) or \(\lambda\) obtained via cross-validation were equal under the null hypothesis.