pm4py.objects.dfg 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

Subpackages#

Submodules#

pm4py.objects.dfg.obj 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.objects.dfg.obj.DirectlyFollowsGraph(graph=None, start_activities=None, end_activities=None)[source]#

Bases: object

property graph: Counter[Tuple[Any, Any]]#
property start_activities: Counter[Any]#
property end_activities: Counter[Any]#
pm4py.objects.dfg.obj.DFG#

alias of DirectlyFollowsGraph

pm4py.objects.dfg.util 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

pm4py.objects.dfg.util.get_vertices(dfg: DirectlyFollowsGraph) Collection[Any][source]#

Returns the vertices of the dfg

Parameters:

dfg (DirectlyFollowsGraph) – input directly follows graph

Return type:

Collection[Any]

pm4py.objects.dfg.util.get_outgoing_arcs(dfg: DirectlyFollowsGraph) Dict[Any, Dict[Any, int]][source]#

Returns the outgoing arcs of the provided DFG graph. Returns a dictionary mapping each ‘source’ node onto its set of ‘target’ nodes and associated frequency.

Parameters:

dfg (DirectlyFollowsGraph) – DFG object

Return type:

Dict[str, Counter[str]]

pm4py.objects.dfg.util.get_incoming_arcs(dfg: DirectlyFollowsGraph) Dict[Any, Dict[Any, int]][source]#

Returns the incoming arcs of the provided DFG graph. Returns a dictionary mapping each ‘target’ node onto its set of ‘source’ nodes and associated frequency.

Parameters:

dfg (DirectlyFollowsGraph) – DFG object

Return type:

Dict[str, Counter[str]]

pm4py.objects.dfg.util.get_source_vertices(dfg: DirectlyFollowsGraph) Collection[Any][source]#

Gets source vertices from a Directly-Follows Graph. Vertices are returned that have no incoming arcs

Parameters:

dfg (DirectlyFollowsGraph) – DFG object

Return type:

Collection[Any]

pm4py.objects.dfg.util.get_sink_vertices(dfg: DirectlyFollowsGraph) Collection[Any][source]#

Gets sink vertices from a Directly-Follows Graph. Vertices are returned that have no outgoing arcs

Parameters:

dfg (DirectlyFollowsGraph) – DFG object

Return type:

Collection[Any]

pm4py.objects.dfg.util.get_transitive_relations(dfg: DirectlyFollowsGraph) Tuple[Dict[Any, Collection[Any]], Dict[Any, Collection[Any]]][source]#

Computes the full transitive relations in both directions (all activities reachable from a given activity and all activities that can reach the activity)

Parameters:

dfg (DirectlyFollowsGraph) – DFG object

Return type:

``Tuple[Dict[Any, Collection[Any]], Dict[Any, Collection[Any]]] first argument maps an activity on all other

activities that are able to reach the activity (‘transitive pre set’)

second argument maps an activity on all other activities that it can reach (transitively) (‘transitive post set’)

pm4py.objects.dfg.util.get_vertex_frequencies(dfg: DirectlyFollowsGraph) Dict[Any, int][source]#

Computes the number of times a vertex in the dfg is visited. The number equals the number of occurrences in the underlying log and is computed by summing up the incoming arc frequency and the number of starts in the vertex. The value is equal to the number of outgoing arcs combined with the number of endings of the vertex.

pm4py.objects.dfg.util.as_nx_graph(dfg: DirectlyFollowsGraph)[source]#
pm4py.objects.dfg.util.get_edges(dfg: DirectlyFollowsGraph) Collection[Tuple[Any, Any]][source]#