pm4py.algo.discovery.declare.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.discovery.declare.variants.classic 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.discovery.declare.variants.classic.Parameters(value)[source]#

Bases: Enum

An enumeration.

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[Union[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[Union[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[Union[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[Union[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[Union[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[Union[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[Union[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[Union[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[Union[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[Union[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: Union[EventLog, DataFrame], parameters: Optional[Dict[Any, Any]] = None) DataFrame[source]#
pm4py.algo.discovery.declare.variants.classic.get_rules_from_rules_df(rules_df, parameters: Optional[Dict[Any, Any]] = None) Dict[str, Dict[Any, Dict[str, int]]][source]#
pm4py.algo.discovery.declare.variants.classic.apply(log: Union[EventLog, DataFrame], parameters: Optional[Dict[Any, Any]] = 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