This is the program code for the workshop paper "A Distance Metric for Privacy-preserving Process Mining based on Feature Learning".
This repository contains the Python-based source code and the evaluation files for the definition and evaluation of a feature learning-based trace distance metric, as presented in the paper "A distance metric for Privacy-preserving Process Mining based on Feature Learning". The metric builds upon the Process Sanitization algorithm PRETSA.
Clone the repository and you're ready to go.
runPRETSA_FLDMapplies the PRETSA algorithm using Feature Learning-based Distance Metrics.
Input:
- path to the event log to be sanitized (.csv) (used by PRETSA)*
- path to the event log to be sanitized (.xes) (used to train the word embeddings)
- k (int)
- t (float)
Output:
sanitized event log
*must contain 'duration' attribute which can be added using add_annotation_duration.py
Event Logs are mostly available as .xes and can easily be converted to .csv i.e. using the ProcessMining4Python library
The scripts used for the creation of the figures used throughout the paper can be found in the directory "Evaluation"
callAdvancedBA.pycalculates and displays the Advanced Behavioral Appropriateness Score for a given set of event logs.
Input:
- path to the directory where the event logs are located (.csv) *
- path to the directory to save the output graphic in
Output:
A graphic, similar to the ones displayed in the paper. Be advised that spacings and paddings are optimised for comparison of 2 modes for 3 event logs. Should you wish to change this setup you might have to adjust accordingly.
callCheckSampleQuality.pycalculates and displays the Truly Sampled Score for a given set of event logs.
Input:
- path to the directory where the event logs are located (.csv) *
- path to the directory to save the output graphic in
Output:
A graphic, similar to the ones displayed in the paper. Be advised that spacings and paddings are optimised for comparison of 2 modes for 3 event logs. Should you wish to change this setup you might have to adjust accordingly.
For an explanation of the score, please refer to
"Measuring the Behavioral Quality of Log Sampling",
Bram Knols and Jan Martijn E. M. van der Werf, Department of Information and Computing Sciences Utrecht University
traceDurationError.pycalculates and displays the Total Duration Error for a given set of event logs.
Input:
- path to the directory where the event logs are located (.csv) *
- path to the directory to save the output graphic in
Output:
A graphic, similar to the ones displayed in the paper. Be advised that spacings and paddings are optimised for comparison of 2 modes for 3 event logs. Should you wish to change this setup you might have to adjust accordingly.
- We recommed the following file structure, otherwise you will have to adjust the Evaluation code to fit your setup
~\EventLogs\
logName1\
"logName1.csv" the unsanitized event log
"logName1_t[xx]_k[xx]_[mode].csv" the sanitized event logs
"logName1_t[xx]_k[xx]_[mode].csv"
"logName1_t[xx]_k[xx]_[mode].csv"
logName2\
"logName2.csv" the unsanitized event log
"logName2_t[xx]_k[xx]_[mode].csv" the sanitized event logs
"logName2_t[xx]_k[xx]_[mode].csv"
"logName2_t[xx]_k[xx]_[mode].csv"
[mode] is the PRETSA instance used to sanitize the log, e.g. "Levenshtein", or "FDM"
We provide our code under the MIT license.