## 3 Implementation of the Decision Tree Algorithm
After a detailed analysis of process data and event log (part of it presented in Table 1), records can be extracted to determine individual customers' preferences in relation to individual choices at the conceptual stage, software processing stage, and rapid prototyping processing stage. A fragment of the consolidated data concerning the customers' preferences is presented in Table 2. In particular, one can make a detailed specification for individual cases for 3D printing method, Quality control type, and order status: bought or not (paid or not). It is worth emphasizing that the number of possible combinations of all decision-making attributes may be significant within the service. The database used to perform predictions and calculations was a database containing the preferences of individual customers. It was a database consisting of 10 thousand, 100 thousand, and half a million records, respectively. Based on these preferences, the predictions were carried out, and the results were saved to a CSV file. This database was a source of information for the decision tree algorithm, the scheme of which was presented on Algorithm 1. \begin{table}
\begin{tabular}{c c c c c} \hline \hline
**Case ID** & **Event ID** & **dd-MM-yyyy-HH-mm** & **Activity** & **Resource** & **Costs** \\ \hline
1 & 736286 & 03.01.2020-09:15 & A. Service request & Consultant & 50 \\
1 & 736288 & 13.01.2020-13:45 & B. Concept development & Consultant & 50 \\
1 & 736289 & 14.01.2020-8:33 & C. Digital model creating & Engineer & 100 \\
1 & 736290 & 15.01.2020-14:12 & D. Data verification & Analyst & 200 \\
1 & 736291 & 15.01.2020-15:21 & E. Production method specification & Analyst & 100 \\
1 & 736292 & 16.01.2020-11:37 & F. Defining technological parameters & Analyst & 100 \\
1 & 736293 & 16.01.2020-8:17 & G. Physical model production & Engineer & 200 \\
1 & 736295 & 20.01.2020-10:27 & H. Quality control & Specialist & 200 \\
1 & 736296 & 21.01.2020-14:41 & I. Approval & Manager & 150 \\
1 & 736297 & 24.01.2020-15:13 & J. Money transfer & Manager & 150 \\
2 & 736311 & 06.02.2020-8:35 & A. Service request & Consultant & 50 \\
2 & 736312 & 06.02.2020-10:12 & B. Concept development & Consultant & 50 \\
2 & 736313 & 11.02.2020-10:25 & C. Digital model creating & Engineer & 100 \\
2 & 736314 & 13.02.2020-11:01 & D. Data verification & Analyst & 200 \\
2 & 736315 & 14.02.2020-13:47 & E. Production method specification & Analyst & 100 \\
2 & 736316 & 17.02.2020-8:42 & F. Defining technological parameters & Analyst & 100 \\
2 & 736317 & 17.02.2020-10:28 & G. Physical model production & Engineer & 200 \\
2 & 736318 & 18.02.2020-8:32 & I. Approval & Manager & 150 \\
2 & 736319 & 19.02.2020-13:46 & J. Money transfer & Manager & 150 \\ \hline \hline \end{tabular}
\end{table} 
Table 1: Sample Event Log registered for two cases. \begin{table}
\begin{tabular}{c c c c c} \hline \hline
**Case ID** & **Designing Method (B)** & **3D Printing Method (E)** & **Quality Control (H)** & **Money Transfer (J)** \\ \hline Case 1 & Client & FFF (ABS) & Camera & No \\ Case 2 & Virtual resources & FFF (ABS) & Camera & No \\ Case 3 & Virtual resources & FFF (ABS) & Specialist & Yes \\ Case 4 & Virtual resources & FFF (PLA) & Specialists & No \\ Case 5 & Virtual resources & FFF (ABS) & Specialist & Yes \\ Case 6 & System & FFF (PLA) & Camera & Yes \\ Case 7 & Client & FFF (PLA) & Camera & No \\ Case 8 & System & FFF (ABS) & Camera & Yes \\ Case 9 & Virtual resources & FFF (PLA) & Camera & Yes \\ Case 10 & Client & FFF (ABS) & Specialist & Yes \\ \hline \hline \end{tabular}
\end{table} 
Table 2: Sample customer preferences. ```
0: An attribute-valued dataset \(D\)
0: Decision tree \(T\)
1:\(T=\{\}\)
2: Start at the root node
3: Calculate the entropy of the whole data set
4: **For each** attribute \(a\in D\):
5: - divide input data \(D\) into subsets
6: - calculate the entropy for each subset
7: - select these attributes for which the entropy variation is the highest.