pm4py.conformance.conformance_declare#

pm4py.conformance.conformance_declare(log: EventLog | DataFrame, declare_model: Dict[str, Dict[Any, Dict[str, int]]], activity_key: str = 'concept:name', timestamp_key: str = 'time:timestamp', case_id_key: str = 'case:concept:name', return_diagnostics_dataframe: bool = False) List[Dict[str, Any]][source]#

Apply conformance checking against a DECLARE model.

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.

  • declare_model – DECLARE model represented as a nested dictionary.

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

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

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

  • return_diagnostics_dataframe (bool) – If possible, returns a dataframe with the diagnostics instead of the usual output (default is constants.DEFAULT_RETURN_DIAGNOSTICS_DATAFRAME).

Returns:

A list of dictionaries containing diagnostics for each trace.

Return type:

List[Dict[str, Any]]

Example:

```python import pm4py

log = pm4py.read_xes(“C:/receipt.xes”) declare_model = pm4py.discover_declare(log) conf_result = pm4py.conformance_declare(

log, declare_model, activity_key=’concept:name’, case_id_key=’case:concept:name’, timestamp_key=’time:timestamp’