# Data Preprocessing Method and API for Mining Processes from Cloud-Based Application Event Logs
## 7 Discussion
### CPA-PM Method Analysis  
Often, real-life cloud-based processes are so complex that the resulting process maps are too complicated to interpret and use for discovery and analysis purposes. These spaghetti processes are not incorrect per se. The problem however is that such process maps are too large and unstructured to derive any useful insights or information that can be used to answer analysis questions that may lead to process or application improvement. At this level, what is needed is to simplify such complicated process maps, or their source event logs. Clickstream datasets can contain millions of events capturing user clicks anywhere on application pages, as well as page refreshes.  
The CPA-PM method proposed here can help in cleaning such datasets in a suitable way in order to build more meaningful process maps automatically and repeatedly for different datasets using the same logging infrastructure. After applying the steps of the CPA-PM method, the resulting process maps are less complex and more understandable in terms of displaying the main events that were executed in the process. Many traces and events can be deleted or aggregated without affecting the answers to analysis questions. This method also focuses on reducing variations in one same process. Finally, the API invocations used to support the CPA-PM steps for a particular event log can be collected as a script that can be run each time a new version of the event log becomes available, hence helping automate the analysis while reducing manual labor. This preprocessing method is applied on the dataset before importing the reduced dataset to process mining tools. In this paper, Disco was used to display process maps.  
Analysts can also discover along the way that a better logging mechanism should be used in their cloud system. For example, not all user activities may be logged properly in the log management tools. After applying process mining techniques and building process maps, analysts may discover that some activities that should be present are actually not displayed in the process maps because they are not properly logged.  
Note however that the logs may also be simplified too much, and that important information may be removed along the way. CPA-PM does not compute similarity metrics or information loss (as in [20]); such features could be added in the future.  
In terms of scope, the CPA-PM method is a data preprocessing technique with API functions that can address many difficulties in simplifying event logs generated from cloud-based applications. We believe the API can also be used regardless of the type of application; it is not bound to cloud-based applications, but its utility has not yet been investigated in other contexts. Additionally, CPA-PM can be applied to logs generated at different moments in time, and the scripts do not need to be modified if the logs share the same structure. Given that CPA-PM comes with an API implementation, the analyst has the flexibility to implement the scripts by using the available functions in any order that can best answer the research questions. In addition, CPA-PM allows the analyst to run multiple iterations for the data clean-up, dataset restructuring, and event pattern substitution steps.