## 3 Methodology Application
### Modeling Application
#### 3.4.1 J48 Decision Tree Algorithm  
Classification methods were chosen for the estimation of M/J CT and LT. Since the estimated time is a continuous variable, it was first necessary to discretize the values into classes so that individual applications of the J48 algorithm would assign values to classes of different ranges. Number of classes (NC) was chosen based on the number of possible training values:  
\[NC=\left\{2,\;3,\;\ldots,\;\surd n\right\} \tag{2}\]  
where \(n\) is the number of possible training values.  
The J48 decision tree algorithm aims to create the smallest possible tree. The smallest tree is achieved when a single branch can be assigned as many estimates of the same value as possible, resulting in a simple node. This node provides the most information. The algorithm uses a top-down recursive approach, leveraging the entropy function (information value) from information theory [48; 49]. Entropy is calculated as follows:  
\[Entropy(p_{1},\ldots,\;p_{n}\;)=-p_{1}\text{log}_{2}\,p_{1}-p_{2}\text{log}_{ 2}\,p_{2}\ldots-p_{n}\text{log}_{2}\,p_{n}; \tag{3}\]  
where \(n\) is the number of possible training values and \(p_{1},\ldots,\;p_{n}\) is the probability of occurrence of the training value calculated as the ratio of the number of training value to the total number of possible training values, \(p_{1},\ldots,\;p_{n}\leq 1\).  
The algorithm computes the entropy for individual attributes and the entropy of the learning value. The starting node is then chosen as the one where the difference between the entropy of the learning value and the entropy of the attribute is the greatest.  
The models were built with pruning (for at least two objects in the learning value classes) and without pruning (for at least two, three, and four objects in the learning value classes). By pruning the trees, a simplification of the tree structure by sufficient metrics of the models was expected. M/J CT estimation modeling was possible based only on the attribute count of the items. An example of the experimental inputs for the CT assembly of the machine base item are summarized in the Table 5; the model generated by WEKA is shown in Figure 4.  
Figure 4: Selected training model for assembly time estimation of item machine base by item count.  
\begin{table}
\begin{tabular}{c c c c c} \hline \hline
**Training Data** & **Test Data** & **NC** & **Selected** & **Selected** \\
**(2021, 2022)** & **(2023)** & **in Experiment** & **Number of** & **Setting of J48** \\ \hline
20 & 10 & 4, 3 & 3 & Unpruned \\  & & & & J48/M 2 \\ \hline \hline \end{tabular}
\end{table}
Table 5: Experiment result for CT assembly machine base item.  
For the LT modeling attributes, manufacturing CT, payment volume, number of items in production on the day of receipt, and number of items were tested for dependency on the estimated LT by applying correlation and the relief ranking filter. Attributes redundancy was tested using the Wrapper Subset Evaluator in combination with the Swarm or Hill-climber algorithms. Only the attributes manufacturing CT and payment volume showed some dependence on LT. These two were selected for modeling. Algorithms with different induction strategies (J48, PrismRule, ID3) were used to model decision trees, and EL PA rotation forest was applied. For an explanation of PAs algorithms, please see [49; 57; 72].