This step includes data preparation, prefix extraction, enrichment, and prefix encoding. In the data preparation step, we clean the event log from incomplete traces (given a definition of what makes a case “complete”) and we also remove events with clearly incorrect timestamps (outliers). We then extract prefixes according to length \(K\)  from every case to simulate real-life situations. Next, we enrich each prefix with additional attributes to help increase the accuracy of the predictive and causal models. Specifically, we add attributes related to the temporal context (date of the week, hour of the day of the most recent event in the case) as well as inter-case attributes (number of active cases and number of resources not currently actively working on a case).
Finally, the extracted prefixes (or prefix log) are encoded into a fixed-size feature vector to train ML algorithms using the aggregate encoding method in [1]}.
