pm4py.algo.transformation.trace_encodings.util.locally_linear_embedding module#

PM4Py – A Process Mining Library for Python Copyright (C) 2026 Process Intelligence Solutions GmbH

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.transformation.trace_encodings.util.locally_linear_embedding.Parameters(*values)[source]#

Bases: Enum

ACTIVITY_KEY = 'pm4py:param:activity_key'#
TIMESTAMP_KEY = 'pm4py:param:timestamp_key'#
CASE_ID_KEY = 'pm4py:param:case_id_key'#
pm4py.algo.transformation.trace_encodings.util.locally_linear_embedding.smooth(y: ndarray, box_pts: int) → ndarray[source]#

Smooths the points in y with a weighted average.

Parameters:
  • y – Points

  • box_pts – Size of the weighted average

Returns:

Smoothened y

Return type:

y_smooth

pm4py.algo.transformation.trace_encodings.util.locally_linear_embedding.apply(log: EventLog, parameters: Dict[str, Any] | None = None) → Tuple[List[datetime], ndarray][source]#

Analyse the evolution of the features over the time using a locally linear embedding.

Parameters:
  • log – Event log

  • parameters – Variant-specific parameters, including: - Parameters.ACTIVITY_KEY => the activity key - Parameters.TIMESTAMP_KEY => the timestamp key - Parameters.CASE_ID_KEY => the case ID key

Returns:

  • x – Date attributes (starting points of the cases)

  • y – Deviation from the standard behavior (higher absolute values of y signal a higher deviation from the standard behavior)