Conformance between an Event Log and a Petri net

conformance_alignment(
  eventlog,
  petrinet,
  initial_marking,
  final_marking,
  parameters = default_parameters(eventlog),
  variant = variant_state_equation_a_star(),
  convert = TRUE
)

variant_state_equation_a_star()

variant_dijkstra_no_heuristics()

Arguments

eventlog

A bupaR or PM4PY event log.

petrinet

A bupaR or PM4PY Petri net.

initial_marking

A R vector with the place identifiers of the initial marking or a PM4PY marking. By default the initial marking of the bupaR Petri net will be used if available.

final_marking

A R vector with the place identifiers of the final marking or a PM4PY marking.

parameters

PM4PY conformance parameter. By default the activity_key from the bupaR event log is specified using param_activity_key.

variant

The conformance variant to be used.

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.

Value

A data frame describing the conformance result. In case of conformance_alignment a data frame of log and model moves.

Examples

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", ] # Discover a Petri net net <- discovery_inductive(patients_completes) # Align event log and Petri net a <- conformance_alignment(patients_completes, net$petrinet, net$initial_marking, net$final_marking) # Alignment is returned as data frame head(a) }
#> case_id log_id model_id #> 1 1 t_Registration_0 d19b8727-77ea-4a83-8046-6acda08c08b8 #> 2 1 t_Triage and Assessment_1 e44ad74a-e132-4bc5-bbc3-16175413b845 #> 3 1 t_Blood test_2 cd199d8d-f067-4a85-afc1-414b1339b8b0 #> 4 1 t_MRI SCAN_3 28f48800-0941-4a8a-82c4-fbe5953bea8b #> 5 1 >> skip_3 #> 6 1 t_Discuss Results_4 5e749531-3434-4d69-9ffc-faa2bb012396 #> log_label model_label cost visited_states queued_states #> 1 Registration Registration 1 7 23 #> 2 Triage and Assessment Triage and Assessment 1 7 23 #> 3 Blood test Blood test 1 7 23 #> 4 MRI SCAN MRI SCAN 1 7 23 #> 5 >> <NA> 1 7 23 #> 6 Discuss Results Discuss Results 1 7 23 #> traversed_arcs fitness #> 1 23 1 #> 2 23 1 #> 3 23 1 #> 4 23 1 #> 5 23 1 #> 6 23 1