pm4py.algo.clustering.trace_attribute_driven.variants.act_dist_calc 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.clustering.trace_attribute_driven.variants.act_dist_calc.Parameters(*values)[source]#

Bases: Enum

ATTRIBUTE_KEY = 'pm4py:param:attribute_key'#
ACTIVITY_KEY = 'pm4py:param:activity_key'#
SINGLE = 'single'#
BINARIZE = 'binarize'#
POSITIVE = 'positive'#
LOWER_PERCENT = 'lower_percent'#
pm4py.algo.clustering.trace_attribute_driven.variants.act_dist_calc.occu_var_act(var_list)[source]#

return dataframe that shows the frequency of each element(activity) in each variant list :param var_list: :return:

pm4py.algo.clustering.trace_attribute_driven.variants.act_dist_calc.act_sim(var_list_1, var_list_2, log1, log2, freq_thres, num, parameters=None)[source]#

this function compare the activity similarity between two sublogs via the two lists of variants. :param var_list_1: lists of variants in sublog 1 :param var_list_2: lists of variants in sublog 2 :param freq_thres: same as sublog2df() :param log1: input sublog1 of sublog2df(), which must correspond to var_list_1 :param log2: input sublog2 of sublog2df(), which must correspond to var_list_2 :return: the distance matrix between 2 sublogs in which each element is the distance between two variants.

pm4py.algo.clustering.trace_attribute_driven.variants.act_dist_calc.act_sim_med(var_list_1, var_list_2, log1, log2, freq_thres, num, parameters=None)[source]#

this function compare the activity similarity between two sublogs via the two lists of variants. :param var_list_1: lists of variants in sublog 1 :param var_list_2: lists of variants in sublog 2 :param freq_thres: same as sublog2df() :param log1: input sublog1 of sublog2df(), which must correspond to var_list_1 :param log2: input sublog2 of sublog2df(), which must correspond to var_list_2 :return: the distance matrix between 2 sublogs in which each element is the distance between two variants.

pm4py.algo.clustering.trace_attribute_driven.variants.act_dist_calc.act_sim_dual(var_list_1, var_list_2, log1, log2, freq_thres, num, parameters=None)[source]#

this function compare the activity similarity between two sublogs via the two lists of variants. :param var_list_1: lists of variants in sublog 1 :param var_list_2: lists of variants in sublog 2 :param freq_thres: same as sublog2df() :param log1: input sublog1 of sublog2df(), which must correspond to var_list_1 :param log2: input sublog2 of sublog2df(), which must correspond to var_list_2 :return: the distance matrix between 2 sublogs in which each element is the distance between two variants.

pm4py.algo.clustering.trace_attribute_driven.variants.act_dist_calc.act_sim_percent(log1, log2, percent_1, percent_2)[source]#

this function compare the activity similarity between two sublogs via the two lists of variants. :param var_list_1: lists of variants in sublog 1 :param var_list_2: lists of variants in sublog 2 :param freq_thres: same as sublog2df() :param log1: input sublog1 of sublog2df(), which must correspond to var_list_1 :param log2: input sublog2 of sublog2df(), which must correspond to var_list_2 :return: the distance matrix between 2 sublogs in which each element is the distance between two variants.

pm4py.algo.clustering.trace_attribute_driven.variants.act_dist_calc.act_sim_percent_avg(log1, log2, percent_1, percent_2)[source]#

this function compare the activity similarity between two sublogs via the two lists of variants. :param var_list_1: lists of variants in sublog 1 :param var_list_2: lists of variants in sublog 2 :param freq_thres: same as sublog2df() :param log1: input sublog1 of sublog2df(), which must correspond to var_list_1 :param log2: input sublog2 of sublog2df(), which must correspond to var_list_2 :return: the distance matrix between 2 sublogs in which each element is the distance between two variants.

pm4py.algo.clustering.trace_attribute_driven.variants.act_dist_calc.act_sim_percent_avg_actset(log1, log2, percent_1, percent_2, actset)[source]#

this function compare the activity similarity between two sublogs via the two lists of variants. :param var_list_1: lists of variants in sublog 1 :param var_list_2: lists of variants in sublog 2 :param freq_thres: same as sublog2df() :param log1: input sublog1 of sublog2df(), which must correspond to var_list_1 :param log2: input sublog2 of sublog2df(), which must correspond to var_list_2 :return: the distance matrix between 2 sublogs in which each element is the distance between two variants.