pm4py.algo.transformation.ocel.features.objects package

Submodules

pm4py.algo.transformation.ocel.features.objects.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.objects.algorithm.Parameters(value)[source]

Bases: enum.Enum

An enumeration.

ENABLE_ALL = 'enable_all'
ENABLE_OBJECT_COBIRTH_GRAPH = 'enable_object_cobirth_graph'
ENABLE_OBJECT_CODEATH_GRAPH = 'enable_object_codeath_graph'
ENABLE_OBJECT_DEGREE_CENTRALITY = 'enable_object_degree_centrality'
ENABLE_OBJECT_GENERAL_DESCENDANTS_GRAPH = 'enable_object_general_descendants_graph'
ENABLE_OBJECT_GENERAL_INHERITANCE_GRAPH = 'enable_object_general_inheritance_graph'
ENABLE_OBJECT_GENERAL_INTERACTION_GRAPH = 'enable_object_general_interaction_graph'
ENABLE_OBJECT_INTERACTION_GRAPH_OT = 'enable_object_interaction_graph_ot'
ENABLE_OBJECT_LIFECYCLE_ACTIVITIES = 'enable_object_lifecycle_activities'
ENABLE_OBJECT_LIFECYCLE_DURATION = 'enable_object_lifecycle_duration'
ENABLE_OBJECT_LIFECYCLE_LENGTH = 'enable_object_lifecycle_length'
ENABLE_OBJECT_LIFECYCLE_UNQ_ACT = 'enable_object_lifecycle_unq_act'
ENABLE_OBJECT_NUM_ATTRIBUTES = 'enable_object_num_attributes'
ENABLE_OBJECT_STR_ATTRIBUTES = 'enable_object_str_attributes'
ENABLE_OBJECT_WORK_IN_PROGRESS = 'enable_object_work_in_progress'
ENABLE_OBJ_CON_IN_GRAPH_FEATURES = 'enable_obj_con_in_graph_features'
FILTER_PER_TYPE = 'filter_per_type'
pm4py.algo.transformation.ocel.features.objects.algorithm.apply(ocel: pm4py.objects.ocel.obj.OCEL, parameters: Optional[Dict[Any, Any]] = None)[source]

Extract a feature table related to the objects of an OCEL

Parameters
  • ocel – OCEL

  • parameters – Parameters of the algorithm, including: - Parameters.ENABLE_ALL => enable the extraction of all the belowmentioned features - Parameters.ENABLE_OBJECT_LIFECYCLE_LENGTH => enables the object lifecycle length feature - Parameters.ENABLE_OBJECT_LIFECYCLE_DURATION => enables the object lifecycle duration feature - Parameters.ENABLE_OBJECT_LIFECYCLE_UNQ_ACT => enables the object lifecycle unique activities feature - Parameters.ENABLE_OBJECT_DEGREE_CENTRALITY => enables the object degree centrality feature - Parameters.ENABLE_OBJECT_GENERAL_INTERACTION_GRAPH => enables the object general interaction graph feature - Parameters.ENABLE_OBJECT_GENERAL_DESCENDANTS_GRAPH => enables the object general descendants graph feature - Parameters.ENABLE_OBJECT_GENERAL_INHERITANCE_GRAPH => enables the object general inheritance graph feature - Parameters.ENABLE_OBJECT_COBIRTH_GRAPH => enables the object cobirth graph feature - Parameters.ENABLE_OBJECT_CODEATH_GRAPH => enables the object codeath graph feature - Parameters.ENABLE_OBJECT_LIFECYCLE_ACTIVITIES => enables the features associated to the activities in the

    lifecycle of an object

    • Parameters.ENABLE_OBJECT_STR_ATTRIBUTES => enables the one-hot-encoding of a specified collection of string

      attributes for each object.

    • Parameters.ENABLE_OBJECT_NUM_ATTRIBUTES => enables the extraction of a specified collection of numeric

      attributes for each object.

    • Parameters.ENABLE_OBJECT_INTERACTION_GRAPH_OT => enables the extraction of the number of interacting objects

      per object type.

    • Parameters.FILTER_PER_TYPE => once obtained, filter only the objects that belongs to a specific type

    • Parameters.ENABLE_RELATED_EVENTS_FEATURES => enables the extraction of features for the related events to a

      given object.

    • Parameters.ENABLE_RELATED_ACTIVITIES_FEATURES => enables the extraction of features for the last occurrence

      of an activity in the events related to the object.

    • Parameters.ENABLE_OBJ_CON_IN_GRAPH_FEATURES => enables the extraction of features from the neighboring

      objects.

Returns

  • data – Values of the features

  • feature_names – Names of the features

pm4py.algo.transformation.ocel.features.objects.algorithm.transform_features_to_dict_dict(ocel: pm4py.objects.ocel.obj.OCEL, data: List[List[float]], feature_names: List[str], parameters=None)[source]

Transforms object-based features expressed in the conventional way to a dictionary where the key is the object 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.objects.object_cobirth_graph 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.objects.object_cobirth_graph.apply(ocel: pm4py.objects.ocel.obj.OCEL, parameters: Optional[Dict[Any, Any]] = None)[source]

Adds for each object the total number of cobirth object as feature

Parameters
  • ocel – OCEL

  • parameters – Parameters of the algorithm

Returns

  • data – Values of the added features

  • feature_names – Names of the added features

pm4py.algo.transformation.ocel.features.objects.object_codeath_graph 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.objects.object_codeath_graph.apply(ocel: pm4py.objects.ocel.obj.OCEL, parameters: Optional[Dict[Any, Any]] = None)[source]

Adds for each object the total number of codeath object as feature

Parameters
  • ocel – OCEL

  • parameters – Parameters of the algorithm

Returns

  • data – Values of the added features

  • feature_names – Names of the added features

pm4py.algo.transformation.ocel.features.objects.object_degree_centrality 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.objects.object_degree_centrality.apply(ocel: pm4py.objects.ocel.obj.OCEL, parameters: Optional[Dict[Any, Any]] = None)[source]

Adds for each object the centrality degree as feature

Parameters
  • ocel – OCEL

  • parameters – Parameters of the algorithm

Returns

  • data – Values of the added features

  • feature_names – Names of the added features

pm4py.algo.transformation.ocel.features.objects.object_general_descendants_graph 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.objects.object_general_descendants_graph.apply(ocel: pm4py.objects.ocel.obj.OCEL, parameters: Optional[Dict[Any, Any]] = None)[source]

Adds for each object the number of descendants as feature

Parameters
  • ocel – OCEL

  • parameters – Parameters of the algorithm

Returns

  • data – Values of the added features

  • feature_names – Names of the added features

pm4py.algo.transformation.ocel.features.objects.object_general_inheritance_graph 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.objects.object_general_inheritance_graph.apply(ocel: pm4py.objects.ocel.obj.OCEL, parameters: Optional[Dict[Any, Any]] = None)[source]

Adds for each object the total number of inheritance object (they birth when the given object die) as feature

Parameters
  • ocel – OCEL

  • parameters – Parameters of the algorithm

Returns

  • data – Values of the added features

  • feature_names – Names of the added features

pm4py.algo.transformation.ocel.features.objects.object_general_interaction_graph 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.objects.object_general_interaction_graph.apply(ocel: pm4py.objects.ocel.obj.OCEL, parameters: Optional[Dict[Any, Any]] = None)[source]

Adds for each object the total number of interacting object as feature

Parameters
  • ocel – OCEL

  • parameters – Parameters of the algorithm

Returns

  • data – Values of the added features

  • feature_names – Names of the added features

pm4py.algo.transformation.ocel.features.objects.object_lifecycle_activities 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.objects.object_lifecycle_activities.apply(ocel: pm4py.objects.ocel.obj.OCEL, parameters: Optional[Dict[Any, Any]] = None)[source]

Adds for each object an one-hot-encoding of the activities performed in its lifecycle

Parameters
  • ocel – OCEL

  • parameters – Parameters of the algorithm

Returns

  • data – Values of the added features

  • feature_names – Names of the added features

pm4py.algo.transformation.ocel.features.objects.object_lifecycle_duration 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.objects.object_lifecycle_duration.apply(ocel: pm4py.objects.ocel.obj.OCEL, parameters: Optional[Dict[Any, Any]] = None)[source]

Adds for each object as features: - the duration of its lifecycle - the start timestamp - the end timestamp

Parameters
  • ocel – OCEL

  • parameters – Parameters of the algorithm

Returns

  • data – Values of the added features

  • feature_names – Names of the added features

pm4py.algo.transformation.ocel.features.objects.object_lifecycle_length 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.objects.object_lifecycle_length.apply(ocel: pm4py.objects.ocel.obj.OCEL, parameters: Optional[Dict[Any, Any]] = None)[source]

Adds for each object the number of events in its lifecycle as feature

Parameters
  • ocel – OCEL

  • parameters – Parameters of the algorithm

Returns

  • data – Values of the added features

  • feature_names – Names of the added features

pm4py.algo.transformation.ocel.features.objects.object_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.objects.object_num_attributes.Parameters(value)[source]

Bases: enum.Enum

An enumeration.

OBJECT_NUM_ATTRIBUTES = 'num_obj_attr'
pm4py.algo.transformation.ocel.features.objects.object_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 object attributes in the feature table (specified inside the “num_obj_attr” parameter)

Parameters
  • ocel – OCEL

  • parameters

    Parameters of the algorithm:
    • Parameters.OBJECT_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.objects.object_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.objects.object_str_attributes.Parameters(value)[source]

Bases: enum.Enum

An enumeration.

OBJECT_STR_ATTRIBUTES = 'str_obj_attr'
pm4py.algo.transformation.ocel.features.objects.object_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 object attributes (specified inside the “str_obj_attr” parameter)

Parameters
  • ocel – OCEL

  • parameters

    Parameters of the algorithm:
    • Parameters.OBJECT_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.objects.object_work_in_progress 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.objects.object_work_in_progress.apply(ocel: pm4py.objects.ocel.obj.OCEL, parameters: Optional[Dict[Any, Any]] = None)[source]

Assigns to each object a feature which is the number of objects that are open during the lifecycle of the object.

Parameters
  • ocel – OCEL

  • parameters

    Parameters of the algorithm:
    • Parameters.OBJECT_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.objects.objects_interaction_graph_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.objects.objects_interaction_graph_ot.apply(ocel: pm4py.objects.ocel.obj.OCEL, parameters: Optional[Dict[Any, Any]] = None)[source]

Adds for each object, and each object type, the number of interacting objects as a feature.

Parameters
  • ocel – OCEL

  • parameters – Parameters of the algorithm

Returns

  • data – Values of the added features

  • feature_names – Names of the added features

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/>.