Petri net discovery algorithms
PM4PY discovery algorithms that discover a Petri net and its initial and final marking. Currently the Inductive Miner and the Alpha Miner are implemented.
discovery_inductive( eventlog, parameters = default_parameters(eventlog), variant = variant_inductive_imdfb(), convert = TRUE ) variant_inductive_imdfb() variant_inductive_only_dfg() discovery_alpha( eventlog, parameters = default_parameters(eventlog), variant = variant_alpha_classic(), convert = TRUE ) variant_alpha_classic() variant_alpha_plus()
eventlog |
A bupaR event log or an R data frame. |
parameters |
A named list of PM4PY parameters (see parameters) as required by the discovery method.
By default, if the |
variant |
The variant of the discovery algorithm to be used.
For Inductive Miner currently only |
convert |
TRUE to automatically convert Python objects to their R equivalent. If you pass FALSE you can do manual conversion using the r-py-conversion function. |
A named list with elements petrinet
, initial_marking
, and final_marking
or the original Python object.
if (pm4py_available()) { library(eventdataR) data(patients) # As Inductive Miner of PM4PY is not life-cycle aware, keep only `complete` events: patients_completes <- patients[patients$registration_type == "complete", ] net <- discovery_inductive(patients_completes) # Show details of the obtained bupaR Petri net print(net$petrinet) # initial marking is a character vector print(net$initial_marking) # final marking is a character vector print(net$final_marking) # Petri net can be used with other bupaR functions petrinetR::render_PN(net$petrinet) # Keep an unconverted PM4PY Petri net for use in other PM4PY functions py_net <- discovery_inductive(patients_completes, convert = FALSE) }
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.