pm4py.algo.discovery.dfg.variants package

Submodules

pm4py.algo.discovery.dfg.variants.case_attributes module

class pm4py.algo.discovery.dfg.variants.case_attributes.Parameters(value)[source]

Bases: enum.Enum

An enumeration.

ACTIVITY_KEY = 'pm4py:param:activity_key'
CASE_ATTRIBUTES = 'case_attributes'
RETURN_NODES_ATTRIBUTES = 'return_nodes_attributes'
pm4py.algo.discovery.dfg.variants.case_attributes.apply(log: pm4py.objects.log.obj.EventLog, parameters: Optional[Dict[str, Any]] = None) → Union[Tuple[Dict[Tuple[str, str], Dict[str, Dict[str, Any]]], Dict[str, Dict[str, Dict[str, Any]]]], Dict[Tuple[str, str], Dict[str, Dict[str, Any]]]][source]

Discovers a directly-follows graph from an event log, with the edges that are annotated with the different values for the given case attributes.

Parameters
  • log – Event log

  • parameters – Parameters of the variant, including: - Parameters.ACTIVITY_KEY => the attribute to use as activity - Parameters.CASE_ATTRIBUTES => the case attributes that are used to annotate the edges (default: the case ID) - Parameters.RETURN_NODES_ATTRIBUTES => (optional) returns also a dictionary with the values of the attributes for each activity of the graph (default: False)

Returns

  • dfg

    Directly-follows graph (with the edges annotated with the specified case attributes), e.g.:
    {(‘register request’, ‘examine casually’): {‘creator’: {‘Fluxicon Nitro’: 3}, ‘concept:name’:

    {‘3’: 1, ‘6’: 1, ‘5’: 1}} …

  • nodes

    (Optional) dictionary of activities (annotated with the specified case attributes), e.g.:
    {‘register request’: {‘creator’: {‘Fluxicon Nitro’: 6}, ‘concept:name’:

    {‘3’: 1, ‘2’: 1, ‘1’: 1, ‘6’: 1, ‘5’: 1, ‘4’: 1}} …

pm4py.algo.discovery.dfg.variants.freq_triples module

class pm4py.algo.discovery.dfg.variants.freq_triples.Parameters(value)[source]

Bases: enum.Enum

An enumeration.

ACTIVITY_KEY = 'pm4py:param:activity_key'
pm4py.algo.discovery.dfg.variants.freq_triples.apply(log, parameters=None)[source]
pm4py.algo.discovery.dfg.variants.freq_triples.freq_triples(log, parameters=None)[source]

Counts the number of directly follows occurrences, i.e. of the form <…a,b…>, in an event log.

Parameters
  • log – Trace log

  • parameters

    Possible parameters passed to the algorithms:

    activity_key -> Attribute to use as activity

Returns

DFG graph

Return type

dfg

pm4py.algo.discovery.dfg.variants.native module

class pm4py.algo.discovery.dfg.variants.native.Parameters(value)[source]

Bases: enum.Enum

An enumeration.

ACTIVITY_KEY = 'pm4py:param:activity_key'
KEEP_ONCE_PER_CASE = 'keep_once_per_case'
WINDOW = 'window'
pm4py.algo.discovery.dfg.variants.native.apply(log, parameters=None)[source]
pm4py.algo.discovery.dfg.variants.native.native(log, parameters=None)[source]

Counts the number of directly follows occurrences, i.e. of the form <…a,b…>, in an event log.

Parameters
  • log – Trace log

  • parameters

    Possible parameters passed to the algorithms:

    activity_key -> Attribute to use as activity

Returns

DFG graph

Return type

dfg

pm4py.algo.discovery.dfg.variants.performance module

class pm4py.algo.discovery.dfg.variants.performance.Parameters(value)[source]

Bases: enum.Enum

An enumeration.

ACTIVITY_KEY = 'pm4py:param:activity_key'
AGGREGATION_MEASURE = 'aggregationMeasure'
BUSINESS_HOURS = 'business_hours'
START_TIMESTAMP_KEY = 'pm4py:param:start_timestamp_key'
TIMESTAMP_KEY = 'pm4py:param:timestamp_key'
WEEKENDS = 'weekends'
WORKTIMING = 'worktiming'
pm4py.algo.discovery.dfg.variants.performance.apply(log, parameters=None)[source]
pm4py.algo.discovery.dfg.variants.performance.performance(log, parameters=None)[source]

Measure performance between couples of attributes in the DFG graph

Parameters
  • log – Log

  • parameters

    Possible parameters passed to the algorithms:

    aggregationMeasure -> performance aggregation measure (min, max, mean, median) activity_key -> Attribute to use as activity timestamp_key -> Attribute to use as timestamp

    • Parameters.BUSINESS_HOURS => calculates the difference of time based on the business hours, not the total time.

      Default: False

    • Parameters.WORKTIMING => work schedule of the company (provided as a list where the first number is the start
      of the work time, and the second number is the end of the work time), if business hours are enabled

      Default: [7, 17] (work shift from 07:00 to 17:00)

    • Parameters.WEEKENDS => indexes of the days of the week that are weekend

      Default: [6, 7] (weekends are Saturday and Sunday)

Returns

DFG graph

Return type

dfg

Module contents