# Machine Learning-Supported Designing of Human-Machine Interfaces
## 2 Machine Learning-Supported HMI Optimisation
### Identification of the Workflows as Frequent Event Patterns  
The basis of the process exploration tasks is an L log, represented as a set of events (\(E\)) stored in the order of their occurrences. In alarm management, events can be alarms, operator actions, process variable changes, etc. These events are considered states of the system formed by \(<PV,a>\) tuples. \(PV\) is a process variable and \(a\) is the attribute indicating the state of the variable. For example, \(E_{j}=<oil\)\(temperature,high>\).  
An \(L=\{T_{1},\ldots,T_{n}\}\) log contains \(T_{k}=\{E_{1},\ldots,E_{p}\}\) traces, where \(k=[1,n]\) and \(p=[1,z]\). A trace is a subset of all \(E=\{E_{1},\ldots,E_{z}\}\) events within the log file that describe a sequence of process control activities. Considering that traces are formed of events in a given sequence, the most frequent traces can be considered as process patterns or workflows. Therefore, events assigned to a workflow are also a subset of all events.  
\[WF_{j}=\{E_{1},\ldots,E_{k}\}\subseteq E. \tag{1}\]  
From another perspective, a workflow is a valid frequent sequential pattern and can be defined using frequent sequential pattern mining. A sequential pattern can be considered frequent if it exceeds a predefined _minimum support_ value, that is, the number of traces  
Figure 1: The proposed ML-supported HMI optimization method with alarm management-related interpretation.  
where the pattern is present and is a hyperparameter of the method. Besides the _minimum support_ value, _confidence_ can be considered as another hyperparameter, that is, the strength of connection of the event patterns. An _s-length_ workflow, e.g., sequence can be split into \(s\) subsequences, \(WF_{j}=\{WF_{j}^{1}\rightarrow\ldots\to WF_{j}^{i}\rightarrow\ldots \to WF_{j}^{s}\}\). The confidence can be calculated as follows:  
\[conf(WF_{j}^{i})=\left\{\begin{array}{ll}\frac{sup(WF_{j}^{i})}{sup(WF_{j}^{i -1})}\times conf(WF_{j}^{i-1})&s\geq i>1\\ 1&i=1\end{array}\right., \tag{2}\]  
where \(sup(WF_{j}^{i})\) is the number of traces in \(L\), where \(WF_{j}^{i}\) occurs.  
Each confidence value of the transitions can be interesting, not just the confidence value of the whole event chain. Consider a sequence of events, where the last event has great negative consequences. If the transition confidence of any parent-child event pair is low, the overall confidence of the whole workflow will be low as well (Equation (2)). If this low transition confidence value is at the beginning of the workflow, and all subsequent transitions have high confidence, then the unwanted last event will have a high probability of occurrence after a certain event sequence has occurred. Knowing these sequence confidences, critical event scenario milestones can be identified that support the creation of event forecast models [22].  
Frequent sequential patterns support the goal-orientated creation of log files that describe the target process. The process model can be created using process mining techniques on the created log. The selection of the pattern mining technique depends on the complexity of the actual system, for example, the number of parallel processes.