pm4py / pm4py-core

Public repository for the PM4Py (Process Mining for Python) project.
https://pm4py.fit.fraunhofer.de
GNU General Public License v3.0
722 stars 286 forks source link

Bug in organizational mining setting Activity Key #295

Closed Th0m4sR closed 2 years ago

Th0m4sR commented 2 years ago

Hi,

when trying to apply organizational mining on my data set I realized a different behavior than I had with the example data sets of the documentation, i.e. it took my resources key as key for the activities instead of the parameter that I actually passed as key for the activities at a certain point. Looking into pm4py/algo/organizational_mining/util.py I saw in the function get_groups_from_log in line 58 it sets:

activity_key = exec_utils.get_param_value(Parameters.RESOURCE_KEY, parameters, xes_constants.DEFAULT_NAME_KEY)

So the activity key is actually set to the resource key what causes the error. It may be easily fixed by changing line 58 of pm4py/algo/organizational_mining/util.py to:

activity_key = exec_utils.get_param_value(Parameters.ACTIVITY_KEY, parameters, xes_constants.DEFAULT_NAME_KEY)

Kind regards

fit-alessandro-berti commented 2 years ago

Dear Th0m4sR,

Very thanks for spotting this :)

We'll release a fix in the upcoming release

fit-sebastiaan-van-zelst commented 2 years ago

This issue is fixed in https://github.com/pm4py/pm4py-core/releases/tag/2.2.17