Process Discovery¶
Process discovery algorithms take an event log and produce a process model that describes the observed behavior.
Available algorithms¶
| Algorithm | Output | Key Idea |
|---|---|---|
| Alpha Miner | Petri Net | Footprint matrix from ordering relations (causality, parallelism, choice) |
| Heuristic Miner | Petri Net | Frequency-based dependency measure; noise-tolerant via dependency_threshold |
| Inductive Miner | Process Tree | Recursive activity partitioning via cut detection (sequence, XOR, parallel, loop) |
| DFG Discovery | Directly-Follows Graph | Direct succession counts between activities |
| DFG-to-Petri-Net | Petri Net | Structural conversion of any DFG into a Petri Net |
DFG Discovery¶
The simplest form of process discovery. Counts how often one activity directly follows another:
import synamine
log = synamine.read_xes("events.xes")
dfg = synamine.discover_dfg(log)
print(f"Activities: {len(dfg.activities)}")
print(f"Edges: {len(dfg.edges)}")
Noise filtering¶
Use noise_threshold to remove infrequent edges. A threshold of 0.1 removes edges that appear in less than 10% of cases relative to the most frequent edge:
Alpha Miner¶
Produces a Petri Net by analyzing ordering relations between activities (causality, parallelism, choice, unrelated):
pn = synamine.discover_petri_net(log, algorithm="alpha")
print(f"Transitions: {len(pn.transitions)}")
print(f"Places: {len(pn.places)}")
print(f"Arcs: {len(pn.arcs)}")
Info
The Alpha Miner assumes logs are complete and noise-free. For noisy real-world logs, consider the Heuristic Miner.
Heuristic Miner¶
A noise-tolerant alternative that uses frequency-based dependency measures:
Configuration¶
pn = synamine.discover_petri_net(
log,
algorithm="heuristic",
dependency_threshold=0.5, # minimum dependency score (default: 0.5)
and_threshold=0.65, # parallelism detection threshold
loop_two_threshold=0.5, # length-2 loop detection threshold
)
Inductive Miner¶
Produces a Process Tree by recursively partitioning activities. Guarantees sound models (no deadlocks):
pt = synamine.discover_process_tree(log)
print(f"Operator: {pt.operator}")
print(f"Children: {len(pt.children)}")
Noise filtering¶
Process Tree operators¶
| Operator | Symbol | Meaning |
|---|---|---|
SEQUENCE |
-> |
Execute children in order |
XOR |
X |
Execute exactly one child |
PARALLEL |
+ |
Execute all children in any order |
LOOP |
* |
Execute first child, then optionally repeat via second child |
DFG-to-Petri-Net Conversion¶
Convert any DFG into a Petri Net:
Variant Trie¶
A prefix tree of trace variants, useful for understanding the most common process paths:
See Visualization for rendering variant trie dendrograms.