pm4py.algo.anonymization.trace_variant_query 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

Subpackages#

Submodules#

pm4py.algo.anonymization.trace_variant_query.algorithm 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.anonymization.trace_variant_query.algorithm.Variants(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)[source]#

Bases: Enum

LAPLACE = <module 'pm4py.algo.anonymization.trace_variant_query.variants.laplace' from 'C:\\Users\\berti\\pm4py-core\\pm4py\\algo\\anonymization\\trace_variant_query\\variants\\laplace.py'>#
SACOFA = <module 'pm4py.algo.anonymization.trace_variant_query.variants.sacofa' from 'C:\\Users\\berti\\pm4py-core\\pm4py\\algo\\anonymization\\trace_variant_query\\variants\\sacofa.py'>#
pm4py.algo.anonymization.trace_variant_query.algorithm.apply(log: EventLog | DataFrame, variant=Variants.SACOFA, parameters: Dict[Any, Any] | None = None) EventLog[source]#

Applies a trace variant query to an event log. A trace variant query returns an event log that captures trace variants and their frequencies in a differentially private manner, in other words it returns an anonymized trace variant distribution. Such a step is essential, given that even the publication of activity sequences from an event log, i.e., with all attribute values and timestamps removed, can be sufficient to link the identity of individuals to infrequent activity sequences.

Variant Laplace is described in: Mannhardt, F., Koschmider, A., Baracaldo, N. et al. Privacy-Preserving Process Mining. Bus Inf Syst Eng 61, 595–614 (2019). https://doi.org/10.1007/s12599-019-00613-3

Variant SaCoFa is described in: S. A. Fahrenkog-Petersen, M. Kabierski, F. Rösel, H. van der Aa and M. Weidlich, “SaCoFa: Semantics-aware Control-flow Anonymization for Process Mining,” 2021 3rd International Conference on Process Mining (ICPM), 2021, pp. 72-79, doi: 10.1109/ICPM53251.2021.9576857.

Variant DF-Laplace:

Parameters#

log

Log

variant
Variant of the algorithm to apply, possible values:

-Variants.LAPLACE -Variants.SACOFA

parameters
Parameters of the algorithm, including:

-Parameters.EPSILON -> Strength of the differential privacy guarantee -Parameters.K -> Maximum prefix length of considered traces for the trace-variant-query -Parameters.P -> Pruning parameter of the trace-variant-query. Of a noisy trace variant, at least P traces

must appear. Otherwise, the trace variant and its traces won’t be part of the result of the trace variant query.

Returns#

anonymized_trace_variant_distribution

An anonymized trace variant distribution as an EventLog