pm4py.algo.discovery.ocel.interleavings.variants package#

PM4Py – A Process Mining Library for Python

Copyright (C) 2024 Process Intelligence Solutions UG (haftungsbeschränkt)

This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details.

You should have received a copy of the GNU Affero General Public License along with this program. If not, see this software project’s root or visit <https://www.gnu.org/licenses/>.

Website: https://processintelligence.solutions Contact: info@processintelligence.solutions

Submodules#

pm4py.algo.discovery.ocel.interleavings.variants.timestamp_interleavings module#

PM4Py – A Process Mining Library for Python

Copyright (C) 2024 Process Intelligence Solutions UG (haftungsbeschränkt)

This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details.

You should have received a copy of the GNU Affero General Public License along with this program. If not, see this software project’s root or visit <https://www.gnu.org/licenses/>.

Website: https://processintelligence.solutions Contact: info@processintelligence.solutions

class pm4py.algo.discovery.ocel.interleavings.variants.timestamp_interleavings.Parameters(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)[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#

interleavings_dataframe

Sorted interleaving dataframe