No project description provided
Project description
Case Attribute Discovery
Python package to discover case attributes from an event log and their value distribution (stochastic if discrete, probability distribution if continuous).
Example of use
import pandas as pd
from case_attribute_discovery.config import DEFAULT_CSV_IDS
from case_attribute_discovery.discovery import discover_case_attributes
# Read event log
event_log = pd.read_csv("path_to_event_log.csv")
# Simple call
case_attributes = discover_case_attributes(
event_log=event_log,
log_ids=DEFAULT_CSV_IDS
)
# Call specifying the columns to not take into account for case attribute analysis
case_attributes = discover_case_attributes(
event_log=event_log,
log_ids=DEFAULT_CSV_IDS,
avoid_columns=[
DEFAULT_CSV_IDS.case, DEFAULT_CSV_IDS.activity,
DEFAULT_CSV_IDS.start_time, DEFAULT_CSV_IDS.end_time
]
)
# Call specifying a confidence (or noise) threshold to allow a certain noise
# in the variability of the attribute along the trace:
# - For each trace, the confidence of the most frequent value is computed (i.e.
# the % of activity instances from that trace with that same value). For example,
# a trace with 8 activity instances with 'amount'=100 and 2 with 'amount'=150
# will have a confidence of 0.8.
# - The average confidence in all traces must be higher or equal to the specified
# one to consider that column a case attribute.
case_attributes = discover_case_attributes(
event_log=event_log,
log_ids=DEFAULT_CSV_IDS,
confidence_threshold=0.9
)
To see a more detailed example of use, and the format of the output, you can check this test file.
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 case_attribute_discovery-0.1.8.tar.gz
.
File metadata
- Download URL: case_attribute_discovery-0.1.8.tar.gz
- Upload date:
- Size: 7.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/4.0.1 CPython/3.11.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a66ed6192c11a2c2407ab51312f2b7485cc4b9e6c7ea1c939c8d6d2fb443733f |
|
MD5 | c9328466973059771ce0eb7f66066729 |
|
BLAKE2b-256 | 033628f2bda7d222c53f4b3c15be87db417b9716fe17d9ba047660228dfd4702 |
File details
Details for the file case_attribute_discovery-0.1.8-py3-none-any.whl
.
File metadata
- Download URL: case_attribute_discovery-0.1.8-py3-none-any.whl
- Upload date:
- Size: 8.2 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 | 1c66d8c3ae13e8e4ad2beb376cc60fe690e3f92944196c5dcc1ed57ece13f173 |
|
MD5 | 0ab1e394dceb5fdf532b0d37a24dc57e |
|
BLAKE2b-256 | 1d9cf4fa18c43b52c87b9e340fab0c970e01a5c385b1d3c408cdb81afd193fd0 |