pm4py.discovery.discover_heuristics_net#

pm4py.discovery.discover_heuristics_net(log: EventLog | DataFrame, dependency_threshold: float = 0.5, and_threshold: float = 0.65, loop_two_threshold: float = 0.5, min_act_count: int = 1, min_dfg_occurrences: int = 1, activity_key: str = 'concept:name', timestamp_key: str = 'time:timestamp', case_id_key: str = 'case:concept:name', decoration: str = 'frequency') HeuristicsNet[source]#

Discovers a Heuristics Net.

Heuristics Miner operates on the Directly-Follows Graph, handling noise and identifying common constructs such as dependencies between activities and parallelism. The output is a Heuristics Net, which can then be converted into a Petri net.

Parameters:
  • log – Event log or Pandas DataFrame.

  • dependency_threshold (float) – Dependency threshold (default: 0.5).

  • and_threshold (float) – AND threshold for parallelism (default: 0.65).

  • loop_two_threshold (float) – Loop two threshold (default: 0.5).

  • min_act_count (int) – Minimum number of occurrences per activity to be included in the discovery (default: 1).

  • min_dfg_occurrences (int) – Minimum number of occurrences per arc in the DFG to be included in the discovery (default: 1).

  • 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”).

  • decoration (str) – The decoration to be used (“frequency” or “performance”) (default: “frequency”).

Returns:

A HeuristicsNet object.

Return type:

HeuristicsNet

import pm4py

heu_net = pm4py.discover_heuristics_net(
    dataframe,
    activity_key='concept:name',
    case_id_key='case:concept:name',
    timestamp_key='time:timestamp'
)