Quickstart¶
This is a quick introduction to Pyromorphite. Before proceeding, make sure that Pyromorphite is installed.
Now let’s make sure pyromorphite is imported:
>>> import pyromorphite as pm
Read a Log 📜¶
Reading in event log files in Pyromorphite is super easy. It supports XES natively and CSV as well as Excel files via pandas.
Construct a Bag 🎒¶
Having parsed a log into a pandas DataFrame we can extract all unique traces together with their frequency in the log as a multiset or bag:
>>> bag = pm.as_bag(log)
We should also consider that not everyone might use the same column naming in their documents:
>>> bag = pm.as_bag(log, case='CI Name (aff)', time='Actual Start', activity='Change Type')
We can therefore specify the column names to be used as:
- case identifiers
- event label
- and timestamp
Mine Your First Model 💃¶
With our bag of traces in hand we can go onto mining our first model. We’ll go for a process tree. This in not so relevant as most models can be converted between one another. What is relevant, though, is the miner we use. We’ll give the Inductive Miner a try:
>>> ptree = pm.InductiveMiner(bag)