pm4py.llm.abstract_dfg#
- pm4py.llm.abstract_dfg(log_obj: DataFrame | EventLog | EventStream, max_len: int = 10000, include_performance: bool = True, relative_frequency: bool = False, response_header: bool = True, primary_performance_aggregation: str = 'mean', secondary_performance_aggregation: str | None = None, activity_key: str = 'concept:name', timestamp_key: str = 'time:timestamp', case_id_key: str = 'case:concept:name') str [source]#
Obtains the DFG (Directly-Follows Graph) abstraction of a traditional event log.
- Return type:
str
- Parameters:
log_obj – The log object to abstract.
max_len (
int
) – Maximum length of the string abstraction (default: constants.OPENAI_MAX_LEN).include_performance (
bool
) – Whether to include the performance of the paths in the abstraction.relative_frequency (
bool
) – Whether to use relative instead of absolute frequency of the paths.response_header (
bool
) – Whether to include a short header before the paths, describing the abstraction.primary_performance_aggregation (
str
) – Primary aggregation method for the arc’s performance (default: “mean”). Other options: “median”, “min”, “max”, “sum”, “stdev”.secondary_performance_aggregation – (Optional) Secondary aggregation method for the arc’s performance (default: None). Other options: “mean”, “median”, “min”, “max”, “sum”, “stdev”.
activity_key (
str
) – The column name to be used as activity.timestamp_key (
str
) – The column name to be used as timestamp.case_id_key (
str
) – The column name to be used as case identifier.
- Returns:
The DFG abstraction as a string.
import pm4py log = pm4py.read_xes("tests/input_data/roadtraffic100traces.xes") print(pm4py.llm.abstract_dfg(log))