Python algorithm to discover, from an event log, prioritization rules that lead to one activity instance to be executed before another.
Project description
Prioritization Discovery
Python algorithm to discover, from an event log, the case priority levels and the rules that classify a process case in its corresponding level. For example, the cases of a process can belong to three priority levels (low, medium, high), where the activity instances of cases with high priority are executed before than activity instances of cases with low priority (when both of them are enabled at the same time).
Example of use
import pandas as pd
from prioritization_discovery.config import DEFAULT_CSV_IDS
from prioritization_discovery.discovery import discover_priority_rules
# Read event log
event_log = pd.read_csv("path_to_event_log.csv")
event_log[DEFAULT_CSV_IDS.enabled_time] = pd.to_datetime(event_log[DEFAULT_CSV_IDS.enabled_time], utc=True)
event_log[DEFAULT_CSV_IDS.start_time] = pd.to_datetime(event_log[DEFAULT_CSV_IDS.start_time], utc=True)
event_log[DEFAULT_CSV_IDS.end_time] = pd.to_datetime(event_log[DEFAULT_CSV_IDS.end_time], utc=True)
# Get priority levels and their rules
case_attributes = discover_priority_rules(
event_log=event_log,
attributes=['loan_amount', 'client_type'] # Case attributes to consider in the rule discovery
)
To see a more detailed example of use, and the format of the output, you can check this test file.
No enabled time available
To identify which activity instances have been prioritized over others, the information of the enabled time has to be available in the event log. In case it is not available, consider using this Python library to estimate them.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file prioritization_discovery-0.4.4.tar.gz
.
File metadata
- Download URL: prioritization_discovery-0.4.4.tar.gz
- Upload date:
- Size: 10.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/4.0.1 CPython/3.11.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6943413e9911b001ec2bf55b7619574307d21eeb8e498c615eb186c3de390ad6 |
|
MD5 | 91c5e9d823dd71f4a4a20f6548d8da73 |
|
BLAKE2b-256 | 93c069c641249dfcaa86a3e4aaa637a0a6cccf6db9bc5eab540ac38ef67efc1b |
File details
Details for the file prioritization_discovery-0.4.4-py3-none-any.whl
.
File metadata
- Download URL: prioritization_discovery-0.4.4-py3-none-any.whl
- Upload date:
- Size: 12.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/4.0.1 CPython/3.11.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 121bd21d5b108b097dab9e4573193abb1afdb10ca41468339f475ca5eb957d0a |
|
MD5 | 3dd4618c29111ddaa077858ba925bf36 |
|
BLAKE2b-256 | 0cfb09c4d0b598b829e0105defd849ed9bd07fee6229284249236d5e16c679e1 |