Пример #1
0
 def get_mvp_visualization(self):
     parameters = {}
     parameters["format"] = "svg"
     parameters["min_act_count"] = self.selected_min_acti_count
     parameters["min_dfg_occurrences"] = self.selected_min_edge_freq_count
     if self.selected_model_type == "mvp_performance":
         parameters["performance"] = True
     else:
         parameters["performance"] = False
     model = mvp_discovery.apply(self.exploded_dataframe, parameters=parameters)
     gviz = mvp_vis_factory.apply(model, parameters=parameters)
     tfilepath = tempfile.NamedTemporaryFile(suffix='.svg')
     tfilepath.close()
     mvp_vis_factory.save(gviz, tfilepath.name)
     self.model_view = base64.b64encode(open(tfilepath.name, "rb").read()).decode('utf-8')
Пример #2
0
from pm4pymdl.objects.mdl.importer import importer as mdl_importer
from pm4pymdl.algo.mvp.discovery import algorithm as mvp_disc_factory
from pm4pymdl.visualization.mvp import visualizer as mvp_vis_factory

df = mdl_importer.apply("../example_logs/mdl/order_management.mdl")
model = mvp_disc_factory.apply(df)
gviz = mvp_vis_factory.apply(model, parameters={"format": "svg"})
mvp_vis_factory.view(gviz)
Пример #3
0
mapping["WRX"] = "Account determination for GR/IR clearing account"
mapping["GBB"] = "Offsetting entry for inventory posting"
mapping["MB1B"] = "Enter Transfer Posting"
df["event_activity"] = df["event_activity"].apply(lambda x: mapping[x])

from pm4pymdl.objects.mdl.exporter import exporter as mdl_exporter
mdl_exporter.apply(df, "bkpf_bseg.mdl")

#print(df["event_activity"].unique())
#input()
#print(df)

model = mvp_disc_factory.apply(df,
                               parameters={
                                   "min_dfg_occurrences": 3,
                                   "performance": False,
                                   "decreasing_factor_sa_ea": 0.0,
                                   "dependency_thresh": 0.3,
                                   "perspectives": ["belnr", "xblnr", "hkont"]
                               })

gviz = mvp_vis_factory.apply(model, parameters={"format": "svg"})
mvp_vis_factory.save(gviz, "bkpf_caseid_frequency.svg")

model = mvp_disc_factory.apply(df,
                               parameters={
                                   "min_dfg_occurrences": 3,
                                   "performance": True,
                                   "decreasing_factor_sa_ea": 0.0,
                                   "dependency_thresh": 0.3,
                                   "perspectives": ["belnr", "xblnr", "hkont"]
                               })