compute_fitness
conformance::case_centric::alignmentsSourceCompute fitness stats from alignment results
Also constructs the empty-trace alignment (shortest path through model)
Also constructs the empty-trace alignment (shortest path through model)
Vec<VariantAlignmentResult>required
PetriNetrequiredA Petri net of [`Place`]s and [`Transition`]s
AlignmentOptionsOptions for computing alignment
import r4pm
align_res = [
{
"activities": ['example'],
"frequency": 1,
"result": {
"Ok": {
"cost": 1,
"moves": [
{
"SyncMove": {
"trace_event_index": 1,
"transition": 'example',
},
},
],
"states_visited": 1,
},
},
},
]
net = {
"arcs": [
{
"from_to": {"nodes": ['example', 'example'], "type": 'PlaceTransition'},
"weight": 1,
},
],
"places": {"something": {"id": '893f8ab9'}},
"transitions": {"something": {"id": '893f8ab9'}},
}
# Optional argument: options, can also be omitted
options = {
"cost_fn": {
"log_move_cost": 1,
"model_move_cost": 1,
"silent_move_cost": 1,
"sync_move_cost": 1,
},
}
res = r4pm.bindings.compute_fitness(align_res, net, options)process_mining/src/conformance/case_centric/alignments/mod.rs:204