pm4py.algo.discovery.declare.variants 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.discovery.declare.variants.classic 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.discovery.declare.variants.classic.Parameters(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)[source]#

Bases: Enum

ACTIVITY_KEY = 'pm4py:param:activity_key'#
CASE_ID_KEY = 'pm4py:param:case_id_key'#
CONSIDERED_ACTIVITIES = 'considered_activities'#
MIN_SUPPORT_RATIO = 'min_support_ratio'#
MIN_CONFIDENCE_RATIO = 'min_confidence_ratio'#
AUTO_SELECTION_MULTIPLIER = 'auto_selection_multiplier'#
ALLOWED_TEMPLATES = 'allowed_templates'#
pm4py.algo.discovery.declare.variants.classic.existence_template_step1(rules: Dict[Tuple[str, str] | Tuple[str, str, str], int], trace: Collection[str], activities: Set[str], act_counter: Counter[str], act_idxs: Dict[str, List[int]], allowed_templates: Collection[str])[source]#
pm4py.algo.discovery.declare.variants.classic.exactly_one_template_step1(rules: Dict[Tuple[str, str] | Tuple[str, str, str], int], trace: Collection[str], activities: Set[str], act_counter: Counter[str], act_idxs: Dict[str, List[int]], allowed_templates: Collection[str])[source]#
pm4py.algo.discovery.declare.variants.classic.init_template_step1(rules: Dict[Tuple[str, str] | Tuple[str, str, str], int], trace: Collection[str], activities: Set[str], act_counter: Counter[str], act_idxs: Dict[str, List[int]], allowed_templates: Collection[str])[source]#
pm4py.algo.discovery.declare.variants.classic.responded_existence_template_step1(rules: Dict[Tuple[str, str] | Tuple[str, str, str], int], trace: Collection[str], activities: Set[str], act_counter: Counter[str], act_idxs: Dict[str, List[int]], allowed_templates: Collection[str])[source]#
pm4py.algo.discovery.declare.variants.classic.response_template_step1(rules: Dict[Tuple[str, str] | Tuple[str, str, str], int], trace: Collection[str], activities: Set[str], act_counter: Counter[str], act_idxs: Dict[str, List[int]], allowed_templates: Collection[str])[source]#
pm4py.algo.discovery.declare.variants.classic.precedence_template_step1(rules: Dict[Tuple[str, str] | Tuple[str, str, str], int], trace: Collection[str], activities: Set[str], act_counter: Counter[str], act_idxs: Dict[str, List[int]], allowed_templates: Collection[str])[source]#
pm4py.algo.discovery.declare.variants.classic.altresponse_template_step1(rules: Dict[Tuple[str, str] | Tuple[str, str, str], int], trace: Collection[str], activities: Set[str], act_counter: Counter[str], act_idxs: Dict[str, List[int]], allowed_templates: Collection[str])[source]#
pm4py.algo.discovery.declare.variants.classic.chainresponse_template_step1(rules: Dict[Tuple[str, str] | Tuple[str, str, str], int], trace: Collection[str], activities: Set[str], act_counter: Counter[str], act_idxs: Dict[str, List[int]], allowed_templates: Collection[str])[source]#
pm4py.algo.discovery.declare.variants.classic.altprecedence_template_step1(rules: Dict[Tuple[str, str] | Tuple[str, str, str], int], trace: Collection[str], activities: Set[str], act_counter: Counter[str], act_idxs: Dict[str, List[int]], allowed_templates: Collection[str])[source]#
pm4py.algo.discovery.declare.variants.classic.chainprecedence_template_step1(rules: Dict[Tuple[str, str] | Tuple[str, str, str], int], trace: Collection[str], activities: Set[str], act_counter: Counter[str], act_idxs: Dict[str, List[int]], allowed_templates: Collection[str])[source]#
pm4py.algo.discovery.declare.variants.classic.absence_template(table, columns: Collection[str], activities: Set[str], allowed_templates: Collection[str]) DataFrame[source]#
pm4py.algo.discovery.declare.variants.classic.exactly_one_template_step2(table, columns: Collection[str], activities: Set[str], allowed_templates: Collection[str]) DataFrame[source]#
pm4py.algo.discovery.declare.variants.classic.responded_existence_template_step2(table, columns: Collection[str], activities: Set[str], allowed_templates: Collection[str]) DataFrame[source]#
pm4py.algo.discovery.declare.variants.classic.response_template_step2(table, columns: Collection[str], activities: Set[str], allowed_templates: Collection[str]) DataFrame[source]#
pm4py.algo.discovery.declare.variants.classic.precedence_template_step2(table, columns: Collection[str], activities: Set[str], allowed_templates: Collection[str]) DataFrame[source]#
pm4py.algo.discovery.declare.variants.classic.altresponse_template_step2(table, columns: Collection[str], activities: Set[str], allowed_templates: Collection[str]) DataFrame[source]#
pm4py.algo.discovery.declare.variants.classic.chainresponse_template_step2(table, columns: Collection[str], activities: Set[str], allowed_templates: Collection[str]) DataFrame[source]#
pm4py.algo.discovery.declare.variants.classic.altprecedence_template_step2(table, columns: Collection[str], activities: Set[str], allowed_templates: Collection[str]) DataFrame[source]#
pm4py.algo.discovery.declare.variants.classic.chainprecedence_template_step2(table, columns: Collection[str], activities: Set[str], allowed_templates: Collection[str]) DataFrame[source]#
pm4py.algo.discovery.declare.variants.classic.succession_template(table, columns: Collection[str], activities: Set[str], allowed_templates: Collection[str]) DataFrame[source]#
pm4py.algo.discovery.declare.variants.classic.altsuccession_template(table, columns: Collection[str], activities: Set[str], allowed_templates: Collection[str]) DataFrame[source]#
pm4py.algo.discovery.declare.variants.classic.chainsuccession_template(table, columns: Collection[str], activities: Set[str], allowed_templates: Collection[str]) DataFrame[source]#
pm4py.algo.discovery.declare.variants.classic.coexistence_template(table, columns: Collection[str], activities: Set[str], allowed_templates: Collection[str]) DataFrame[source]#
pm4py.algo.discovery.declare.variants.classic.noncoexistence_template(table, columns: Collection[str], activities: Set[str], allowed_templates: Collection[str]) DataFrame[source]#
pm4py.algo.discovery.declare.variants.classic.nonsuccession_template(table, columns: Collection[str], activities: Set[str], allowed_templates: Collection[str]) DataFrame[source]#
pm4py.algo.discovery.declare.variants.classic.nonchainsuccession_template(table, columns: Collection[str], activities: Set[str], allowed_templates: Collection[str]) DataFrame[source]#
pm4py.algo.discovery.declare.variants.classic.form_rules_table(log: EventLog | DataFrame, parameters: Dict[Any, Any] | None = None) DataFrame[source]#
pm4py.algo.discovery.declare.variants.classic.get_rules_from_rules_df(rules_df, parameters: Dict[Any, Any] | None = None) Dict[str, Dict[Any, Dict[str, int]]][source]#
pm4py.algo.discovery.declare.variants.classic.apply(log: EventLog | DataFrame, parameters: Dict[Any, Any] | None = None) Dict[str, Dict[Any, Dict[str, int]]][source]#

Discovers a DECLARE model from the provided event log

Paper: F. M. Maggi, A. J. Mooij and W. M. P. van der Aalst, “User-guided discovery of declarative process models,” 2011 IEEE Symposium on Computational Intelligence and Data Mining (CIDM), Paris, France, 2011, pp. 192-199, doi: 10.1109/CIDM.2011.5949297.

Parameters#

log

Log object (EventLog, Pandas table)

parameters

Possible parameters of the algorithm, including: - Parameters.ACTIVITY_KEY - Parameters.CONSIDERED_ACTIVITIES - Parameters.MIN_SUPPORT_RATIO - Parameters.MIN_CONFIDENCE_RATIO - Parameters.AUTO_SELECTION_MULTIPLIER - Parameters.ALLOWED_TEMPLATES: collection of templates to consider, including:

  • existence

  • exactly_one

  • init

  • responded_existence

  • response

  • precedence

  • succession

  • altresponse

  • altprecedence

  • altsuccession

  • chainresponse

  • chainprecedence

  • chainsuccession

  • absence

  • coexistence

  • noncoexistence

  • nonsuccession

  • nonchainsuccession

Returns#

declare_model

DECLARE model (as Python dictionary), where each template is associated with its own rules