Spaces:
Runtime error
Runtime error
Download pm4py/examples/batch_detection.py from linpershey/process_mining: direct link, hf CLI and curl.
- Browser
- Download file 561 Bytes
-
https://huggingface.co/spaces/linpershey/process_mining/resolve/main/pm4py/examples/batch_detection.py
- Command line
-
hf download hf://spaces/linpershey/process_mining/pm4py/examples/batch_detection.py
-
curl -L -o batch_detection.py https://huggingface.co/spaces/linpershey/process_mining/resolve/main/pm4py/examples/batch_detection.py
561 Bytes
| import pm4py | |
| from pm4py.algo.discovery.batches import algorithm | |
| import os | |
| def execute_script(): | |
| log = pm4py.read_xes(os.path.join("..", "tests", "input_data", "receipt.xes")) | |
| # detect the batches from the event log | |
| batches = algorithm.apply(log) | |
| # print the batches (complete information) in a single row | |
| print(batches) | |
| # print a summary information (size) for each activity-resource combination that is performed in batches | |
| for batch in batches: | |
| print(batch[0], batch[1]) | |
| if __name__ == "__main__": | |
| execute_script() | |