pm4py.algo.anonymization.trace_variant_query.variants package#

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

Submodules#

pm4py.algo.anonymization.trace_variant_query.variants.laplace 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.anonymization.trace_variant_query.variants.laplace.Parameters(value)[source]#

Bases: Enum

An enumeration.

EPSILON = 'epsilon'#
K = 'k'#
P = 'p'#
SHOW_PROGRESS_BAR = 'show_progress_bar'#
pm4py.algo.anonymization.trace_variant_query.variants.laplace.apply(log: EventLog, parameters: Optional[Dict[Union[str, Parameters], Any]] = None) EventLog[source]#

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

Parameters#

log

Event log

parameters
Parameters of the algorithm:

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

-Parameters.SHOW_PROGRESS_BAR -> Enables/disables the progress bar (default: True)

Returns#

anonymized_trace_variant_distribution

An anonymized trace variant distribution as an EventLog

pm4py.algo.anonymization.trace_variant_query.variants.laplace.privatize_tracevariants(log, epsilon, p, n, progress)[source]#
pm4py.algo.anonymization.trace_variant_query.variants.laplace.create_event_int_mapping(log)[source]#
pm4py.algo.anonymization.trace_variant_query.variants.laplace.get_prefix_frequencies_from_log(log)[source]#
pm4py.algo.anonymization.trace_variant_query.variants.laplace.get_prefix_frequencies_length_n(trace_frequencies, events, n, known_prefix_frequencies)[source]#
pm4py.algo.anonymization.trace_variant_query.variants.laplace.prune_trace_frequencies(trace_frequencies, P)[source]#
pm4py.algo.anonymization.trace_variant_query.variants.laplace.pref(prefix, events)[source]#
pm4py.algo.anonymization.trace_variant_query.variants.laplace.apply_laplace_noise_tf(trace_frequencies, epsilon)[source]#

pm4py.algo.anonymization.trace_variant_query.variants.sacofa 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.anonymization.trace_variant_query.variants.sacofa.Parameters(value)[source]#

Bases: Enum

An enumeration.

EPSILON = 'epsilon'#
K = 'k'#
P = 'p'#
SHOW_PROGRESS_BAR = 'show_progress_bar'#
pm4py.algo.anonymization.trace_variant_query.variants.sacofa.apply(log: EventLog, parameters: Optional[Dict[Any, Any]] = None) EventLog[source]#

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.

Parameters#

log

Event log

parameters
Parameters of the algorithm:

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

-Parameters.SHOW_PROGRESS_BAR -> Enables/disables the progress bar (default: True)

Returns#

anonymized_trace_variant_distribution

An anonymized trace variant distribution as an EventLog

pm4py.algo.anonymization.trace_variant_query.variants.sacofa.privatize_tracevariants(log, epsilon, P, N, progress, smart_pruning=False, P_smart=0, sensitivity=1)[source]#
pm4py.algo.anonymization.trace_variant_query.variants.sacofa.get_prefix_frequencies_from_log(log)[source]#
pm4py.algo.anonymization.trace_variant_query.variants.sacofa.get_prefix_frequencies_length_n(trace_frequencies, events, n, known_prefix_frequencies)[source]#
pm4py.algo.anonymization.trace_variant_query.variants.sacofa.privatize_trace_variants(trace_frequencies, epsilon, followRelations, precedesRelations, allEvents, allTraces, sensitivity)[source]#
pm4py.algo.anonymization.trace_variant_query.variants.sacofa.get_first_events(traceSet)[source]#
pm4py.algo.anonymization.trace_variant_query.variants.sacofa.get_traces_from_log(log)[source]#
pm4py.algo.anonymization.trace_variant_query.variants.sacofa.get_events_from_traces(traceSet)[source]#
pm4py.algo.anonymization.trace_variant_query.variants.sacofa.prune_trace_frequencies(trace_frequencies, P, P_smart, conformSet)[source]#
pm4py.algo.anonymization.trace_variant_query.variants.sacofa.pref(prefix, events, n)[source]#
pm4py.algo.anonymization.trace_variant_query.variants.sacofa.apply_laplace_noise_tf(trace_frequencies, conformsToBASet, epsilon)[source]#