pm4py.algo.discovery.dfg.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.dfg.variants.case_attributes 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.dfg.variants.case_attributes.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'#
CASE_ATTRIBUTES = 'case_attributes'#
RETURN_NODES_ATTRIBUTES = 'return_nodes_attributes'#
pm4py.algo.discovery.dfg.variants.case_attributes.apply(log: EventLog, parameters: Dict[str | Parameters, Any] | None = None) Tuple[Dict[Tuple[str, str], Dict[str, Dict[str, Any]]], Dict[str, Dict[str, Dict[str, Any]]]] | Dict[Tuple[str, str], Dict[str, Dict[str, Any]]][source]#

Discovers a directly-follows graph from an event log, with the edges that are annotated with the different values for the given case attributes.

Parameters#

log

Event log

parameters

Parameters of the variant, including: - Parameters.ACTIVITY_KEY => the attribute to use as activity - Parameters.CASE_ATTRIBUTES => the case attributes that are used to annotate the edges (default: the case ID) - Parameters.RETURN_NODES_ATTRIBUTES => (optional) returns also a dictionary with the values of the attributes for each activity of the graph (default: False)

Returns#

dfg
Directly-follows graph (with the edges annotated with the specified case attributes), e.g.:
{(‘register request’, ‘examine casually’): {‘creator’: {‘Fluxicon Nitro’: 3}, ‘concept:name’:

{‘3’: 1, ‘6’: 1, ‘5’: 1}} …

nodes
(Optional) dictionary of activities (annotated with the specified case attributes), e.g.:
{‘register request’: {‘creator’: {‘Fluxicon Nitro’: 6}, ‘concept:name’:

{‘3’: 1, ‘2’: 1, ‘1’: 1, ‘6’: 1, ‘5’: 1, ‘4’: 1}} …

pm4py.algo.discovery.dfg.variants.clean 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.dfg.variants.clean.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'#
CASE_ID_KEY = 'pm4py:param:case_id_key'#
TIMESTAMP_KEY = 'pm4py:param:timestamp_key'#
pm4py.algo.discovery.dfg.variants.clean.apply(log: DataFrame, parameters: Dict[str, Any] | None = None) DirectlyFollowsGraph[source]#

pm4py.algo.discovery.dfg.variants.clean_polars 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.dfg.variants.clean_polars.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'#
CASE_ID_KEY = 'pm4py:param:case_id_key'#
TIMESTAMP_KEY = 'pm4py:param:timestamp_key'#
pm4py.algo.discovery.dfg.variants.clean_polars.apply(log: DataFrame, parameters: Dict[str, Any] | None = None) DirectlyFollowsGraph[source]#

pm4py.algo.discovery.dfg.variants.clean_time 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.dfg.variants.clean_time.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'#
CASE_ID_KEY = 'pm4py:param:case_id_key'#
TIMESTAMP_KEY = 'pm4py:param:timestamp_key'#
pm4py.algo.discovery.dfg.variants.clean_time.apply(log: DataFrame, parameters=None)[source]#

pm4py.algo.discovery.dfg.variants.freq_triples 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.dfg.variants.freq_triples.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'#
pm4py.algo.discovery.dfg.variants.freq_triples.apply(log: EventLog | EventStream, parameters: Dict[str | Parameters, Any] | None = None) Dict[Tuple[str, str, str], int][source]#
pm4py.algo.discovery.dfg.variants.freq_triples.freq_triples(log: EventLog | EventStream, parameters: Dict[str | Parameters, Any] | None = None) Dict[Tuple[str, str, str], int][source]#

Counts the number of directly follows occurrences, i.e. of the form <…a,b…>, in an event log.

Parameters#

log

Trace log

parameters
Possible parameters passed to the algorithms:

activity_key -> Attribute to use as activity

Returns#

dfg

DFG graph

pm4py.algo.discovery.dfg.variants.native 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.dfg.variants.native.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'#
WINDOW = 'window'#
KEEP_ONCE_PER_CASE = 'keep_once_per_case'#
pm4py.algo.discovery.dfg.variants.native.apply(log: EventLog | EventStream, parameters: Dict[str | Parameters, Any] | None = None) Dict[Tuple[str, str], int][source]#
pm4py.algo.discovery.dfg.variants.native.native(log: EventLog | EventStream, parameters: Dict[str | Parameters, Any] | None = None) Dict[Tuple[str, str], int][source]#

Counts the number of directly follows occurrences, i.e. of the form <…a,b…>, in an event log.

Parameters#

log

Trace log

parameters
Possible parameters passed to the algorithms:

activity_key -> Attribute to use as activity

Returns#

dfg

DFG graph

pm4py.algo.discovery.dfg.variants.performance 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.dfg.variants.performance.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'#
START_TIMESTAMP_KEY = 'pm4py:param:start_timestamp_key'#
TIMESTAMP_KEY = 'pm4py:param:timestamp_key'#
AGGREGATION_MEASURE = 'aggregationMeasure'#
BUSINESS_HOURS = 'business_hours'#
BUSINESS_HOUR_SLOTS = 'business_hour_slots'#
WORKCALENDAR = 'workcalendar'#
pm4py.algo.discovery.dfg.variants.performance.apply(log: EventLog | EventStream, parameters: Dict[str | Parameters, Any] | None = None) Dict[Tuple[str, str], float][source]#
pm4py.algo.discovery.dfg.variants.performance.performance(log: EventLog | EventStream, parameters: Dict[str | Parameters, Any] | None = None) Dict[Tuple[str, str], float][source]#

Measure performance between couples of attributes in the DFG graph

Parameters#

log

Log

parameters
Possible parameters passed to the algorithms:

aggregationMeasure -> performance aggregation measure (min, max, mean, median) activity_key -> Attribute to use as activity timestamp_key -> Attribute to use as timestamp

  • Parameters.BUSINESS_HOURS => calculates the difference of time based on the business hours, not the total time.

    Default: False

  • Parameters.BUSINESS_HOURS_SLOTS =>

work schedule of the company, provided as a list of tuples where each tuple represents one time slot of business hours. One slot i.e. one tuple consists of one start and one end time given in seconds since week start, e.g. [

(7 * 60 * 60, 17 * 60 * 60), ((24 + 7) * 60 * 60, (24 + 12) * 60 * 60), ((24 + 13) * 60 * 60, (24 + 17) * 60 * 60),

] meaning that business hours are Mondays 07:00 - 17:00 and Tuesdays 07:00 - 12:00 and 13:00 - 17:00

Returns#

dfg

DFG graph