Repository navigation
Inductive Miner: the strict sequence cut and the every-pair test (Leemans 2017) - #62
Merged
Merged
Conversation
…om Leemans 2017 The sequence cut accepted a partition when some pair of activities reached across it; the definition requires every pair. And the maximal cut made each optional stretch skippable on its own, ×(τ,a), ×(τ,c), where the strict sequence cut of Leemans' thesis (p. 233), which ProM and PM4Py follow, merges groups that can only be skipped together into ×(τ, →(a,c)). Both are implemented as the thesis has them; the How tab says when the strict step merged groups; the thesis is a reference on the IM topic, so Cite lists it. Two tests pin the two examples; the cross-check against PM4Py goes from 369 identical trees of 406 to 401, the guarantees holding on every log, and its docstring records both baselines. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01CxRhDznFAbwU3x78bugqqR
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changed
Two corrections to the Inductive Miner's sequence cut (
openprocess/mining/discovery/inductive.py), both taken from S.J.J. Leemans, Robust Process Mining with Guarantees (PhD thesis, TU/e 2017), which is what ProM's and PM4Py's implementations follow:maximal_sequence_cut, thesis p. 188). The definition of a sequence cut requires that every activity of an earlier group reaches every activity of a later group, and none reaches back. The old code merged groups and validated the cut with an any-pair test, so it accepted{b} | {a, c} | {d}for[<b,b,c,c,c,c>, <b,a,d,d>]althoughcreaches nothing; the definition gives{b} | {a, c, d}. Now computed as the thesis does: one group per activity, merge any two that hold a pair that reaches both ways or neither way, until nothing merges, then order by reachability and validate every pair.merge_skippable_groups, thesis p. 233). After the maximal cut, a group that some trace gets past without visiting absorbs the neighbouring groups that can only be entered through it or only leave through it, so an optional stretch is one skippable block:[<b>^4, <b,b,a,c>]gives→(↺(b,τ), ×(τ, →(a,c)))instead of→(↺(b,τ), ×(τ,a), ×(τ,c)), which also allowed<b,a>and<b,c>.Around it: the How tab shows a line under a sequence cut when the strict step merged groups; the thesis is a reference on the IM topic (
references.py,docs/references.mdregenerated), so Cite on the box lists it; the module docstring explains the strict step; two tests pin the two examples and check the textbook log is unchanged;tests/cross_check_inductive_miner.pyrecords both baselines; CHANGELOG under 0.11.2.Effect
Cross-check against PM4Py 2.7.23 (seed 2026, 6 textbook + 400 random logs):
Three other seeds (300 random logs each): 302, 301 and 303 identical. The remaining differences are all fall-throughs on logs that have no cut at all, where the two implementations try the fall-throughs in a different order; precision is equal or goes either way.
This changes discovered models wherever a log has a skippable stretch. The textbook logs and every existing test expectation are unchanged. A saved analysis with such a log will show "This run differs from the record" after the update, which is the badge doing its job.
Checked
🤖 Generated with Claude Code
https://claude.ai/code/session_01CxRhDznFAbwU3x78bugqqR
Generated by Claude Code