pm4py.algo.organizational_mining.roles.common package

Submodules

pm4py.algo.organizational_mining.roles.common.algorithm module

class pm4py.algo.organizational_mining.roles.common.algorithm.Parameters(value)[source]

Bases: enum.Enum

An enumeration.

ACTIVITY_KEY = 'pm4py:param:activity_key'
RESOURCE_KEY = 'pm4py:param:resource_key'
ROLES_THRESHOLD_PARAMETER = 'roles_threshold_parameter'
pm4py.algo.organizational_mining.roles.common.algorithm.aggregate_roles_algorithm(roles, parameters=None)[source]

Algorithm to aggregate similar roles

Parameters
  • roles – Roles

  • parameters – Parameters of the algorithm

Returns

(Aggregated) roles

Return type

agg_roles

pm4py.algo.organizational_mining.roles.common.algorithm.aggregate_roles_iteration(roles, parameters=None)[source]

Single iteration of the roles aggregation algorithm

Parameters
  • roles – Roles

  • parameters – Parameters of the algorithm

Returns

(Partially aggregated) roles

Return type

agg_roles

pm4py.algo.organizational_mining.roles.common.algorithm.apply(res_act_couples, parameters=None)[source]

Apply the roles detection, introduced by Burattin, Andrea, Alessandro Sperduti, and Marco Veluscek. “Business models enhancement through discovery of roles.” 2013 IEEE Symposium on Computational Intelligence and Data Mining (CIDM). IEEE, 2013.

Parameters
  • res_act_couples – (resource, activity) couples along with the number of occurrences

  • parameters – Parameters of the algorithm

Returns

List of roles (set of activities + multiset of resources)

Return type

roles

pm4py.algo.organizational_mining.roles.common.algorithm.find_multiset_intersection(role1, role2, normalize=False, parameters=None)[source]

Finds the intersection of a multiset

Parameters
  • role1 – First role originators

  • role2 – Second role originators

  • normalize – Do the normalization of the roles

  • parameters – Parameters of the algorithm

Returns

Intersection of the multiset

Return type

intersection

pm4py.algo.organizational_mining.roles.common.algorithm.find_multiset_union(role1, role2, normalize=False, parameters=None)[source]

Finds the union of a multiset

Parameters
  • role1 – First role originators

  • role2 – Second role originators

  • normalize – Do the normalization of the roles

  • parameters – Parameters of the algorithm

Returns

Union of the multiset

Return type

union

pm4py.algo.organizational_mining.roles.common.algorithm.find_role_similarity(roles, i, j, parameters=None)[source]

Calculate a number of similarity between different roles

Parameters
  • roles – List of roles

  • i – Index of the first role

  • j – Index of the second role

  • parameters – Parameters of the algorithm

Returns

Similarity measure

Return type

similarity

pm4py.algo.organizational_mining.roles.common.algorithm.get_initial_roles(res_act_couples, parameters=None)[source]

Get the initial list of roles (each activity is a stand-alone role)

Parameters
  • res_act_couples – (resource, activity) couples along with the number of occurrences

  • parameters – Parameters of the algorithm

Returns

List of roles (set of activities + multiset of resources)

Return type

roles

pm4py.algo.organizational_mining.roles.common.algorithm.get_sum_from_dictio_values(dictio, parameters=None)[source]

Get the sum of a dictionary values

Parameters
  • dictio – Dictionary

  • parameters – Parameters of the algorithm

Returns

Sum of the dictionary values

Return type

sum_values

pm4py.algo.organizational_mining.roles.common.algorithm.normalize_role(role, parameters=None)[source]

Normalize a role

Parameters
  • role – Originators of the role

  • parameters – Parameters of the algorithm

Returns

Normalized multiset of originators

Return type

normalized_role

Module contents