mining.inductive_infrequent: the single-activity base-case filter is never applied #18

Open
opened 2026-10-06 13:47:34 +00:00 by ffrauenberger · 1 comment
Owner

Severity: low (one IMf noise filter never runs)

Where

  • app/mining_algorithms/inductive_mining_infrequent.py:123-127, :187-218
  • app/logs/splits_imf.py:373

Problem

_inductive_mining_imf sets self._use_imf_filters = False right 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 to True but 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

  1. Import a log in which a sub-log consists of a single activity that sometimes occurs zero times or repeats infrequently
  2. Mine with IMf and vary the Noise Threshold

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_filters as 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 commit 6bcc646, 2026-10-03)

**Severity:** low (one IMf noise filter never runs) ## Where - `app/mining_algorithms/inductive_mining_infrequent.py:123-127`, `:187-218` - `app/logs/splits_imf.py:373` ## Problem `_inductive_mining_imf` sets `self._use_imf_filters = False` right 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 to `True` but 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 1. Import a log in which a sub-log consists of a single activity that sometimes occurs zero times or repeats infrequently 2. Mine with IMf and vary the *Noise Threshold* ### 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_filters` as 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 commit 6bcc646, 2026-10-03)
Author
Owner

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.

Reviewed by **Codex (GPT-6)** against origin/main [`6bcc646eb464`](https://code.swisdata.eu/ffrauenberger/ProcessIntel/commit/6bcc646eb464e0dd897228b5e49867f65d7255c4). **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](https://code.swisdata.eu/ffrauenberger/ProcessIntel/src/commit/6bcc646eb464e0dd897228b5e49867f65d7255c4/app/mining_algorithms/inductive_mining_infrequent.py#L123), [app/mining_algorithms/inductive_mining_infrequent.py:240](https://code.swisdata.eu/ffrauenberger/ProcessIntel/src/commit/6bcc646eb464e0dd897228b5e49867f65d7255c4/app/mining_algorithms/inductive_mining_infrequent.py#L240).
Sign in to join this conversation.
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
ffrauenberger/ProcessIntel#18
No description provided.