# Object-Based Time-Constrained Dynamic Time Warping Classification of Crops Using Sentinel-2
## 3 Results
### DTW Dissimilarity Results  
The implemented workflow delivered two maps, a categorical classification of SITS (Figure 8) and a map of DTW dissimilarity values (Figure 9). The latter can be seen as a map of uncertainty for classification and depicts the DTW dissimilarity values of the classified objects, which represents the final values from the bottom right corner of the DTW matrix. This map is useful to understand which objects had a strong similarity with the assigned class (values closer to 0) or had a doubtful assignment to one of the target classes (the largest values). High values can be also a sign of high intra-class heterogeneity of temporal patterns. In our case, the DTW dissimilarity values for best single-band classifications ranged from 0 to 4 for DTW30 in TA1 and from 0 to 5.1 for DTW45 in TA2, with higher values corresponding to complex temporal patterns, like alfalfa in TA1 and double crop in TA2. Higher DTW dissimilarity values can also be attributed to the presence of other classes that were not considered in this study due to their unrepresentativeness and, therefore, had a distinct pattern than those of our target classes. For comparison purposes, Figure 9 shows the DTW dissimilarity values normalized using a min-max normalization approach. \begin{table}
\begin{tabular}{c c c c c} \hline \hline \multirow{2}{*}{**Crop**} & \multicolumn{2}{c}{**Single-Band DTW45**} & \multicolumn{2}{c}{**Multi-Band DTW30**} \\ \cline{2-5}  & **UA** & **PA** & **UA** & **PA** \\ \hline Corn & 96.0 & 92.3 & 96.5 & 86.8 \\ Cotton & 88.6 & 82.8 & 72.4 & 92.6 \\ Wheat & 98.1 & 90.6 & 98.0 & 87.1 \\ Alfafla & 87.2 & 100 & 85.0 & 100 \\ Fallow/idle cropland & 66.7 & 48.8 & 55.8 & 58.5 \\ Grass/pasture & 77.3 & 97.7 & 84.0 & 97.7 \\ Double crop & 79.7 & 85.0 & 97.8 & 73.3 \\ \hline \hline \end{tabular}
\end{table} 
Table 7: User’s (UA) and producer’s accuracy (PA) for most accurate single-band (DTW45) and multi-band (DTW30) object-based time-constrained DTWs for TA2, in Texas. Figure 9: DTW dissimilarity values for single-band (**a**) and multi-band DTW (**b**) for TA1 using in both cases a time constraint of 30 days (DTW30). DTW dissimilarity values for single-band DTW45 (**c**) and multi-band DTW30 (**d**) for TA2 using 45- and 30-day time constraints, respectively. For clarity, the developed/low to medium intensity areas are masked with white. Additionally, although we classified the objects into the class with the minimum DTW dissimilarity value, we stored for each object the DTW dissimilarity values resulted from comparing the objects' temporal pattern with all reference temporal patterns. In this way, we can better understand the uncertainty of classifications and confusions between classes. We plotted these values against each other, fitted a linear function and computed the R\({}^{2}\) for TA1 in Figure 10 and for TA2 in Figure 11. These results can be correlated with the corresponding UAs and PAs from Tables 6 and 7, respectively. For single-band DTW30 in TA1, the highest R\({}^{2}\) values better explained the confusions between classes (Figure 10). For example, the low UA for vegetables (33.8%) presented an R\({}^{2}\) of 0.63 with alfalfa1 and 0.67 with sugarbeets. The low PA for water (63.3%) had an R\({}^{2}\) of 0.97 with the fallow class, while the low UA for sod/grass seed (51.2%) had a high R\({}^{2}\) of 0.96 with other hay/non alfalfa and 0.78 with alfalfa2. Other remarkable high R\({}^{2}\) values were for onions-wheat (0.86), sugarbeets-alfalfa1 (0.87), and other hay-alfalfa2 (0.84) (Figure 10). The 0.68 R\({}^{2}\) value between alfalfa1 and alfalfa2 suggested that it was useful to use two temporal patterns of alfalfa for classification. For single-band DTW45 in TA2, the low PA (48.8%) and UA (66.7%) for fallow/idle cropland can be explained by high R\({}^{2}\) values of fallow with grass/pasture (0.58) and wheat (0.46) (Figure 11).