def test_evaluation_pm1(self): log = xes_importer.import_from_file_xes( os.path.join(INPUT_DATA_DIR, "running-example.xes")) net, marking, final_marking = dfg_only.apply(log, None) fitness = fitness_factory.apply(log, net, marking, final_marking) precision = precision_factory.apply(log, net, marking, final_marking) generalization = generalization_factory.apply(log, net, marking, final_marking) simplicity = simplicity_factory.apply(net)
def test_alignment_pnml(self): traceLog = xes_importer.import_from_file_xes( os.path.join(INPUT_DATA_DIR, "running-example.xes")) net, marking, final_marking = dfg_only.apply(traceLog, None) for trace in traceLog: cfResult = align.versions.state_equation_a_star.apply( trace, net, marking, final_marking)['alignment'] isFit = True for couple in cfResult: if not (couple[0] == couple[1] or couple[0] == ">>" and couple[1] == None): isFit = False if not isFit: raise Exception("should be fit")
import os, sys, inspect currentdir = os.path.dirname( os.path.abspath(inspect.getfile(inspect.currentframe()))) parentdir = os.path.dirname(currentdir) sys.path.insert(0, parentdir) from pm4py.log.importer import xes as xes_importer from pm4py.algo.inductive.versions import dfg_only from pm4py.models import petri from pm4py.evaluation import factory as evaluation_factory if __name__ == "__main__": log = xes_importer.import_from_file_xes( '..\\tests\\inputData\\reviewing.xes') net, marking, final_marking = dfg_only.apply(log, None) metrics = evaluation_factory.apply(log, net, marking, final_marking) print("metrics=", metrics)
def test_evaluation_pm2(self): log = xes_importer.import_from_file_xes( os.path.join(INPUT_DATA_DIR, "running-example.xes")) net, marking, final_marking = dfg_only.apply(log, None) metrics = evaluation_factory.apply(log, net, marking, final_marking)
def test_etc1(self): log = xes_importer.import_from_file_xes(os.path.join(INPUT_DATA_DIR, "running-example.xes")) net, marking, final_marking = dfg_only.apply(log, None) precision = etc_factory.apply(log, net, marking, final_marking)