pm4py.algo.clustering.trace_attribute_driven.util 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.algo.clustering.trace_attribute_driven.util.evaluation 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.algo.clustering.trace_attribute_driven.util.evaluation.dfg_dis(loglist, percent, alpha)[source]#
pm4py.algo.clustering.trace_attribute_driven.util.evaluation.eval_avg_variant(loglist, percent, alpha)[source]#
pm4py.algo.clustering.trace_attribute_driven.util.evaluation.eval_DMM_variant(loglist, percent, alpha)[source]#
pm4py.algo.clustering.trace_attribute_driven.util.evaluation.eval_avg_leven(loglist, percent, alpha)[source]#
pm4py.algo.clustering.trace_attribute_driven.util.evaluation.eval_DMM_leven(loglist, percent, alpha)[source]#

pm4py.algo.clustering.trace_attribute_driven.util.filter_subsets 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.algo.clustering.trace_attribute_driven.util.filter_subsets.Parameters(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)[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.util.filter_subsets.apply_trace_attributes(log, list_of_values, parameters=None)[source]#

Filter log by keeping only traces that has/has not certain case attribute value that belongs to the provided values list

Parameters#

log

Trace log

values

Allowed attribute values(if it’s numerical value, [] is needed to make it a list)

parameters
Parameters of the algorithm, including:

activity_key -> Attribute identifying the case in the log positive -> Indicate if events should be kept/removed

Returns#

filtered_log

Filtered log

pm4py.algo.clustering.trace_attribute_driven.util.filter_subsets.sublog2varlist(log, freq_thres, num)[source]#

extract lists of variants from selected sublogs together with frequency threshold to filter out infrequent variants :param log: sublog containing the selected case attribute value :param freq_thres: (int) frequency threshold to filter out infrequent variants :return: lists of variant strings

pm4py.algo.clustering.trace_attribute_driven.util.filter_subsets.sublog_percent(log, upper_percent, parameters=None)[source]#

change variant dictionary got from sublog into dataframe, so that we can extract the frequency of each variant :param log: same as sublog2varlist() :param freq_thres: same as sublog2varlist() :return: dataframe of variants with their counts together with the correspond var_list(until the percent )

pm4py.algo.clustering.trace_attribute_driven.util.filter_subsets.sublog_percent2actlist(log, upper_percent, parameters=None)[source]#

just need to var list :param log: same as sublog2varlist() :param freq_thres: same as sublog2varlist() :return: dataframe of variants with their counts together with the correspond var_list(until the percent )

pm4py.algo.clustering.trace_attribute_driven.util.filter_subsets.sublog_percent2varlist(log, upper_percent, parameters=None)[source]#

just need to var list :param log: same as sublog2varlist() :param freq_thres: same as sublog2varlist() :return: dataframe of variants with their counts together with the correspond var_list(until the percent )

pm4py.algo.clustering.trace_attribute_driven.util.filter_subsets.logslice_percent_act(log, unit)[source]#

slice the actlist per unit percent :param log: :param unit: :return:

pm4py.algo.clustering.trace_attribute_driven.util.filter_subsets.apply_variants_filter(log, admitted_variants, parameters=None)[source]#

Filter log keeping/removing only provided variants

Parameters#

log

Log object

admitted_variants

Admitted variants

parameters
Parameters of the algorithm, including:

activity_key -> Attribute identifying the activity in the log positive -> Indicate if events should be kept/removed

pm4py.algo.clustering.trace_attribute_driven.util.filter_subsets.logslice_percent(log, unit)[source]#

slice the log per unit percent :param log: :param unit: :return:

pm4py.algo.clustering.trace_attribute_driven.util.filter_subsets.sublog2df_num(log, num)[source]#

change variant dictionary got from sublog into dataframe, so that we can extract the frequency of each variant :param log: same as sublog2varlist() :param freq_thres: same as sublog2varlist() :return: dataframe of variants with their counts

pm4py.algo.clustering.trace_attribute_driven.util.filter_subsets.sublog2df(log, freq_thres, num)[source]#

change variant dictionary got from sublog into dataframe, so that we can extract the frequency of each variant :param log: same as sublog2varlist() :param freq_thres: same as sublog2varlist() :return: dataframe of variants with their counts

pm4py.algo.clustering.trace_attribute_driven.util.filter_subsets.act_dist(var_list_1, var_list_2, log1, log2, freq_thres)[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.