forked from SWISDATA/processintel
mining.alpha: replace the AlphaMining class with a pure function #67
Labels
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
ffrauenberger/ProcessIntel#67
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/alpha_mining.py:9-17—AlphaMining(BaseMining); the constructor builds the Petri net toolkit and converter and calls_calculate_filtered_model_state.app/mining_algorithms/alpha_mining.py:98-145—generate_graphwrites the thresholds toself, callsrecalculate_model_filters, then setsself.graphandself.petri_net, and adds toself.start_nodesandself.end_nodesin place.app/mining_algorithms/alpha_mining.py:298-309—_calculate_filtered_model_statestoresdirect_succession_set,causality_set,parallel_set,choice_set,xl_set,yl_setandfootprintonself.app/ui/alpha_miner_ui/alpha_miner_controller.py:26-27,:47,:68— the controller builds the class, compares parameters with the instance and callsgenerate_graph.Problem
The Alpha steps (succession, causality, parallel, choice, X_L, Y_L) are already almost pure static functions. But their results go through
self, andgenerate_graphadds the extra start and end nodes from the converter toself.start_nodesandself.end_nodes. These sets come fromBaseMining, so the next run starts from the grown sets.Fix
Follow the plan in #66 (
code#write-simple-functional-code,code#classes-only-where-they-pay-off):mine_alpha(log, params) -> MiningResult, withparamsholdingspm_thresholdand the node frequency thresholds.BaseMining(#66).AlphaMiningdelegate tomine_alphauntil the controller has moved, then remove it.Check
mine_alphatwice with the same log and params and gets equal results.git grep -n "class AlphaMining" appreturns nothing.from a session on 2026-10-09, split from #66