I/O Functionality

PM4Py supports importing and exporting of several standard file formats used in process mining. You can import/export files containing event data, as well as different process modeling formalisms. PM4Py supports the following file formats:

  • IEEE XES Files (Event Logs)
  • CSV Files (Event Logs)
  • Apache Parquet Files (Event Logs)
  • PNML Files (Petri net)
  • BPMN Files (through PM4Py-BPMN)

>> from pm4py.objects.log.importer.xes import factory as xes_importer
>> from pm4py.objects.log.exporter.xes import factory as xes_exporter
>> log1 = xes_importer.apply('<path-to-input-xes-log-file.xes>')
>> xes_exporter.apply(log1, '<path-to-target-xes-file.xes>')
>> from pm4py.objects.log.importer.csv import factory as csv_importer
>> from pm4py.objects.log.exporter.csv import factory as csv_exporter
>> log2 = csv_importer.apply('<path-to-input-csv-log-file.csv>')
>> csv_exporter.apply(log1, '<path-to-target-csv-log-file-1.csv>')
>> csv_exporter.apply(log2, '<path-to-target-csv-log-file-2.csv>')
Example code snippet of importing/exporting functionality in PM4Py.

Process Discovery

PM4Py implements several process discovery alogirthms, i.e., algorithms that automatically discover a process model from an event log. PM4Py offers the following algorithms:

  • Directly Follows Graph Discovery (including frequency/performance decoration)
  • The Alpha Miner
  • The Inductive Miner (IMD)
  • The Heuristics Miner
Example process models discovered using PM4Py.

Conformance Checking

PM4Py allows you to check the conformance of an event log with respect to a given reference model.

Currently, PM4Py implements two algorithms to compute conformance checking statistics:

  • Token-based Replay
  • Alignments