# Deep-Learning Algorithms for Prescribing Insoles to Patients with Foot Pain
## 2 Methods
### Deep-Learning Algorithms  
Sequential deep neural networks (DNNs) were applied for classification and sequential DNN-based regression algorithms (Supplementary Materials). TensorFlow 2.9.1 with Keras, Python 3.8.1, and Scikit-learn 1.1.1. were used to train two DNN regression models (right and left feet) for automatic prescriptions of the foot posture index for the modified root technique and five DNN classification models to determine the application of heel lift, entire lift, and lateral wedge, medial wedge, and calcaneocuboid arch supports. Among the study population, 70% (n = 586) and 30% (n = 252) were included in the training and validation sets, respectively. The details of each model are listed in Tables 1-6. Table 1 shows the application of deep-learning regression to determine the foot posture index. This approach is particularly effective because of its capability to handle complex and non-linear associations between inputs and outputs, making it an optimal solution for determining the foot posture index using continuous values. The mean absolute error (MAE) and root mean square error (RMSE) were used to validate the performance of the two regression models. Figure 2: Photographs of (**A**) heel lift, (**B**) entire lift, and (**C**) lateral wedge, (**D**) medial wedge, and (**E**) calcaneocuboid arch supports. \begin{table}
\begin{tabular}{c l l l l} \hline \multicolumn{4}{c}{**Prescription Left DNN Regression Model**} & \multicolumn{2}{c}{**Prescription Right DNN Regression Model**} \\ \hline \multirow{4}{*}{DNN model} & - Four hidden layers with 256-128-128-64 neurons & - Five hidden layers with 512-512-1024-1024-512 neurons \\  & - RMSProp optimizer, ReLU activation & - RMSProp optimizer, ReLU activation \\  & - Learning rate \(1\times 10^{-5}\), batch size 512 & - Learning rate \(2\times 10^{-3}\), batch size 512 \\  & - Batch normalization for regularization & - Batch normalization for regularization \\ \hline Model & - MAE 1.460, RMSE 3.539 for training & - MAE 1.560, RMSE 3.860 for training \\  & - MAE 1.408, RMSE 3.365 for validation & - MAE 1.601, RMSE 3.549 for validation \\ \hline \multicolumn{4}{c}{DNN, deep neural network; RMSProp, root mean squared propagation; ReLU, rectified linear unit; MAE, mean absolute error; RMSE, root mean square error.} \\ \end{tabular}
\end{table} 
Table 1: Details of the model for determining the foot posture index for the modified root technique. \begin{table}
\begin{tabular}{c l l l l l} \hline \multicolumn{4}{c}{**Prescription Left DNN Regression Model**} & \multicolumn{2}{c}{**Prescription Right DNN Regression Model**} \\ \hline \multirow{4}{*}{DNN model} & - Four hidden layers with 256-128-128-64 neurons & - Five hidden layers with 512-512-1024-1024-512 neurons \\  & - RMSProp optimizer, ReLU activation & - RMSProp optimizer, ReLU activation \\  & - Learning rate \(1\times 10^{-5}\), batch size 512 & - Learning rate \(2\times 10^{-3}\), batch size 512 \\  & - Batch normalization for regularization & - Batch normalization for regularization \\ \hline Model & - MAE 1.460, RMSE 3.539 for training & - MAE 1.560, RMSE 3.860 for training \\  & - MAE 1.408, RMSE 3.365 for validation & - MAE 1.601, RMSE 3.549 for validation \\ \hline \multicolumn{4}{c}{DNN, deep neural network; RMSProp, root mean squared propagation; ReLU, rectified linear unit; MAE, mean absolute error; RMSE, root mean square error.} \\ \end{tabular}
\end{table} 
Table 1: Details of the model for determining the foot posture index for the modified root technique.