pm4py.objects.ocel.util.event_prefix_suffix_per_obj module#

PM4Py – A Process Mining Library for Python Copyright (C) 2026 Process Intelligence Solutions GmbH

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.objects.ocel.util.event_prefix_suffix_per_obj.Parameters(*values)[source]#

Bases: Enum

PREFIX_OR_SUFFIX = 'prefix_or_suffix'#
INDEX_ATTRIBUTE = 'index_attribute'#
LEFT_SUFFIX = 'left_suffix'#
RIGHT_SUFFIX = 'right_suffix'#
pm4py.objects.ocel.util.event_prefix_suffix_per_obj.apply(ocel: OCEL, parameters: Dict[Any, Any] | None = None)[source]#

Gets for each event and each one of the related objects, the prefix or the suffix. E.g. if there is an object “o1” with lifecycle “e1”, “e2”, “e3”, then:

The prefix of “e1” for “o1” is empty. The prefix of “e2” for “o1” is [“e1”]. The prefix of “e3” for “o1” is [“e1”, “e2”].

The suffix of “e1” for “o1” is [“e2”, “e3”]. The suffix of “e2” for “o1” is [“o3”]. The suffix of “e3” for “o1” is empty.

Parameters:
  • ocel – Object-centric event log

  • parameters –

    Parameters of the algorithm, including:
    • Parameters.PREFIX_OR_SUFFIX => establishes if the prefix or the suffix of the event per object is
      needed. Possible values:
      • “prefix”

      • “suffix”

    • Parameters.INDEX_ATTRIBUTE => the index attribute which is artificially inserted in the relations df.

    • Parameters.LEFT_SUFFIX => the suffix for the left-part of the merge.

    • Parameters.RIGHT_SUFFIX => the suffix for the right-part of the merge

Returns:

A dictionary where the first key is the event, the second key is the object, and the value is a list of events which are the object-specific prefix or suffix of the event.

Return type:

ret