Closed AdamBanham closed 4 years ago
Dear Adam,
You can try to use the following syntax. For me it works:
from pm4py.objects.log.importer.xes import importer from pm4py.algo.discovery.alpha import algorithm as alpha_miner from pm4py.visualization.petrinet import visualizer
log = importer.apply("C:/receipt.xes") net, im, fm = alpha_miner.apply(log, variant=alpha_miner.Variants.ALPHA_VERSION_CLASSIC, parameters={alpha_miner.Variants.ALPHA_VERSION_CLASSIC.value.Parameters.ACTIVITY_KEY: "org:resource"}) gviz = visualizer.apply(net, im, fm) visualizer.view(gviz)
@fit-alessandro-berti thanks, what was the design reason to have that enum as the key rather than just an additional parameter to apply or even just a string key?
Seems to be a bit difficult to use. Was there a reason for not going with some implementation that uses *args or **kwags for passing additional parameters to lower-level function calls?
Also to confirm, I will need to find the enum class for a parameter arg in a function across pm4py for the function to use my parameter dict ?
Hi,
I am trying to set the activity label for the alpha miner, in the snippet below, is this the correct way to set it to an event attribute that isn't 'concept:name' ?
When I visualise the net, I see the concept:name being used as the transition names in the Petri net. Is this intended and I need to set up the visualisation differently or did it not use the given attribute label for discovery?
This snippet is what I see when I visualise the net:
package version : '1.3.3' python environment : 3.8.1