bupaverse / bupaR

Core R package for business process analysis
http://www.bupar.net
Other
56 stars 6 forks source link

processing_time doesnt work when group by resource_id #20

Closed kc3cheng closed 4 years ago

kc3cheng commented 4 years ago

Hi, I encountered the following error when trying to use processing_time after grouping by resource

bug_group_by_resource_id

However, after setting resource to another variable and then group by resource (the variable previously being assigned as resource_id), it works.

bug_group_by_resource_id_2

Can anyone figure out the error? Thanks!

NOTE: the dataset sepsis used is available in bupaR package.

gertjanssenswillen commented 4 years ago

At this moment it is advised not to use group_by with any mapped process component (or the short cuts) when computing metrics.

Instead, you can use the "resource-activity" level in processing_time, to compute processing times for combinaties of resources and acitivites

OR

you can create a duplicate column of the resource id and use this to do the grouping.

Several edeaR functionalities currently do not work when the log is grouped on a one of the components. This issue is to be resolved in future version those. The levels in metrics (such as processing time) also have the role of a "grouping" which is used preferably.

Hope this helps. It is a known issue and a generic solution is still to be created.

(The group_by shortcuts such as group_by_resource are created to help with event data manipulation steps, where they can still be helpful).

kc3cheng commented 4 years ago

Thanks for the response!