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

Submodules

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

This file is part of PM4Py (More Info: https://pm4py.fit.fraunhofer.de).

PM4Py is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

PM4Py 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 General Public License for more details.

You should have received a copy of the GNU General Public License along with PM4Py. If not, see <https://www.gnu.org/licenses/>.

class pm4py.algo.discovery.ocel.interleavings.variants.timestamp_interleavings.Parameters(value)[source]

Bases: enum.Enum

An enumeration.

ACTIVITY_KEY = 'pm4py:param:activity_key'
CASE_ID_KEY = 'pm4py:param:case_id_key'
DIRECTION = 'direction_param'
INDEX_KEY = 'index_key'
LEFT_INDEX = 'left_index_param'
LEFT_SUFFIX = 'left_suffix'
RIGHT_INDEX = 'right_index_param'
RIGHT_SUFFIX = 'right_suffix'
SOURCE_ACTIVITY = 'source_activity_param'
SOURCE_TIMESTAMP = 'source_timestamp_param'
TARGET_ACTIVITY = 'target_activity_param'
TARGET_TIMESTAMP = 'target_timestamp_param'
TIMESTAMP_DIFF = 'timestamp_diff'
TIMESTAMP_KEY = 'pm4py:param:timestamp_key'
pm4py.algo.discovery.ocel.interleavings.variants.timestamp_interleavings.apply(left_df: pandas.core.frame.DataFrame, right_df: pandas.core.frame.DataFrame, case_relations: pandas.core.frame.DataFrame, parameters: Optional[Dict[Any, Any]] = 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

Module contents

This file is part of PM4Py (More Info: https://pm4py.fit.fraunhofer.de).

PM4Py is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

PM4Py 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 General Public License for more details.

You should have received a copy of the GNU General Public License along with PM4Py. If not, see <https://www.gnu.org/licenses/>.