Following are the supplementary material for the article "Minimizing overprocessing waste in business processes via predictive activity ordering" by Ilya Verenich, Marlon Dumas, Marcello La Rosa, Fabrizio Maggi, and Chiara Di Francescomarino.

Requirements:
R 3.2.0 or above; internet connection to download the datasets and possibly missing packages

USAGE:
cd OptimizeKnockout
Rscript OptimizeKnockout.R inputData koActivities usefulFeatures disallowed_permutation learner sampling_method n retrain

Example usage:
Rscript OptimizeKnockout.R inputData="Bondora.csv" learner="svm" sampling_method="under" n=3

Input:
Event log in the csv format. Only "Bondora.csv" and "Envpermit.csv" have been tested so far

Output:

Parameters:

Note: If using inputData="Bondora.csv" or inputData="Envpermit.csv", all other paramaters are optional

Common problems:
If you receive an error "'Rscript' is not recognized as an internal or external command, operable program or batch file", please add the path to the executables for R to the system variable "PATH" (on Windows typically 'C:\Program Files (x64)\R\R-3.x.y')

Note that this code is a supplementary material and should be modified for the use with other datasets