pm4py.discovery.discover_dfg#
- pm4py.discovery.discover_dfg(log: EventLog | DataFrame, activity_key: str = 'concept:name', timestamp_key: str = 'time:timestamp', case_id_key: str = 'case:concept:name') Tuple[dict, dict, dict] [source]#
Discovers a Directly-Follows Graph (DFG) from a log.
This method returns a dictionary with the couples of directly-following activities (in the log) as keys and the frequency of relation as value.
- Parameters:
log – event log / Pandas dataframe
activity_key (
str
) – attribute to be used for the activitytimestamp_key (
str
) – attribute to be used for the timestampcase_id_key (
str
) – attribute to be used as case identifier
- Return type:
Tuple[dict, dict, dict]
import pm4py dfg, start_activities, end_activities = pm4py.discover_dfg(dataframe, case_id_key='case:concept:name', activity_key='concept:name', timestamp_key='time:timestamp')