# Deep-Learning Algorithms for Prescribing Insoles to Patients with Foot Pain
## 4 Results  
In total, 838 patients (mean age, 47.7 \(\pm\) 14.7 years; 323 men, 515 women) were included. Regarding the foot posture index for the modified root technique, for the left foot, the mean absolute error (MAE) and root mean square error (RMSE) of the validation dataset for the developed model were 1.408 and 3.365, respectively (Table 1). For the right foot, the MAE and RMSE of the validation dataset for the developed model were 1.601 and 3.549, respectively (Table 1). The accuracy of applying heel lift was 89.7%, and the macro- and micro-average ROC AUC values were 0.961 and 0.949, respectively (Figure 3A). The accuracy of applying entire lift was 94.8%, and the macro- and micro-average ROC AUC values were 0.933 and 0.941, respectively (Figure 3B). The accuracy of applying lateral wedge support was 72.2%, and the macro- and micro-average ROC AUC values were 0.804 and 0.826, respectively (Figure 3C). The accuracy of applying medial wedge support was 98.4%, and the macro- and micro-average ROC AUC values were 0.863 and 0.792, respectively (Figure 3D). The accuracy of applying calcaneocuboid arch support was 79.8%, and the macro- and micro-average ROC AUC values were 0.837 and 0.827, respectively (Figure 3E).  
Figure 4 shows the correct classification and misclassification of the DNN models. The model for the application of heel lift and entire lift correctly classified 226 and 239 of 252 cases, respectively, from the validation dataset. The model for the application of medial and lateral wedge supports correctly classified 182 and 248 of 252 cases, respectively, from the validation dataset. Lastly, the model for the application of calcaneocuboid arch support correctly classified 201 of 252 cases from the validation dataset. It can be concluded that the overall classification accuracy of the five models is good. However, the medial wedge model (Figure 4D) has lower accuracy for classes 1 and 2 due to a small sample size of patients in the validation data for those classes, resulting in inadequate learning.  
\begin{table}
\begin{tabular}{c c c c c c} \hline \hline \multirow{2}{*}{Sample size and ratio} & - 70\% for training: 586; 30\% for validation: 252; total: 838 & & & \\  & - Class 0: 412 (70.3\%), class 1: 36 (6.1\%), class 2: 138 (23.6\%) for training & & & \\  & - Class 0: 177 (70.2\%), class 1: 16 (6.4\%), class 2: 59 (23.4\%) for validation & & & \\ \hline \multirow{4}{*}{DNN model} & - Four hidden layers with 1024-512-256-128 neurons & & & \\  & - RMSProp optimizer, ReLU activation & & & \\  & - Learning rate 2 \(\times\) 10\({}^{-3}\), batch size 128 & & & \\  & - Dropout layer for regularization & & & & \\  & - Training accuracy: 88.7\%, validation accuracy: 79.8\% & & & \\ \hline \multirow{4}{*}{Model performance (validation data)} & Class & Recall & F1-score & Support & ROC AUC \\ \cline{2-6}  & 0 & 0.868 & 0.853 & 0.860 & 177 & 0.824 \\ \cline{2-6}  & 1 & 0.684 & 0.812 & 0.743 & 16 & 0.859 \\ \cline{1-1} \cline{2-6}  & 2 & 0.627 & 0.627 & 0.627 & 59 & 0.828 \\ \cline{1-1} \cline{2-6}  & \multicolumn{1}{c}{} & Macro average & 0.726 & 0.764 & 0.743 & 252 & 0.837 \\ \cline{1-1} \cline{2-6}  & \multicolumn{1}{c}{} & Micro average & 0.800 & 0.798 & 0.798 & 252 & 0.827 \\ \hline \hline \end{tabular}
\begin{tabular}{c} DNN, deep neural network; RMSProp, root mean squared propagation; ReLU, rectified linear unit; ROC, receiver operating characteristic; AUC, area under the curve; class 0, no application; class 1, application of calcaneocuboid arch support to the right side; class 2: application of calcaneocuboid arch support to the left side. \\ \end{tabular}
\end{table}
Table 6: Details of the model for determining the application of calcaneocuboid arch support.  
Figure 3: Receiver operating characteristic curve of the validation dataset of the deep-learning models for the prescription of orthotic insoles. (**A**) heel lift (**B**) entire lift (**C**) lateral wedge (**D**) medial wedge (**E**) calcaneocuboid arch.