forked from SWISDATA/processintel
mining.inductive: replace the InductiveMining class with a pure function #70
Labels
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
ffrauenberger/ProcessIntel#70
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.py:17-36—InductiveMining(BaseMining); the constructor setstraces_threshold,filtered_log,use_petri_net,petri_netand two converters onself.app/mining_algorithms/inductive_mining.py:38-122—generate_graphwrites the thresholds anduse_petri_nettoself, thennode_sizes,filtered_log,self.graphandself.petri_net.app/mining_algorithms/inductive_mining.py:124-268—inductive_mining,base_cases,calculate_cut,fallthroughandget_log_alphabetare methods, though they work on thelogargument.app/ui/inductive_miner_ui/inductive_miner_controller.py:52,:69-81— the controller readsget_traces_threshold()anduse_petri_netback from the instance.Problem
The recursion itself works on the
logit gets, but it lives on a stateful class, andgenerate_graphkeeps its input and output on the instance. The controller decides whether to mine again by readinguse_petri_netand the traces threshold from the instance.InductiveMiningInfrequentsubclasses this class and overrides its methods, so the two miners share state as well (#71).Fix
Follow the plan in #66 (
code#write-simple-functional-code,code#classes-only-where-they-pay-off):mine_inductive(log, params) -> MiningResult, withparamsholdingtraces_threshold,use_petri_netand the shared filter thresholds.inductive_mining,base_cases,calculate_cut,fallthroughandget_log_alphabetbecome module functions of the log, which IMf (#71) can reuse or wrap without inheritance.MiningResultholds the graph (BPMN or Petri net), the Petri net where built, and the effective parameters.BaseMining(#66).InductiveMiningdelegate tomine_inductiveuntil the controller has moved, then remove it.Check
mine_inductivetwice with the same log and params, with and withoutuse_petri_net, and gets equal results.git grep -n "class InductiveMining\b" appreturns nothing.from a session on 2026-10-09, split from #66