# Smart-Median: A New Real-Time Algorithm for Smoothing Singing Pitch Contours
## 6 Discussion
### Comparing the Results of Each Metric  
A higher R\({}^{2}\) value does not always mean a better fitting [44]. For example, Table 3 shows the R-squared scores of three series of predicted data. According to the R-squared (R\({}^{2}\)) scores in Table 3, the order of the best prediction to the worst was 4, 3, 2, then 1. However, Predict 3 estimated two wrong notes, such that each was one tone above the corresponding ground truth notes (A2 instead of G2), while Predicts 1 and 2 each had only one wrong estimated note (B2 instead of A2). Therefore, musically, the third was the worst, but based on R-squared, it was the second-best. In addition, musically, Predict 1 and Predict 2 were similar, and the 0.2 Hz pitch frequency difference could easily have resulted from a different method of F0 tracking, but their R-squared scores were different. In conclusion, we cannot compare two series of smoothed pitches based only on R-squared.  
According to the RMSE and MAE columns in Table 3, the best to worst series were 4, 2, 1, then 3. This order is better than that based on R-squared. However, musically, we need to consider the similarity of Predict 1 and Predict 2; based on the FFE column in Table 3, Predicts 1 and 2 both had the same value. As shown in Table 3, Predict 4 was the best according to all the metrics, and musically, it was also the best. Moreover, although Predicts 1 and 2 were musically similar (FFE metric), Predict 2 was more accurate than Predict 1 (R\({}^{2}\), RMSE, and MAE metrics).  
\begin{table}
\begin{tabular}{c c c c c} \hline \hline  & **Best** & **Normal** & **Worst** \\  & **Code (Value)** & & **Code (Value)** \\ \hline \multirow{3}{*}{MAE} & 0 (85.71) & Avg = 162.56 & Std = 21.25 & \\  & 33 (13.85) & Min = 141.31 & Max = 183.81 & 09 (190.95) \\  & 35 (13.1) & All the other algorithms & & \\ \hline \multirow{6}{*}{R\({}^{2}\)} & 00 (\(-0.72\)) & Avg = \(-58.01\) & Std = 21.98 & 02 (\(-80.79\)) \\  & 10 (\(-31.59\)) & Min = \(-79.99\) & Max = \(-36.03\) & 03 (\(-28.22\)) \\  & 18 (\(-34.07\)) & & & 04 (\(-80.81\)) \\  & 18 (\(-26.9\)) & & & 07 (\(-87.46\)) \\  & 19 (\(-34.7\)) & & & 17 (\(-80.81\)) \\  & 20 (\(-34.07\)) & & All the other algorithms & 26 (\(-80.75\)) \\  & 21 (\(-32.46\)) & & & 30 (\(-87.66\)) \\ \hline \multirow{3}{*}{RMSE} & 00 (90.67) & Avg = 275.62 & Std = 53.1 & 07 (338.41) \\  & 18 (209.56) & Min = 222.52 & Max = 328.72 & 26 (343.63) \\  & 21 (220.12) & All the other algorithms & & 30 (339.59) \\ \hline \multirow{6}{*}{FFE} & 00 (74.73) & Avg = 57.96 & Std = 8.35 & 10 (44.83) \\  & 02 (66.21) & Min = 49.24 & Max = 65.94 & 13 (48.24) \\ \cline{1-1}  & 03 (66.67) & & & 14 (48.6) \\ \cline{1-1}  & 04 (66.22) & & & 18 (48.47) \\ \cline{1-1}  & 07 (66.48) & & & 19 (48.24) \\ \cline{1-1}  & 17 (66.22) & & & 20 (48.24) \\ \cline{1-1}  & 33 (71.87) & & & 22 (48.24) \\ \cline{1-1}  & 35 (71.99) & & & & \\ \hline \hline \end{tabular}
\end{table}
Table 2: Dividing the contour smoother algorithms into three categories (best, normal, and worst) based on the standard deviation.  
\begin{table}
\begin{tabular}{c c c c c c c c c} \hline \hline  & **1 st** & **2 nd** & **3 rd** & **4 th** & **5 th** & **R\({}^{2}\) Score** & **RMSE** & **MAE** & **FFE** \\ \hline
**Ground Truth** & 98 (G2) & 98 (G2) & 110 (A2) & 98 (G2) & 98 (G2) & NA & NA & NA & NA \\
**Predict 1** & 98.2 (G2) & 98.2 (G2) & 123.2 (B2) & 98.2 (G2) & 98.2 (G2) & \(-0.61\) & 5.91 & 2.8 & 0.8 \\
**Predict 2** & 98 (G2) & 98 (G2) & 123 (B2) & 98 (G2) & 98 (G2) & \(-0.56\) & 5.81 & 2.6 & 0.8 \\
**Predict 3** & 98 (G2) & 110 (A2) & 110 (A2) & 110 (A2) & 98 (G2) & \(-0.33\) & 7.59 & 4.8 & 0.6 \\
**Predict 4** & 98.2 (G2) & 98.2 (G2) & 110.2 (A2) & 98.2 (G2) & 98.2 (G2) & 0.999 & 0.2 & 0.2 & 1 \\ \hline \hline \end{tabular}
\end{table}
Table 3: Comparison of metrics in different series of predicted data.  
To conclude, a single metric alone cannot provide a clear and accurate evaluation to compare pitch contours, but a firm conclusion can be reached by using all of them.