pm4py.objects.conversion.log.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.objects.conversion.log.variants.df_to_event_log_1v 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.conversion.log.variants.df_to_event_log_1v.apply(df, parameters=None)[source]#

Convert a dataframe into a log containing 1 case per variant (only control-flow perspective is considered)

Parameters#

df

Dataframe

parameters

Parameters of the algorithm

Returns#

log

Event log

pm4py.objects.conversion.log.variants.df_to_event_log_nv 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.conversion.log.variants.df_to_event_log_nv.apply(df, parameters=None)[source]#

Convert a dataframe into a log containing N case per variant (only control-flow perspective is considered)

Parameters#

df

Dataframe

parameters

Parameters of the algorithm

Returns#

log

Event log

pm4py.objects.conversion.log.variants.to_data_frame 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.conversion.log.variants.to_data_frame.Parameters(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)[source]#

Bases: Enum

DEEP_COPY = 'deepcopy'#
STREAM_POST_PROCESSING = 'stream_postprocessing'#
CASE_ATTRIBUTE_PREFIX = 'case_attribute_prefix'#
pm4py.objects.conversion.log.variants.to_data_frame.apply(log, parameters=None)[source]#

Converts a provided event log object into a Pandas dataframe. As a basis, an EventStream object is used. In case an EventLog object is given, it is first converted to an EventStream object. Within the conversion, the order is not changed, i.e., the order imposed by the iterator is used.

Parameters#

log pm4py.log.log.EventLog

Event log object, can either be an EventLog object, EventStream Object or Pandas dataframe

parameters dict

Parameters of the algorithm (currently, this converter is parameter free)

Returns#

df

Pandas dataframe

pm4py.objects.conversion.log.variants.to_event_log 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.conversion.log.variants.to_event_log.Parameters(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)[source]#

Bases: Enum

DEEP_COPY = 'deepcopy'#
STREAM_POST_PROCESSING = 'stream_postprocessing'#
CASE_ATTRIBUTE_PREFIX = 'case_attribute_prefix'#
CASE_ID_KEY = 'pm4py:param:case_id_key'#
pm4py.objects.conversion.log.variants.to_event_log.apply(log, parameters=None)[source]#

pm4py.objects.conversion.log.variants.to_event_stream 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.conversion.log.variants.to_event_stream.Parameters(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)[source]#

Bases: Enum

DEEP_COPY = 'deepcopy'#
STREAM_POST_PROCESSING = 'stream_postprocessing'#
CASE_ATTRIBUTE_PREFIX = 'case_attribute_prefix'#
INCLUDE_CASE_ATTRIBUTES = 'include_case_attributes'#
COMPRESS = 'compress'#
EXTENSIONS = 'extensions'#
pm4py.objects.conversion.log.variants.to_event_stream.apply(log, parameters=None)[source]#

Converts the event log to an event stream

Parameters#

log: pm4py.log.log.EventLog

An Event log

include_case_attributes:

Default is True

case_attribute_prefix:

Default is ‘case:’

enable_deepcopy

Enables deepcopy (avoid references between input and output objects)

Returns
logpm4py.log.log.EventLog

An Event stream

pm4py.objects.conversion.log.variants.to_nx 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.conversion.log.variants.to_nx.Parameters(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)[source]#

Bases: Enum

INCLUDE_DF = 'include_df'#
CASE_ID_ATTRIBUTE = 'case_id_attribute'#
OTHER_CASE_ATTRIBUTES_AS_NODES = 'other_case_attributes_as_nodes'#
EVENT_ATTRIBUTES_AS_NODES = 'event_attributes_as_nodes'#
pm4py.objects.conversion.log.variants.to_nx.apply(log_obj: EventLog | EventStream | DataFrame, parameters: Dict[Any, Any] | None = None)[source]#

Converts an event log object to a NetworkX DiGraph object. The nodes of the graph are the events, the cases (and possibly the attributes of the log). The edges are: - Connecting each event to the corresponding case (BELONGS_TO type) - Connecting every event to the directly-following one (DF type, if enabled) - Connecting every case/event to the given attribute values (ATTRIBUTE_EDGE type)

Parameters#

log_obj

Log object (EventLog, EventStream, Pandas dataframe)

parameters

Parameters of the conversion, including: - Parameters.INCLUDE_DF => include the directly-follows graph relation in the graph - Parameters.CASE_ID_ATTRIBUTE => specify which attribute at the case level should be considered the case ID - Parameters.OTHER_CASE_ATTRIBUTES_AS_NODES => specify which attributes at the case level should be inserted in the graph as nodes (other than the caseID) (list, default empty) - Parameters.EVENT_ATTRIBUTES_AS_NODES => specify which attributes at the event level should be inserted in the graph as nodes (list, default empty)

Returns#

nx_digraph

NetworkX DiGraph object