forked from SWISDATA/processintel
mining.heuristic: replace the HeuristicMining class with a pure function #68
Labels
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
ffrauenberger/ProcessIntel#68
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/heuristic_mining.py:8-18—HeuristicMining(BaseMining); the constructor setsdependency_matrix,dependency_thresholdandmin_edge_thicknessonself.app/mining_algorithms/heuristic_mining.py:20-74—generate_graphwrites all thresholds anddependency_matrixtoself, then setsself.graph,self.start_nodesandself.end_nodes.app/mining_algorithms/heuristic_mining.py:76-77—get_thresholdreads the threshold back.app/mining_algorithms/heuristic_mining.py:79-127— the dependency matrix and graph helpers readself.app/ui/heuristic_miner_ui/heuristic_miner_controller.py:59-68,:87-102,:115-116— the controller readsget_threshold, the edge threshold getters andedge_absolute_countsfrom the instance.Problem
generate_graphkeeps its input and its result on the instance. The controller then asks the instance for the thresholds it used and compares them with the UI to decide whether to mine again. So the result and the "changed" check depend on what the instance did before.Fix
Follow the plan in #66 (
code#write-simple-functional-code):mine_heuristic(log, params) -> MiningResult, withparamsholding the SPM, node and edge frequency and dependency thresholds.MiningResultholds the graph, the start and end nodes, and the effective thresholds the controller now reads through getters (including the maximum edge count it takes fromedge_absolute_counts).BaseMining(#66).HeuristicMiningdelegate tomine_heuristicuntil the controller has moved, then remove it.Check
mine_heuristictwice with the same log and params and gets equal results.git grep -n "class HeuristicMining" appreturns nothing.from a session on 2026-10-09, split from #66