*5.2. Decision Trees in the Assessment of the E*ff*ectiveness of Lean Maintenance*

Due to qualitative nature of the dependent variables, classification decision trees with the use of the classification and regression trees (CART) algorithm were used.

Not all surveyed enterprises used the same solutions, methods, and tools, therefore the main criterion for selecting this method was its insensitivity to the occurrence of atypical observations, which are believed to come from a different population, and the possibility of its effective use in datasets characterized by numerous shortcomings in independent variables. Additionally, the following advantages of CART classification trees determined the choice of the method:


The CART tree for a dependent variable—a mean value of the OEE indicator—was designed for 24 enterprises out of the studied group of enterprises, which had analyzed this indicator and implemented the TPM method. The following explanatory variables (predictors) were assumed: enterprise size, production type, industry, ownership type, capital, company condition, machine type, 5S implementation, 5S activities, SMED implementation, way of supervision, maintenance strategy, actions undertaken to prevent unplanned downtimes (number of prevent actions—NPA), machine classification, spare parts classification, actions within TPM implementation (NTPMA indicator), and mean time to repair. The following were assumed while creating the tree: equal costs of the incorrect classification, Gini coefficient, stop rule, and a minimum size criterion in the divided node *n* ≥ 2, which will allow for a detailed analysis of a tree structure and for 10-fold cross validation as a quality measure. A tree consisting of 12 divided nodes and 13 end nodes was chosen for the analysis. In order to assess the quality of the chosen tree, its validation for a new dataset was conducted. Thirteen decision rules may be defined for the created tree, which has 13 end nodes. The chosen decision rules, for which the highest values of OEE were reached (over 85% and for the range 70 to 85%) with the use of additional lean maintenance methods and tools, were presented below. Decision rules established on the basis of the decision tree are:


In order to evaluate the generated decision-making rules, research was again carried out in 20 randomly selected enterprises. Then, an expert system was designed and made (using PC-Shell—an expert system shell from the Aitech Sphinx software), taking into account the generated decision rules. Then, the general classification ability of the generated decision rules was tested using qualitative measures. Two blocks—aspects and rules—were used to develop the knowledge base in the system. The aspect block was used to declare the decision attributes and their values. On the other hand, the explanatory variables placed in the decision tree nodes are the decision attributes. The results of system inference were represented by the result attribute (target attribute). Finally, the value of the received attribute "OEE value" is presented in a separate window. The quality analysis consisted of developing binary matrices of classifiers' errors determined for the classes that most commonly appear in the conducted studies. In the developed binary matrices (confusion matrices) (Table 6), the class analyzed at a particular moment was assumed as positive, while the remaining classes were treated as negative.



Tables 7 and 8 present confusion matrices for the classifier—the value of OEE for the two most-emerging classes: 30–50% and 70–85%.


**Table 7.** Confusion matrix for the classifier value of the OEE indicator—30–50% class.

**Table 8.** Confusion matrix for the classifier value of the OEE indicator—70–85% class.


Based on the confusion matrix, numerical indicators presented in Table 9 can be designated. In detail, these indicators have been presented and discussed, among others in the works [51–53].


**Table 9.** Indicators used to test the quality of classifiers [54].

On the basis of the developed binary matrices, for each of them, the values of the twelve indicators showing the classifiers' quality were calculated. Table 10 presents the results for the highlighted classifier classes.

**Table 10.** Indicators used to test the quality of classifiers.


The obtained indicator values the assessment of a classification measure, e.g., of an error (Err) at the level of 0.00 and 0.15, proved high usefulness of the developed classifiers, and thereby, their possibility to be applied by manufacturing enterprises for the effective assessment of the lean maintenance methods and tools implementation.
