pm4py.discovery.discover_declare#

pm4py.discovery.discover_declare(log: EventLog | DataFrame, allowed_templates: Set[str] | None = None, considered_activities: Set[str] | None = None, min_support_ratio: float | None = None, min_confidence_ratio: float | None = None, activity_key: str = 'concept:name', timestamp_key: str = 'time:timestamp', case_id_key: str = 'case:concept:name') Dict[str, Dict[Any, Dict[str, int]]][source]#

Discovers a DECLARE model from an event log.

Reference 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 – Event log or Pandas DataFrame.

  • allowed_templates – (Optional) Set of DECLARE templates to consider for discovery.

  • considered_activities – (Optional) Set of activities to consider for discovery.

  • min_support_ratio – (Optional) Minimum percentage of cases for which the discovered rules apply.

  • min_confidence_ratio – (Optional) Minimum percentage of cases for which the discovered rules are valid, based on the rule’s support.

  • activity_key (str) – Attribute to be used for the activity (default: “concept:name”).

  • timestamp_key (str) – Attribute to be used for the timestamp (default: “time:timestamp”).

  • case_id_key (str) – Attribute to be used as case identifier (default: “case:concept:name”).

Returns:

A dictionary representing the discovered DECLARE model with constraints and their parameters.

Return type:

Dict[str, Dict[Any, Dict[str, int]]]

import pm4py

declare_model = pm4py.discover_declare(log)