Skip to content

Latest commit

 

History

History
165 lines (107 loc) · 8.09 KB

README.md

File metadata and controls

165 lines (107 loc) · 8.09 KB

ActivityTableBuilder

The Activity Table Builder is a tool generate an activity table to demonstrate Process Mining to someone starting out in the field. It generates a simple activity table with sorting, case ID, activity, and timestamp.

Preparation

Software

If you are already signed up for Celonis, you can use the Machine Learning Workbench to build your activity table. Alternatively, you can also use an offline installation of Jupyter Notebook. If you are using an offline installation of Jupyter Notebook, it is recommended that you also have a spreadsheet editor available to you.

Building a Scenario

Before you start building a scenario, think about how you would like the scenario to look like. Some of the questions you would want to ask yourself are:

  1. What is the context behind the scenario?
  2. What are the possible activities that can happen when there are hundereds of instances of the scenario playing out?
  3. What is my 'happy path'?
  4. What are the possible variants?
  5. What other information you will need to build an analysis?

Building a Case Table

This tool exclusively builds activity tables. Since case tables can vary significantly between scenarios, it is recommended that each case table is build out to suit its intended purpose.

Generating an Activity Table

Accessing the Machine Learning Workbench

Go to Machine Learning in Data Integration.

Locate Machine Learning in the left panel in the Data Option

Create a new Workbench.

ML Workbench

The Workbench does not require any permissions to be granted to it.

Setting up the Workbench

Once the Workbench has been created, launch it and open the terminal.

Terminal in ML Workbench

Install the DateTime package with pip. Type the following in the terminal and press return.

pip install DateTime

Terminal screenshot

All other dependencies are installed by default in the Workbench. However, if you are using an offline installation of Jupyter Notebook install the following packages:

  1. pandas
  2. numpy
  3. random2
  4. python-dateutil

Cloning the repository

Clone the repository into the Workbench. Use the following command in the terminal:

git clone https://github.com/celonis-content/ActivityTableBuilder.git

git command

Set up the Activity List

Once the repository has been cloned into the workbench, navigate to the ActivityTableBuilder folder. Open the file "activity_list.csv". It is a template for the input file.

activity_list

If the file does not appear as the above picture, try changing the delimiter to ";".

Downloading a File from ML Workbench

If you have not downloaded a file from the Machine Learning Workbench previously, your first download will be an HTML file.

editor

Open the file. It will redirect you to another webpage. Scroll down, check Don't show this again and click on Download File.

editor

Try downloading the file again.

Editing the File

Either download the file on to your system or use the Editor in the Workbench.

editor

If you download the file to edit it, delete the temnplate from the folder and upload the filled in file without renaming it.

FIlling up the Activity List

Column 1: The first column is a list of all the possible activities that can happen during the process.

Minimum Duration & Maximum Duration: The second and third column denote the minimum and maximum time in hours an activity can take to be completed respectively.

END: This is a flag to denote whether an activity is a terminal activity, i.e., the process can end at that activity. If an activity is a terminal activity then the value is 100, otherwise 0.

Column 5 and beyond: These columns denote the probability of an activity in row 1 being following an activity in column 1. E.g.

If Activity 2 follows Activity 1 in 80% of the cases, then the entry at the intersection of Activity 1 in Column 1 and Activity 2 in Row 1 should be 80.

N.B.: Ensure that the sum of the entires in a row from 'END' (inclusive) onwards adds up to 100.

Running the Tool

Once the "activity_list.csv" is filled up, open the "Run_ActivityTableBuilder.ipynb" file.

JP Notebook

Move your cursor to the code block.

JP Notebook

Run it by pressing Control+Return.

You only need to run one code block. Depending on the type of operation you are simulating, you can either run the first code block or the second code block. The first one simulates an operation that runs 24x7 (e.g. an electricity company). The second one simulates an operation which has limited working hours, specifically, Monday-Friday from 9 AM - 5 PM (e.g. a bank). This does not account for any holidays.

Enter the number of cases you want to generate.

JP Notebook

You have generated your own activity table!

Your activity table should be generated. It will appear in the file explorer in the Workbench.

Things to look out for

Using the correct Delimiter for your CSV file

The template file uses ";" as the delimiter in the CSV file. If you use an offline spreadsheet tool to edit the template, make sure to check whether the demiliter matches between the code and file.

Delimiter

Editing the file to work with EMS

The cell of the activity table generated at the 1st row, 1st column is empty. This will result in an error when uploading the the EMS using Upload Files option in a Data Pool. Rename this cell to "Sorting".

Maintaining the Template

The program is dependent on the template being maintained. Changing the layout of the Activity List file will result in the program not working as expected.