## 3 Results
### Interdepartmental Decision-Making Module  
The interdepartmental module was designed to integrate outputs from the departmental modules and analyze them collectively. Its primary purpose is to diagnose the root causes of quality issues by correlating data across production stages. Tests for this module were performed. These tests used a big piece of the datasets and applied the random forest algorithm to examine how well the module could identify which variables from earlier stages (e.g., from the steelworks or logistics) contributed to quality defects observed later.  
During testing, the interdepartmental module processed consecutive production sets where departmental decisions were predicted in advance. By applying ensemble methods and utilizing interpretability tools such as SHAP values, the module highlighted the importance of input features. The results clearly indicate that, in multiple scenarios, sensor data from the steel mill stage were the primary drivers of defects in previous stages. We  
Figure 11: Heatmap of F1-scores (%) across departments and classification groups.  
chose the rolling mill stage because we have a clear indicator of the quality of the product that we can use as a target (the QI factor provided by the EDDYEYES system). To perform the analysis, we had a class \"1\" of \"OK\" products with too many defects (high QI), and we had a class \"0\", which were the rest of the products. In this analysis, we found some batches of products where we observed a correlation between the steel mill variables and the quality achieved in the rolling mill stage.  
Taking batches of 1000 rolls, we used 70% for training and 30% for testing; these 1000 rolls were fed into the random forest algorithm (which is optimized to receive this data), obtaining the following results (Figures 12-14).  
Once it was determined that the model had high reliability in discriminating between the bad rolls and the good ones, which can be seen in the good results obtained in the confusion matrix, the SHAP method was applied to the model. Through the SHAP values obtained, we can determine the problematic variables that lead us to a quality deterioration.  
In short, we use the confusion matrix as a way of assessing whether the model is able to understand the problematic features that are leading to a deterioration in quality. We then apply the SHAP method to obtain first-hand knowledge of these characteristics and to which department they belong.  
Here, we can see that the variables coming from steel mill have the higher impact for this classification. Using the same method, we can find more cases that submit the same behavior.  
The module's confusion matrices and feature importance analyses demonstrated that it could reliably pinpoint problematic variables coming from the steel mill, providing actionable insights for process improvement. The cases provided show how the six SHAP values that are most important in the decision of the model come from the steel mill instead of coming from the rolling mill (the current stage in this case), allowing for us to collect more information about the origin of the defects that appear in the analyzed stage. This  
Figure 12: Confusion matrix of the interdepartmental expert.  
Figure 13: SHAP values of the interdepartmental expert.  
information can be used in the future to retrain the departmental modules and increase their reliability.