Closed s-kimel closed 1 year ago
Dear @s-kimel
In this Petri net, Task 3 is dead, because it requires a token both in intplace_Task 1 and splace_in_Task 3_Task 2_0 and this is impossible to obtain.
Hence all the cases containing Task 3 are impossible to replay. Also the last case, Task 1, Task 2 and Task 5, is impossible to replay in the Petri net without leaving a remaining token in splace_in_Task 3_Task 2_0.
The fitness provided by the approach is therefore correct in my opinion
@fit-alessandro-berti You are correct. I am sorry about not noticing that. In the example above, I can get a model that has hidden transitions with pm4py.discover_petri_net_inductive(event_log)
that does produce the desired results because the model does not have the same issues with transitions begin dead or having remaining tokens.
Sorry again about missing the reason I was getting the results I was getting. I appreciate your reply!
When I do conformance checking with token based replay, it flags the traces with Task 3 as not fitting the model in the
trace_is_fit
key of the output.If I check the fitness, I also get that only once trace is fit with the model (25% of traces fit).
All traces do fit the model, but the ones where the hidden transition needs to fire are marked as not fitting. I saw that this was an issue with token based replay that was resolved in pm4py in this paper. I also see this in the docs
I saw this function which may do what I want, but I was not sure how to use it and could not find any examples:
pm4py.algo.conformance.tokenreplay.variants.token_replay.apply_hidden_trans
I am not sure what functions to use to get the output desired, which in this example would be that all trace_is_fit values would be True and the perc_fit_traces value would be 100.0.