## 5 Case Study
### First Scenario  
The goal in the first scenario is to build a classifier that can compete in performance with automatically built trees, using GDT and applying their previous knowledge. In this scenario, the dataset is reduced to six balanced classes, with 6324 records related with one of the following movements: 0--knee movement, 5--shaking arms, 7--bouncing on toes, 8--light loose hopping, 11--shaking shoulders, and 12--moving hips.  
From this starting point, the domain experts represented the LDA corresponding to the training set and decided to create a node using the feature '59' (Right Elbow 2) based on their perception and their prior knowledge. They persisted in this process of node construction until they considered the classifier to be built (see Figure 12a). Once the tree was built, they executed the scikit-learn algorithm (see Figure 12b) with the same maximum depth as the manual decision tree to compare their performance, (see Figure 13), observing that it is similar in both trees.  
From the decision tree construction process, the domain experts could extract some insights from the raw data. The first insight found by the domain experts was that they were able to discriminate, with high performance, for 27% of the samples in only two steps, as shown in Figure 14. The second insight that they obtained from an exploratory data analysis was the predominance of the characteristics corresponding to the upper body when classifying movements. Specifically, they found upper body features to be the partitioning  
\begin{table}
\begin{tabular}{c c c c} \hline \hline
**Dataset** & **No. Records** & **No. Features** & **No. Poses** \\ \hline Original dataset & 21,495 & 72 & 14 \\ First scenario & 6324 & 15 & 6 \\ Second scenario & 12,390 & 15 & 14 \\ \hline \hline \end{tabular}
\end{table}
Table 1: Comparison of datasets based on the number of records, features, and poses included.  
Figure 11: Representation of the variables in the original dataset (**a**) and in the two scenarios used for decision tree construction (**b**). The set of variables has been reduced based on feature importance metrics.  
feature on 56 occasions in the tree-building process. This corresponds to 69.13% of the total. Also, in this building process, the domain experts used left-sided features more frequently. They were used 53 times in this building process, compared to 28 for right-sided features and 13 for spine- and hip-related features.  
Figure 14: Detail from the decision tree built by the domain experts. Highlighted in a red box are the first two steps where leaf nodes (pink and green) are defined for more than 27% of the total samples.  
Figure 12: Resulting decision trees. (**a**) Decision tree built by domain experts by using GDT. (**b**) Decision tree built by using scikit-learn. The manually built tree (**a**) is simpler and easier to follow than the tree created by the algorithm (**b**).  
Figure 13: Performance comparison between the tree built by scikit-learn and manually, with six classes in the dataset. Each class starts balanced, with 1024 samples, and training and testing sets are created with a 70:30 ratio. The results of the manual tree are similar to those obtained with the automatic algorithm, but with a simpler tree built by a process that allows domain experts to participate in the process.