pm4py.algo.discovery.alpha.variants.classic module#
This module implements the “classic” alpha miner [1]. It converts the input event log, which should be a log, to the (well-known) directly follows abstraction. For example, when we have a trace of the form (control-flow perspective) <…a,b,…>, we observe the relation a>b, i.e. activity a precedes activity b. From the directly follows relations, the alpha relations parallelism (||), conflict (x) and causality (->) are deduced. These relations form the basics for finding the places in the net. Finally, a start and end place is added.
- class pm4py.algo.discovery.alpha.variants.classic.Parameters(*values)[source]#
Bases:
Enum- ACTIVITY_KEY = 'pm4py:param:activity_key'#
- START_TIMESTAMP_KEY = 'pm4py:param:start_timestamp_key'#
- TIMESTAMP_KEY = 'pm4py:param:timestamp_key'#
- CASE_ID_KEY = 'pm4py:param:case_id_key'#
- pm4py.algo.discovery.alpha.variants.classic.apply(log: EventLog, parameters: Dict[str | Parameters, Any] | None = None) Tuple[PetriNet, Marking, Marking][source]#
This method calls the “classic” alpha miner [1].
- Parameters:
log (
pm4py.log.log.EventLog) – Event log to use in the alpha minerparameters –
- Parameters of the algorithm, including:
- activity_key
str, optional Key to use within events to identify the underlying activity. By deafult, the value ‘concept:name’ is used.
- activity_key
- Returns:
net (
pm4py.entities.petri.petrinet.PetriNet) – A Petri net describing the event log that is provided as an inputinitial marking (
pm4py.models.net.Marking) – marking object representing the initial markingfinal marking (
pm4py.models.net.Marking) – marking object representing the final marking, not guaranteed that it is actually reachable!
References
- pm4py.algo.discovery.alpha.variants.classic.apply_dfg(dfg: Dict[Tuple[str, str], int], parameters: Dict[str | Parameters, Any] | None = None) Tuple[PetriNet, Marking, Marking][source]#
Applying Alpha Miner starting from the knowledge of the Directly Follows graph, and of the start activities and end activities in the log inferred from the DFG.
- Parameters:
dfg – Directly-Follows graph
parameters –
- Parameters of the algorithm including:
activity key -> name of the attribute that contains the activity
- Returns:
net (
pm4py.entities.petri.petrinet.PetriNet) – A Petri net describing the event log that is provided as an inputinitial marking (
pm4py.models.net.Marking) – marking object representing the initial markingfinal marking (
pm4py.models.net.Marking) – marking object representing the final marking, not guaranteed that it is actually reachable!
- pm4py.algo.discovery.alpha.variants.classic.apply_dfg_sa_ea(dfg: Dict[str, int], start_activities: None | Dict[str, int], end_activities: None | Dict[str, int], parameters: Dict[str | Parameters, Any] | None = None) Tuple[PetriNet, Marking, Marking][source]#
Applying Alpha Miner starting from the knowledge of the Directly Follows graph, and of the start activities and end activities in the log (possibly inferred from the DFG)
- Parameters:
dfg – Directly-Follows graph
start_activities – Start activities
end_activities – End activities
parameters –
- Parameters of the algorithm including:
activity key -> name of the attribute that contains the activity
- Returns:
net (
pm4py.entities.petri.petrinet.PetriNet) – A Petri net describing the event log that is provided as an inputinitial marking (
pm4py.models.net.Marking) – marking object representing the initial markingfinal marking (
pm4py.models.net.Marking) – marking object representing the final marking, not guaranteed that it is actually reachable!