pm4py.algo.transformation.ocel.features.events package¶
Submodules¶
pm4py.algo.transformation.ocel.features.events.algorithm module¶
This file is part of PM4Py (More Info: https://pm4py.fit.fraunhofer.de).
PM4Py is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
PM4Py 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 General Public License for more details.
You should have received a copy of the GNU General Public License along with PM4Py. If not, see <https://www.gnu.org/licenses/>.
-
class
pm4py.algo.transformation.ocel.features.events.algorithm.Parameters[source]¶ Bases:
enum.EnumAn enumeration.
-
ENABLE_ALL= 'enable_all'¶
-
ENABLE_EVENT_ACTIVITY= 'enable_event_activity'¶
-
ENABLE_EVENT_END_OT= 'enable_event_end_ot'¶
-
ENABLE_EVENT_NUM_ATTRIBUTES= 'enable_event_num_attributes'¶
-
ENABLE_EVENT_NUM_REL_OBJS= 'enable_event_num_rel_objs'¶
-
ENABLE_EVENT_NUM_REL_OBJS_TYPE= 'enable_event_num_rel_objs_type'¶
-
ENABLE_EVENT_START_OT= 'enable_event_start_ot'¶
-
ENABLE_EVENT_STR_ATTRIBUTES= 'enable_event_str_attributes'¶
-
ENABLE_EVENT_TIMESTAMP= 'enable_event_timestamp'¶
-
ENABLE_NEW_INTERACTIONS= 'enable_new_interactions'¶
-
ENABLE_RELATED_OBJECTS_FEATURES= 'enable_related_objects_features'¶
-
-
pm4py.algo.transformation.ocel.features.events.algorithm.apply(ocel: pm4py.objects.ocel.obj.OCEL, parameters: Optional[Dict[Any, Any]] = None)[source]¶ Extracts a feature table related to the events of an OCEL
Parameters: ocel – Object-centric event log
parameters – Parameters for extracting the feature table, including: - Parameters.ENABLE_ALL => enables all the belowmentioned features - Parameters.ENABLE_EVENT_ACTIVITY => enables the one-hot-encoding of the activities of the event - Parameters.ENABLE_EVENT_TIMESTAMP => enables the encoding of the timestamp of the event as feature - Parameters.ENABLE_EVENT_NUM_REL_OBJS => enables the “overall number of related objects” feature - Parameters.ENABLE_EVENT_NUM_REL_OBJS_TYPE => enables the “number of related objects per type” feature - Parameters.ENABLE_EVENT_STR_ATTRIBUTES => enables the one-hot-encoding of a given collection of string event
attributes (specified inside the “str_ev_attr” parameter)
- Parameters.ENABLE_EVENT_NUM_ATTRIBUTES => enables the extraction of a given collection of numeric event
- attributes in the feature table
- Parameters.ENABLE_EVENT_START_OT => calculates some features which establish if the event starts the
- lifecycle of some objects of a type.
- Parameters.ENABLE_EVENT_END_OT => calculates some features which establish if the event completes the
- lifecycle of some objects of a type.
- Parameters.ENABLE_NEW_INTERACTIONS => number of new interactions between the related objects which
- appears in a given event.
- Parameters.ENABLE_RELATED_OBJECTS_FEATURES => associates to the event some features calculated on the
- related objects.
Returns: - data – Values of the features
- feature_names – Names of the features
-
pm4py.algo.transformation.ocel.features.events.algorithm.transform_features_to_dict_dict(ocel: pm4py.objects.ocel.obj.OCEL, data: List[List[float]], feature_names: List[str], parameters=None)[source]¶ Transforms event-based features expressed in the conventional way to a dictionary where the key is the event ID, the second key is the feature name and the value is the feature value.
Parameters: - ocel – Object-centric event log
- data – Values of the features
- feature_names – Names of the features
Returns: Dictionary associating an ID to a dictionary of features
Return type: dict_dict
pm4py.algo.transformation.ocel.features.events.event_activity module¶
This file is part of PM4Py (More Info: https://pm4py.fit.fraunhofer.de).
PM4Py is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
PM4Py 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 General Public License for more details.
You should have received a copy of the GNU General Public License along with PM4Py. If not, see <https://www.gnu.org/licenses/>.
-
pm4py.algo.transformation.ocel.features.events.event_activity.apply(ocel: pm4py.objects.ocel.obj.OCEL, parameters: Optional[Dict[Any, Any]] = None)[source]¶ One-hot encode the activities of an OCEL, assigning to each event its own activity as feature
Parameters: - ocel – OCEL
- parameters – Parameters of the algorithm
Returns: - data – Extracted feature values
- feature_names – Feature names
pm4py.algo.transformation.ocel.features.events.event_end_ot module¶
This file is part of PM4Py (More Info: https://pm4py.fit.fraunhofer.de).
PM4Py is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
PM4Py 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 General Public License for more details.
You should have received a copy of the GNU General Public License along with PM4Py. If not, see <https://www.gnu.org/licenses/>.
-
pm4py.algo.transformation.ocel.features.events.event_end_ot.apply(ocel: pm4py.objects.ocel.obj.OCEL, parameters: Optional[Dict[Any, Any]] = None)[source]¶ Assigns to each event a feature that is 1 when the event completes the lifecycle of at least one object of a given type.
Parameters: - ocel – OCEL
- parameters – Parameters of the algorithm
Returns: - data – Extracted feature values
- feature_names – Feature names
pm4py.algo.transformation.ocel.features.events.event_num_attributes module¶
This file is part of PM4Py (More Info: https://pm4py.fit.fraunhofer.de).
PM4Py is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
PM4Py 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 General Public License for more details.
You should have received a copy of the GNU General Public License along with PM4Py. If not, see <https://www.gnu.org/licenses/>.
-
class
pm4py.algo.transformation.ocel.features.events.event_num_attributes.Parameters[source]¶ Bases:
enum.EnumAn enumeration.
-
EVENT_NUM_ATTRIBUTES= 'num_ev_attr'¶
-
-
pm4py.algo.transformation.ocel.features.events.event_num_attributes.apply(ocel: pm4py.objects.ocel.obj.OCEL, parameters: Optional[Dict[Any, Any]] = None)[source]¶ Enables the extraction of a given collection of numeric event attributes in the feature table (specified inside the “num_ev_attr” parameter).
Parameters: ocel – OCEL
parameters –
- Parameters of the algorithm:
- Parameters.EVENT_NUM_ATTRIBUTES => collection of numeric attributes to consider for feature extraction
Returns: - data – Extracted feature values
- feature_names – Feature names
pm4py.algo.transformation.ocel.features.events.event_num_rel_objs module¶
This file is part of PM4Py (More Info: https://pm4py.fit.fraunhofer.de).
PM4Py is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
PM4Py 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 General Public License for more details.
You should have received a copy of the GNU General Public License along with PM4Py. If not, see <https://www.gnu.org/licenses/>.
-
pm4py.algo.transformation.ocel.features.events.event_num_rel_objs.apply(ocel: pm4py.objects.ocel.obj.OCEL, parameters: Optional[Dict[Any, Any]] = None)[source]¶ Feature: assigns to each event the number of related objects.
Parameters: - ocel – OCEL
- parameters – Parameters of the algorithm
Returns: - data – Extracted feature values
- feature_names – Feature names
pm4py.algo.transformation.ocel.features.events.event_num_rel_objs_type module¶
This file is part of PM4Py (More Info: https://pm4py.fit.fraunhofer.de).
PM4Py is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
PM4Py 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 General Public License for more details.
You should have received a copy of the GNU General Public License along with PM4Py. If not, see <https://www.gnu.org/licenses/>.
-
pm4py.algo.transformation.ocel.features.events.event_num_rel_objs_type.apply(ocel: pm4py.objects.ocel.obj.OCEL, parameters: Optional[Dict[Any, Any]] = None)[source]¶ Feature: assigns to each event the number of related objects per object type. If N different object types are present in the log, then N different columns are created.
Parameters: - ocel – OCEL
- parameters – Parameters of the algorithm
Returns: - data – Extracted feature values
- feature_names – Feature names
pm4py.algo.transformation.ocel.features.events.event_start_ot module¶
This file is part of PM4Py (More Info: https://pm4py.fit.fraunhofer.de).
PM4Py is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
PM4Py 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 General Public License for more details.
You should have received a copy of the GNU General Public License along with PM4Py. If not, see <https://www.gnu.org/licenses/>.
-
pm4py.algo.transformation.ocel.features.events.event_start_ot.apply(ocel: pm4py.objects.ocel.obj.OCEL, parameters: Optional[Dict[Any, Any]] = None)[source]¶ Assigns to each event a feature that is 1 when the event starts at least one object of a given type.
Parameters: - ocel – OCEL
- parameters – Parameters of the algorithm
Returns: - data – Extracted feature values
- feature_names – Feature names
pm4py.algo.transformation.ocel.features.events.event_str_attributes module¶
This file is part of PM4Py (More Info: https://pm4py.fit.fraunhofer.de).
PM4Py is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
PM4Py 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 General Public License for more details.
You should have received a copy of the GNU General Public License along with PM4Py. If not, see <https://www.gnu.org/licenses/>.
-
class
pm4py.algo.transformation.ocel.features.events.event_str_attributes.Parameters[source]¶ Bases:
enum.EnumAn enumeration.
-
EVENT_STR_ATTRIBUTES= 'str_ev_attr'¶
-
-
pm4py.algo.transformation.ocel.features.events.event_str_attributes.apply(ocel: pm4py.objects.ocel.obj.OCEL, parameters: Optional[Dict[Any, Any]] = None)[source]¶ One-hot-encoding of a given collection of string event attributes (specified inside the “str_ev_attr” parameter)
Parameters: ocel – OCEL
parameters –
- Parameters of the algorithm:
- Parameters.EVENT_STR_ATTRIBUTES => collection of string attributes to consider for feature extraction
Returns: - data – Extracted feature values
- feature_names – Feature names
pm4py.algo.transformation.ocel.features.events.event_timestamp module¶
This file is part of PM4Py (More Info: https://pm4py.fit.fraunhofer.de).
PM4Py is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
PM4Py 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 General Public License for more details.
You should have received a copy of the GNU General Public License along with PM4Py. If not, see <https://www.gnu.org/licenses/>.
-
pm4py.algo.transformation.ocel.features.events.event_timestamp.apply(ocel: pm4py.objects.ocel.obj.OCEL, parameters: Optional[Dict[Any, Any]] = None)[source]¶ Feature: assigns to each event of the OCEL its own timestamp.
Parameters: - ocel – OCEL
- parameters – Parameters of the algorithm
Returns: - data – Extracted feature values
- feature_names – Feature names
Module contents¶
This file is part of PM4Py (More Info: https://pm4py.fit.fraunhofer.de).
PM4Py is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
PM4Py 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 General Public License for more details.
You should have received a copy of the GNU General Public License along with PM4Py. If not, see <https://www.gnu.org/licenses/>.