pm4py / pm4py-core

Public repository for the PM4Py (Process Mining for Python) project.
https://pm4py.fit.fraunhofer.de
GNU Affero General Public License v3.0
739 stars 287 forks source link

'OCEL' object is not iterable #499

Closed william-vw closed 3 months ago

william-vw commented 3 months ago

I replaced an XES log with an OCEL2 log in the code below:

import pm4py
import pandas as pd

# log = pm4py.read_xes("../logs/sepsis.xes")
log = pm4py.read_ocel2("../logs/ocel/ocel2-p2p.xml")

from pm4py.algo.discovery.dfg import algorithm as dfg_discovery
dfg = dfg_discovery.apply(log, variant=dfg_discovery.Variants.PERFORMANCE)

I am getting the following error:

from pm4py.algo.discovery.dfg import algorithm as dfg_discovery

dfg = dfg_discovery.apply(log, variant=dfg_discovery.Variants.PERFORMANCE)

# from pm4py.algo.discovery.heuristics import algorithm as heuristics_miner
# from pm4py.visualization.heuristics_net import visualizer as hn_visualizer
# # heuristics miner
# heu_net = heuristics_miner.apply_heu(log)

# # visualize
# gviz = hn_visualizer.apply(heu_net)
# hn_visualizer.view(gviz)

# # from pm4py.algo.discovery.inductive import algorithm as inductive_miner

(I tried heuristics miner as well, which led to the same error)

Should I call process mining algorithms in a different way with this type of log?

william-vw commented 3 months ago

(I realize that there is a lack of an explicit case notion in OCEL2 logs; I assume that these algorithms need some indication of this.)