forked from SWISDATA/processintel
mining.inductive_infrequent: the single-activity base-case filter is never applied #18
Labels
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
ffrauenberger/ProcessIntel#18
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Severity: low (one IMf noise filter never runs)
Where
app/mining_algorithms/inductive_mining_infrequent.py:123-127,:187-218app/logs/splits_imf.py:373Problem
_inductive_mining_imfsetsself._use_imf_filters = Falseright before calling_base_cases_imf. The IMf branch inside it (if self._use_imf_filters: … is_single_activity_frequent(...)) can therefore never run. Phase 2 switches the flag toTruebut does not check the base cases again.As a result,
is_single_activity_frequent(splits_imf.py:373) is effectively unused, and the Noise Threshold has no effect on single-activity sub-logs, unlike in Leemans et al. (2014), Section 3.2.The flag is also shared, mutable instance state that recursive calls toggle, so what a parent sees after a child returns depends on how far the child got.
Steps to reproduce
Expected behavior
The noise threshold filters infrequent behaviour in single-activity base cases, as described in the IMf paper.
Actual behavior
The single-activity filter is never executed; the noise threshold has no effect there.
Fix
Pass
use_filtersas a parameter through the recursion instead of instance state. In phase 2, run the base cases again with filtering enabled.from
issues/BUG-018-imf-single-activity-base-case-filter-is-dead-code.md(code analysis of commit6bcc646, 2026-10-03)Reviewed by Codex (GPT-6) against origin/main
6bcc646eb464.Review: partially correct.
The
is_single_activity_frequent()branch is unreachable in the normal mining pipeline, as reported. However, “the noise threshold has no effect on single-activity sub-logs” is too broad, especially for the proposed zero-occurrence reproduction. Empty traces are handled separately by_handle_empty_trace_imf()(lines 240–256), and that path does use the noise threshold. Reproduced{('a',):100, ():10}: threshold 0.05 yields('xor','tau','a'); threshold 0.5 yields'a'. With{('a',):100, ('a','a'):1}, both thresholds yield a loop. Scope the missing filter to infrequent repetitions, while preserving the functioning empty-trace filter.Code references: app/mining_algorithms/inductive_mining_infrequent.py:123, app/mining_algorithms/inductive_mining_infrequent.py:240.