pm4py.objects.oc_causal_net.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.oc_causal_net.obj.OCCausalNet(dependency_graph: MultiDiGraph, output_marker_groups: Dict[str, List[MarkerGroup]], input_marker_groups: Dict[str, List[MarkerGroup]], activity_count: Dict[str, int] = None, relative_occurrence_threshold: float = 0)[source]#

Bases: object

Object-Centric Causal Net capturing dependency graph and marker groups.

class Marker(related_activity, object_type, count_range: Tuple, marker_key: int)[source]#

Bases: object

Represents a single marker in an object-centric causal net.

property related_activity#
property object_type#
property count_range#
property min_count#
property max_count#
property marker_key#
class MarkerGroup(markers: List[Marker], support_count: int = inf)[source]#

Bases: object

Represents a group of markers. A group of markers semantically represents the AND gate of all markers in the group.

property dict_representation[source]#

Returns a dictionary representation of the marker group for efficient checking if the marker group can be bound with a given set of objects per related activity and object type. Is only computed once and cached. Is invalid if the marker group is changed after initialization. Assumes that the marker group is valid, i.e., there is at most one marker per related activity and object type.

Returns:

Dictionary representation of the marker group, mapping related activities to objects types to min and max cardinalities.

Return type:

defaultdict[str, defaultdict[str, tuple[int, int]]]

property key_constraints[source]#

Returns all tuples (related_activity, object_type, related_activity_2) that cannot share objects due to having the same key. Is only computed once and cached. Is invalid if the marker group is changed after initialization.

Returns:

List of tuples (related_activity, object_type, related_activity_2) that cannot share the same marker key.

Return type:

List[Tuple[str, str, str]]

property markers#
property support_count#
property dependency_graph#
property activities#
property edges#
property input_marker_groups#
property output_marker_groups#
property object_types#
property activity_count#
property relative_occurrence_threshold#