forked from SWISDATA/processintel
mining.fuzzy: replace the FuzzyMining class with a pure function #69
Labels
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
ffrauenberger/ProcessIntel#69
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/fuzzy_mining.py:8-34—FuzzyMining(BaseMining); the constructor sets about 15 fields (clustered_nodes,sign_dict,removed_edges, the five fuzzy parameters, …).app/mining_algorithms/fuzzy_mining.py:36-156—generate_graphwrites all parameters toself, then intermediate results (corr_after_first_rule,sign_after_first_rule,removed_edges,list_of_clustered_nodes,sign_dict,cluster_id_mapping) and finallyself.graph.app/mining_algorithms/fuzzy_mining.py:909-922— getters for the five fuzzy parameters.app/mining_algorithms/fuzzy_mining.py:944-953—_calculate_filtered_model_statestorescorrelation_of_nodes,significance_of_nodesandnode_significance_matrixonself.app/converters/dfg_converter.py:120-150—build_fuzzy_graph(miner, data)setsminer.graphand calls private miner methods through name mangling (#50).app/ui/fuzzy_miner_ui/fuzzy_miner_controller.py:56-90,:116-135,:148-149— the controller reads the getters andedge_absolute_countsfrom the instance.Problem
The fuzzy miner is the largest stateful miner. Its steps pass intermediate results to each other through
self, and the converter reaches back into the instance to draw the graph. A step's result depends on which fields an earlier step or an earlier run left behind.Fix
Follow the plan in #66 (
code#write-simple-functional-code):mine_fuzzy(log, params) -> MiningResult, withparamsholding the unary and binary significance, correlation, edge cutoff, utility ratio and the shared filter thresholds.MiningResultholds the graph and the effective parameters the controller now reads through getters.BaseMining(#66).FuzzyMiningdelegate tomine_fuzzyuntil the controller has moved, then remove it.Related: #40 (cubic loops in the fuzzy miner) is easier once the steps are separate functions.
Check
mine_fuzzytwice with the same log and params and gets equal results.git grep -n "class FuzzyMining\|_FuzzyMining__" appreturns nothing.from a session on 2026-10-09, split from #66