# Machine Learning-Supported Designing of Human-Machine Interfaces
## 2 Machine Learning-Supported HMI Optimisation
### Workflows, Displays, and Their Elements as a Community  
Another way to define the ideal event-display order is to apply the community theory [24]. Consider a \(WF_{j}|j=[1,w]\) workflow as a graph, where the \(WF_{j}=\{E_{1},\ldots,E_{z}\}\) events are the nodes, and the sequence of the events indicates the edges between them, resulting in a directed graph. Due to the confidence values of the event transitions, the graph is weighted as well. The \(D(WF_{j})=\{D_{1},\ldots,D_{m}\}\) set of displays containing events related to \(WF_{j}\) are subgraphs of \(WF_{j}\). If more displays are aligned to a workflow, the order of the used displays form a sequence as well; the graph of the displays is also directed and weighted. In a plant, there are \(w\) workflows in parallel. \(D^{WF}=\bigcup\limits_{i=1}^{w}D(WF_{i})\) is the set of all events on all displays related to all workflows. If the node connections of \(D^{WF}\) are marked with \(V(D^{WF})\), then the minimum goal is to have displays that form a _weak community_, and the problem to solve is  
\[\frac{V^{ext}(D^{WF})}{V^{int}(D^{WF})}<1, \tag{5}\]  
where \(V^{int}(D^{WF})\) is the number of connections for nodes within the displays, and \(V^{ext}(D^{WF})\) is the number of connections for nodes between the displays.  
The best solution is to have displays in which the nodes within each display form a _strong community_. If the number of displays is \(m\), then the optimisation problem is  
\[min\sum_{i=1}^{m}\frac{V^{ext}(D_{i})}{V^{int}(D_{i})}, \tag{6}\]  
e.g., the intersection of the displays must be minimal. Obviously, in real life, the zero intersection between displays is not realistic, but can be approximated. Equation (6) also indicates that the optimisation is performed for the whole system, not on each workflow-display pair individually. An idealistic state can be seen in Figure 2, which can be reached with the help of a community detection algorithm. It is very important to note that in industrial control systems, communities overlap. This problem must be addressed by the detection method, as in [25; 26].  
The time complexity of the method consists of three maximum parts: pattern mining (\(O_{pq}\)), process mining (\(O_{pr}\)), and optional network visualisation (\(O_{ne}\)). If \(\mid E\mid\) denotes the number of different events stored in the \(L\) log (with a size of \(\mid L\mid\)), and \(N\) is the number of traces with sizes of \(\mid T_{i}\mid\) (considering sequential pattern mining):  
\[O_{pa}=O(\sum_{i=1}^{N}|T_{i}|)+O(|L|\times|E|)+O(2^{|E|-1})\times O(|L|), \tag{7}\]  
\[O_{pr}=O(|L|,|E|^{2}).\]  
In a network-like representation of the sequence of events, the nodes are the events (\(E\)) and their transitions are the edges. To visualise the process, a weighted network can be applied, where the weight of the edges is proportional to the number of transitions between the nodes. The complexity is the maximal number of edges between the \(\mid E\mid\) nodes:  
\[O_{ne}=O(\mid E\mid\times(\mid E\mid-1)) \tag{8}\]  
Figure 2: An optimised example community of events (\(E\)), displays (\(D\)) and workflows (\(WF\)). Solid boxes represent the displays, dashed boxes represent the workflows.  
Considering that industrial control systems contain a large number of elements, e.g., events, the complexity of the method increases exponentially with \(\mid E\mid\). However, it should be noted that the method is useful in the planning phase. In this way, the speed of applicability is not that important, and the specific system has a huge effect on the complexity.