pm4py.algo.conformance.alignments.edit_distance.variants package

Submodules

pm4py.algo.conformance.alignments.edit_distance.variants.edit_distance module

class pm4py.algo.conformance.alignments.edit_distance.variants.edit_distance.Parameters(value)[source]

Bases: enum.Enum

An enumeration.

PERFORM_ANTI_ALIGNMENT = 'perform_anti_alignment'
pm4py.algo.conformance.alignments.edit_distance.variants.edit_distance.align_trace(trace: pm4py.objects.log.obj.Trace, list_encodings: List[str], set_encodings: Set[str], mapping: Dict[str, str], cache_align: Optional[Dict[str, Any]] = None, parameters: Optional[Dict[str, Any]] = None) → Dict[str, Any][source]

Aligns a trace against a list of traces, minimizing the edit distance

Parameters
  • trace – Trace

  • list_encodings – List of encoded traces (the same as set_encodings, but as a list)

  • set_encodings – Set of encoded traces (the same as list_encodings, but as a set), useful to quickly check if the provided trace is contained in the traces of the other log

  • mapping – Mapping (of activities to characters)

  • cache_align – Cache of the alignments

  • parameters – Parameters of the algorithm

Returns

Aligned trace

Return type

aligned_trace

pm4py.algo.conformance.alignments.edit_distance.variants.edit_distance.apply(log1: pm4py.objects.log.obj.EventLog, log2: pm4py.objects.log.obj.EventLog, parameters: Optional[Dict[str, Any]] = None) → List[Dict[str, Any]][source]

Aligns each trace of the first log against the second log, minimizing the edit distance

Parameters
  • log1 – First log

  • log2 – Second log

  • parameters – Parameters of the algorithm

Returns

List that contains, for each trace of the first log, the corresponding alignment

Return type

aligned_traces

Module contents