mining.fuzzy: the edge cutoff is not applied to cluster edges and edge statistics #16

Open
opened 2026-10-06 13:47:12 +00:00 by ffrauenberger · 0 comments
Owner

Severity: medium (the edge cutoff slider has no effect on cluster edges)

Where

  • app/mining_algorithms/fuzzy_mining.py:98, :164-170, :330-382, :924-942

Problem

self.removed_edges is built by __get_as_node_removed_indices, which returns a list of lists ([[a, b], …]), although it is annotated set[tuple[str, str]]. filter_edge then checks:

is_removed = (a, b) in self.removed_edges     # tuple never equals a list -> always False

Consequences:

  • get_edge_statistics() (BaseMining, uses filter_edge) treats utility-removed edges as kept.
  • Node→node edges have a separate list check in the drawing code, but cluster→node, node→cluster and cluster→cluster edges never check the removed edges. Edges removed by the edge cutoff still count towards aggregated cluster edges.

Steps to reproduce

  1. Open the application and import a log
  2. Select the Fuzzy Miner with settings that produce clusters
  3. Change Edge Cutoff / Utility Ratio so that some edges are removed
  4. Compare node→node edges with edges to/from clusters, and check the edge statistics

Expected behavior

Edges removed by the edge cutoff are excluded consistently, for all edge types and in the edge statistics.

Actual behavior

Removed edges are only excluded for node→node edges; they still appear in the statistics and in aggregated cluster edges. The sliders behave inconsistently depending on clustering.

Fix

Store removed edges as set[tuple[str, str]] and use that one representation in all four edge-drawing branches.


from issues/BUG-016-fuzzy-filter-edge-never-applies-utility-removal.md (code analysis of commit 6bcc646, 2026-10-03)

**Severity:** medium (the edge cutoff slider has no effect on cluster edges) ## Where - `app/mining_algorithms/fuzzy_mining.py:98`, `:164-170`, `:330-382`, `:924-942` ## Problem `self.removed_edges` is built by `__get_as_node_removed_indices`, which returns a **list of lists** (`[[a, b], …]`), although it is annotated `set[tuple[str, str]]`. `filter_edge` then checks: ```python is_removed = (a, b) in self.removed_edges # tuple never equals a list -> always False ``` Consequences: - `get_edge_statistics()` (BaseMining, uses `filter_edge`) treats utility-removed edges as kept. - Node→node edges have a separate list check in the drawing code, but cluster→node, node→cluster and cluster→cluster edges never check the removed edges. Edges removed by the edge cutoff still count towards aggregated cluster edges. ### Steps to reproduce 1. Open the application and import a log 2. Select the Fuzzy Miner with settings that produce clusters 3. Change *Edge Cutoff* / *Utility Ratio* so that some edges are removed 4. Compare node→node edges with edges to/from clusters, and check the edge statistics ### Expected behavior Edges removed by the edge cutoff are excluded consistently, for all edge types and in the edge statistics. ### Actual behavior Removed edges are only excluded for node→node edges; they still appear in the statistics and in aggregated cluster edges. The sliders behave inconsistently depending on clustering. ## Fix Store removed edges as `set[tuple[str, str]]` and use that one representation in all four edge-drawing branches. --- from `issues/BUG-016-fuzzy-filter-edge-never-applies-utility-removal.md` (code analysis of commit 6bcc646, 2026-10-03)
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#16
No description provided.