pm4py.algo.discovery.ocel.interleavings.variants.timestamp_interleavings module#
- class pm4py.algo.discovery.ocel.interleavings.variants.timestamp_interleavings.Parameters(*values)[source]#
Bases:
Enum- ACTIVITY_KEY = 'pm4py:param:activity_key'#
- TIMESTAMP_KEY = 'pm4py:param:timestamp_key'#
- CASE_ID_KEY = 'pm4py:param:case_id_key'#
- LEFT_SUFFIX = 'left_suffix'#
- RIGHT_SUFFIX = 'right_suffix'#
- INDEX_KEY = 'index_key'#
- SOURCE_ACTIVITY = 'source_activity_param'#
- TARGET_ACTIVITY = 'target_activity_param'#
- SOURCE_TIMESTAMP = 'source_timestamp_param'#
- TARGET_TIMESTAMP = 'target_timestamp_param'#
- LEFT_INDEX = 'left_index_param'#
- RIGHT_INDEX = 'right_index_param'#
- DIRECTION = 'direction_param'#
- TIMESTAMP_DIFF = 'timestamp_diff'#
- pm4py.algo.discovery.ocel.interleavings.variants.timestamp_interleavings.apply(left_df: DataFrame, right_df: DataFrame, case_relations: DataFrame, parameters: Dict[Any, Any] | None = None)[source]#
Calculates the timestamp-based interleavings ongoing from the left/right to the right/left dataframe.
- Parameters:
left_df – Left dataframe
right_df – Right dataframe
case_relations – Dictionary associating the cases of the first dataframe (column: case:concept:name_LEFT) to the cases of the second dataframe (column: case:concept:name_RIGHT)
parameters – Parameters of the algorithm, including: - Parameters.ACTIVITY_KEY => the attribute to use as activity - Parameters.TIMESTAMP_KEY => the attribute to use as timestamp - Parameters.CASE_ID_KEY => the attribute to use as case identifier - Parameters.LEFT_SUFFIX => the suffix for the columns of the left dataframe - Parameters.RIGHT_SUFFIX => the suffix for the columns of the right dataframe - Parameters.INDEX_KEY => the index column in the dataframe - Parameters.SOURCE_ACTIVITY => the source activity of the interleaving - Parameters.TARGET_ACTIVITY => the target activity of the interleaving - Parameters.SOURCE_TIMESTAMP => the source timestamp of the interleaving - Parameters.TARGET_TIMESTAMP => the target timestamp of the interleaving - Parameters.LEFT_INDEX => the index of the event of the left-dataframe in the interleaving - Parameters.RIGHT_INDEX => the index of the event of the right-dataframe in the interleaving - Parameters.DIRECTION => the direction of the interleaving (LR: left to right; RL: right to left) - Parameters.TIMESTAMP_DIFF => the difference between the timestamps of the interleaving
- Returns:
Sorted interleaving dataframe
- Return type:
interleavings_dataframe