Skip to main content
Rust4PM

inductive_miner

process_mining::discovery::case_centric::inductive_miner

Related Examples(1)

Functions in this Module(3)

discover_inductive_net

discovery::case_centric::inductive_minerSource

Discovers an AcceptingPetriNet with the Inductive Miner, by converting the

discover_inductive_tree with ProcessTree::to_petri_net. Without a miner, the binding runs IMf at 0.2.

Reports progress as discover_inductive_tree.

Arguments
Import from .json, .xes, .xes.gz, or pass EventLog (converted automatically)

An Inductive Miner with its settings: one that recurses on the log, or the

AcceptingPetriNet

A [`PetriNet`] with an initial and a final marking

import r4pm
import r4pm.petri_net

# An EventLog works wherever an EventLogActivityProjection is expected.
log = r4pm.import_item("EventLog", "data/road-traffic-fines.xes.gz")

# Without a miner, the binding runs IMf with a noise threshold of 0.2.
imf = r4pm.bindings.discover_inductive_net(log)

# Variants: IM, IMf, IMa, IMd, IMfd. Presets: default, thesis, prom, pm4py.
imf_prom = r4pm.bindings.discover_inductive_net(
    log, r4pm.bindings.inductive_miner_options("IMf", "prom", 0.1)
)
# IMfd recurses on the directly-follows graph instead of the log.
imfd = r4pm.bindings.discover_inductive_net(
    log, r4pm.bindings.inductive_miner_options("IMfd")
)

for name, net in [("IMf", imf), ("IMf, ProM, 0.1", imf_prom), ("IMfd", imfd)]:
    print(f"{name}: {len(net['places'])} places, {len(net['transitions'])} transitions")

r4pm.petri_net.export_pnml(imf, "model.pnml")

discover_inductive_tree

discovery::case_centric::inductive_minerSource

Discovers a ProcessTree with the Inductive Miner.

See InductiveMiner for the variants and their settings, InductiveMinerVariant::options for a named variant under a preset, and the module documentation for an example. To read activities from an EventLog with a classifier, use discover_inductive_tree_from_log. Without a miner, the binding runs IMf at 0.2. Reports progress with stage "Mining process tree", counting the base cases, cuts and fall throughs found, with no total.

Arguments
Import from .json, .xes, .xes.gz, or pass EventLog (converted automatically)

An Inductive Miner with its settings: one that recurses on the log, or the

ProcessTree

Object-centric process tree struct that contains [`Node`] as root

import r4pm

# Also: .json, .xes.gz
log = r4pm.import_item('EventLogActivityProjection', 'log.xes')
res = r4pm.bindings.discover_inductive_tree(log)

inductive_miner_options

discovery::case_centric::inductive_minerSource

The settings of an Inductive Miner variant under a preset, with a noise threshold of 0.2

unless given. See InductiveMinerVariant::options.

Arguments

The published variants of the Inductive Miner.

Whose Inductive Miner a run follows.

f64= 0.2
InductiveMiner

An Inductive Miner with its settings: one that recurses on the log, or the

import r4pm

res = r4pm.bindings.inductive_miner_options('IM')