# Automatic Scaffolding Workface Assessment for Activity Analysis through Machine Learning
## 3 Research Design
### Classifier Training
The Divide and Conquer algorithm is used in this process by breaking down a sophisticated group into two or more subsets with purely one type of feature, until the subsets become simple enough to be classified directly. DT is the building block of the random forest models [92]. **Random Forest (RF). ** RF is an ensemble learning approach for classification and regression where, at the training stage, multiple individual decision trees are created by the selection of various subsets of training samples which follow the technique of bootstrap aggregating or bagging. The selection principle allows that the same data sample can be randomly selected several times while other samples may not be chosen at all [6; 93]. At the prediction stage, every single tree structure independently produces a class prediction, and the ultimate prediction of the RF model belongs to the one with the majority of votes from decision trees. One single decision tree is susceptible to bias and variance, for instance, if one decision tree is too shallow its prediction is easily influenced by bias and if one tree is too deep, it is probably overfitting with a high variance. Since RF models aggregate a  
Figure 7: Data frame of 3D joint positions. This figure partially displays the data frame of 3D joint positions. The actual data frame contains 43 features and more than 1700 lines. multitude of decision trees, the models effectively reduce variance and mitigate volatility and noise because of data samples, which enhances the robustness of classification [94]. **K Nearest Neighbors (KNN). ** KNN is intuitive, it is designed to search for the K closest data points to our target to be classified. Generally, KNN contains three steps: (1) computing the distance between the target point and each point in the training dataset; (2) according to the K value that the researcher set previously, picking K data points that remain with the lowest distance with the target; (3) applying a majority vote that the prediction result is in accordance with the majority of class among K neighbor points. **Support Vector Machine (SVM). ** SVM is a machine learning algorithm generally used for data classification. SVM generates a hyperplane or a group of hyperplanes in a high-dimensional space to distinctly classify the data points. There are many hyperplanes that are available to select, but SVM aims to look for a plane that is within the maximum margin which means this plane will keep the maximum distance between data points of both classes. SVM was initially a binary classification approach while, after the model extension, SVM can be used for multi-class classification. One-vs.-All (One-vs.-Rest) and One-vs.-One approaches are two common ways to solve multi-class tasks. Assume an N-class problem, One-vs.-All approach generates N binary SVM classifiers while each one splits one class from the rest [95, 96, 97]. The \(i\)th (\(i\in N\)) classifier is trained with the whole training data points of \(i\)th class labeled positive, and with all the other classes labeled negative. One-vs.-One approach is developed based on the idea that a pair of distinct classes are selected each time and are trained by a binary SVM classifier and an ensemble of binary SVM classifiers forms One-vs.-One SVM classifier. Assume a problem of N different classes, \(\frac{N(N-1)}{2}\) binary SVM classifiers are required for separating every two distinct classes. Compared to One-vs.-All SVM, One-vs.-One SVM is more computationally expensive since more binary SVM classifiers are created. We will implement both One-vs.-All SVM and One-vs.-One SVM for model evaluation [98]. Figure 8 demonstrates the SVM classifier that divides scaffolding activities into erecting, transporting and waiting/idling three classes. **Artificial Neural Networks (ANN). ** ANN were inspired by the mechanism and structure of biological neural networks in a human's brain in that the signals are received, transmitted and emitted back and forth through multiple layers of neurons. The basic unit in ANN is called a neuron or node.