pm4py.algo.conformance.tokenreplay.diagnostics.duration_diagnostics module#

class pm4py.algo.conformance.tokenreplay.diagnostics.duration_diagnostics.Parameters(*values)[source]#

Bases: Enum

TIMESTAMP_KEY = 'pm4py:param:timestamp_key'#
pm4py.algo.conformance.tokenreplay.diagnostics.duration_diagnostics.get_case_duration(case, timestamp_key='time:timestamp')[source]#

Gets the duration of a case

Parameters:
  • case – Case

  • timestamp_key – Attribute of the event to use as timestamp

Returns:

Case duration

Return type:

case_duration

pm4py.algo.conformance.tokenreplay.diagnostics.duration_diagnostics.get_median_case_duration(list_cases, timestamp_key='time:timestamp')[source]#

Gets the median case duration of a list of cases

Parameters:
  • list_cases – List of cases

  • timestamp_key – Attribute of the event to use as timestamp

Returns:

Median case duration

Return type:

median_case_duration

pm4py.algo.conformance.tokenreplay.diagnostics.duration_diagnostics.diagnose_from_notexisting_activities(log, notexisting_activities_in_model, parameters=None)[source]#

Provide some conformance diagnostics related to activities that are not present in the model

Parameters:
  • log – Trace log

  • notexisting_activities_in_model – Not existing activities in the model

  • parameters

    Possible parameters of the algorithm, including:

    Parameters.TIMESTAMP_KEY -> attribute of the event containing the timestamp

Returns:

For each problematic activity, diagnostics about case duration

Return type:

diagnostics

pm4py.algo.conformance.tokenreplay.diagnostics.duration_diagnostics.diagnose_from_trans_fitness(log, trans_fitness, parameters=None)[source]#

Provide some conformance diagnostics related to transitions that are executed in a unfit manner

Parameters:
  • log – Trace log

  • trans_fitness – For each transition, keeps track of unfit executions

  • parameters

    Possible parameters of the algorithm, including:

    Parameters.TIMESTAMP_KEY -> attribute of the event containing the timestamp

Returns:

For each problematic transition, diagnostics about case duration

Return type:

diagnostics