The pm4py.stats module contains the statistics offered in pm4py


get_activity_position_summary(log, activity)

Given an event log, returns a dictionary which summarize the positions of the activities in the different cases of the event log.

get_all_case_durations(log[, ...])

Gets the durations of the cases in the event log

get_case_arrival_average(log[, ...])

Gets the average difference between the start times of two consecutive cases

get_case_duration(log, case_id[, ...])

Gets the duration of a specific case

get_case_overlap(log[, activity_key, ...])

Associates to each case in the log the number of cases concurrently open

get_cycle_time(log[, activity_key, ...])

Calculates the cycle time of the event log.

get_end_activities(log[, activity_key, ...])

Returns the end activities of a log

get_event_attribute_values(log, attribute[, ...])

Returns the values for a specified (event) attribute


Returns the attributes at the event level of the log

get_frequent_trace_segments(log, min_occ[, ...])

Get the traces (segments of activities) from an event log object.

get_minimum_self_distance_witnesses(log[, ...])

This function derives the minimum self distance witnesses.

get_minimum_self_distances(log[, ...])

This algorithm computes the minimum self-distance for each activity observed in an event log.

get_rework_cases_per_activity(log[, ...])

Find out for which activities of the log the rework (more than one occurrence in the trace for the activity) occurs.

get_service_time(log[, aggregation_measure, ...])

Gets the activities' (average/median/...) service time in the provided event log

get_start_activities(log[, activity_key, ...])

Returns the start activities from a log object

get_stochastic_language(*args, **kwargs)

Gets the stochastic language from the provided object

get_trace_attribute_values(log, attribute[, ...])

Returns the values for a specified trace attribute


Gets the attributes at the trace level of a log object

get_variants(log[, activity_key, ...])

Gets the variants from the log

get_variants_as_tuples(log[, activity_key, ...])

Gets the variants from the log (where the keys are tuples and not strings)

get_variants_paths_duration(log[, ...])

Method that associates to a log object a Pandas dataframe aggregated by variants and positions (inside the variant). Each row is associated to different columns: - The variant - The position (in the variant) - The source activity (of the path) - The target activity (of the path) - An aggregation of the times between the two activities (for example, the mean over all the cases of the same variant) - The cumulative occurrences of the path inside the case (for example, the first A->B would be associated to 0, and the second A->B would be associated to 1).

split_by_process_variant(log[, ...])

Splits an event log into sub-dataframes for each process variant.