pm4py.discovery.discover_petri_net_inductive#
- pm4py.discovery.discover_petri_net_inductive(log: EventLog | DataFrame | DirectlyFollowsGraph, multi_processing: bool = False, noise_threshold: float = 0.0, activity_key: str = 'concept:name', timestamp_key: str = 'time:timestamp', case_id_key: str = 'case:concept:name', disable_fallthroughs: bool = False) Tuple[PetriNet, Marking, Marking] [source]#
Discovers a Petri net using the Inductive Miner algorithm.
The Inductive Miner detects a ‘cut’ in the log (e.g., sequential, parallel, concurrent, loop) and recursively applies the algorithm to sublogs until a base case is found. Inductive miner models typically use hidden transitions for skipping or looping portions of the model, and each visible transition has a unique label.
- Parameters:
log – Event log, Pandas DataFrame, or typed DFG.
multi_processing (
bool
) – Enables or disables multiprocessing in the Inductive Miner (default: constants.ENABLE_MULTIPROCESSING_DEFAULT).noise_threshold (
float
) – Noise threshold (default: 0.0).activity_key (
str
) – Attribute to be used for the activity (default: “concept:name”).timestamp_key (
str
) – Attribute to be used for the timestamp (default: “time:timestamp”).case_id_key (
str
) – Attribute to be used as case identifier (default: “case:concept:name”).disable_fallthroughs (
bool
) – Disables the Inductive Miner fall-throughs (default: False).
- Returns:
A tuple containing the Petri net, initial marking, and final marking.
- Return type:
Tuple[PetriNet, Marking, Marking]
import pm4py net, im, fm = pm4py.discover_petri_net_inductive( dataframe, activity_key='concept:name', case_id_key='case:concept:name', timestamp_key='time:timestamp' )