forked from SWISDATA/processintel
mining.inductive_infrequent: replace the InductiveMiningInfrequent class with a pure function #71
Labels
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
ffrauenberger/ProcessIntel#71
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: improvement (part of #66; the miner's result depends on the history of its instance)
Requested by: the user (2026-10-09)
Where
app/mining_algorithms/inductive_mining_infrequent.py:16-36—InductiveMiningInfrequent(InductiveMining); the constructor setsnoise_threshold,_last_noise_thresholdand_use_imf_filtersonself.app/mining_algorithms/inductive_mining_infrequent.py:38-73—generate_graphwrites the clampednoise_thresholdtoself, then calls the parent'sgenerate_graph.app/mining_algorithms/inductive_mining_infrequent.py:123,:141—_inductive_mining_imfsetsself._use_imf_filterstoFalseand thenTrueduring the recursion.app/mining_algorithms/inductive_mining_infrequent.py:200,:240,:323,:342— the base cases and fallthroughs readself._use_imf_filtersandself.noise_threshold.app/mining_algorithms/inductive_mining_infrequent.py:32—_last_noise_thresholdis set but never read.app/ui/inductive_miner_infrequent_ui/inductive_miner_infrequent_controller.py:65-77— the controller readsnoise_thresholdback from the instance.Problem
IMf passes a mode flag between recursion levels through
self._use_imf_filters. A recursive call on a sublog sets the flag, and the caller sees the value the callee left behind. Whether a filter applies thus depends on the order of the calls, not on the arguments. #18 (the single-activity base-case filter is never applied) is one result of this.Fix
Follow the plan in #66 (
code#write-simple-functional-code):mine_inductive_infrequent(log, params) -> MiningResult, withparamsholdingnoise_thresholdand the parameters ofmine_inductive.noise_thresholdand the filter mode as arguments to the recursive functions instead of reading them fromself._last_noise_threshold.InductiveMiningInfrequentdelegate to the new function until the controller has moved, then remove it.Check
mine_inductive_infrequenttwice with the same log and params and gets equal results.noise_thresholdfirst, then with the first again, and gets the same result as on a fresh call.git grep -n "class InductiveMiningInfrequent\|_use_imf_filters" appreturns nothing.from a session on 2026-10-09, split from #66