Spaces:
Running
Running
Andrea Maldonado
commited on
Commit
Β·
b148556
1
Parent(s):
8517a41
rutpt to rvpnot, _heuristics to _heu
Browse files- config_files/algorithm/benchmark.json +1 -1
- config_files/algorithm/experiment_test.json +1 -1
- data/grid_1obj/{grid_1objectives_rutpt.csv β grid_1objectives_rvpnot.csv} +0 -0
- data/grid_2obj/{grid_2objectives_ense_rutpt.csv β grid_2objectives_ense_rvpnot.csv} +0 -0
- data/grid_2obj/{grid_2objectives_enseef_rutpt.csv β grid_2objectives_enseef_rvpnot.csv} +0 -0
- data/grid_2obj/{grid_2objectives_enself_rutpt.csv β grid_2objectives_enself_rvpnot.csv} +0 -0
- data/grid_2obj/{grid_2objectives_enve_rutpt.csv β grid_2objectives_enve_rvpnot.csv} +0 -0
- data/grid_2obj/{grid_2objectives_rmcv_rutpt.csv β grid_2objectives_rmcv_rvpnot.csv} +0 -0
- data/grid_2obj/{grid_2objectives_rt10v_rutpt.csv β grid_2objectives_rt10v_rvpnot.csv} +0 -0
- gedi/benchmark.py +3 -1
- gedi/plotter.py +3 -3
config_files/algorithm/benchmark.json
CHANGED
@@ -4,6 +4,6 @@
|
|
4 |
"benchmark_test": "discovery",
|
5 |
"input_path":"data/test",
|
6 |
"output_path":"output",
|
7 |
-
"miners" : ["inductive", "
|
8 |
}
|
9 |
]
|
|
|
4 |
"benchmark_test": "discovery",
|
5 |
"input_path":"data/test",
|
6 |
"output_path":"output",
|
7 |
+
"miners" : ["inductive", "heu", "imf", "ilp"]
|
8 |
}
|
9 |
]
|
config_files/algorithm/experiment_test.json
CHANGED
@@ -47,6 +47,6 @@
|
|
47 |
"benchmark_test": "discovery",
|
48 |
"input_path":"data/test",
|
49 |
"output_path":"output",
|
50 |
-
"miners" : ["inductive", "
|
51 |
}
|
52 |
]
|
|
|
47 |
"benchmark_test": "discovery",
|
48 |
"input_path":"data/test",
|
49 |
"output_path":"output",
|
50 |
+
"miners" : ["inductive", "heu", "imf", "ilp"]
|
51 |
}
|
52 |
]
|
data/grid_1obj/{grid_1objectives_rutpt.csv β grid_1objectives_rvpnot.csv}
RENAMED
File without changes
|
data/grid_2obj/{grid_2objectives_ense_rutpt.csv β grid_2objectives_ense_rvpnot.csv}
RENAMED
File without changes
|
data/grid_2obj/{grid_2objectives_enseef_rutpt.csv β grid_2objectives_enseef_rvpnot.csv}
RENAMED
File without changes
|
data/grid_2obj/{grid_2objectives_enself_rutpt.csv β grid_2objectives_enself_rvpnot.csv}
RENAMED
File without changes
|
data/grid_2obj/{grid_2objectives_enve_rutpt.csv β grid_2objectives_enve_rvpnot.csv}
RENAMED
File without changes
|
data/grid_2obj/{grid_2objectives_rmcv_rutpt.csv β grid_2objectives_rmcv_rvpnot.csv}
RENAMED
File without changes
|
data/grid_2obj/{grid_2objectives_rt10v_rutpt.csv β grid_2objectives_rt10v_rvpnot.csv}
RENAMED
File without changes
|
gedi/benchmark.py
CHANGED
@@ -94,7 +94,7 @@ class BenchmarkTest:
|
|
94 |
else:
|
95 |
log_name = "gen_el_"+str(log_counter)
|
96 |
results = {"log": event_log}
|
97 |
-
|
98 |
for miner in miners:
|
99 |
miner_cols = [f"fitness_{miner}", f"precision_{miner}", f"fscore_{miner}", f"size_{miner}", f"cfc_{miner}", f"pnsize_{miner}"]# f"generalization_{miner}",f"simplicity_{miner}"]
|
100 |
start_miner = dt.now()
|
@@ -186,6 +186,8 @@ class BenchmarkTest:
|
|
186 |
if miner == 'imf':
|
187 |
miner = 'inductive'
|
188 |
miner_params = f', noise_threshold={NOISE_THRESHOLD}'
|
|
|
|
|
189 |
net, im, fm = eval(f"discover_petri_net_{miner}(log {miner_params})")
|
190 |
bpmn_graph = convert_to_bpmn(net, im, fm)
|
191 |
fitness = fitness_alignments(log, net, im, fm)['log_fitness']
|
|
|
94 |
else:
|
95 |
log_name = "gen_el_"+str(log_counter)
|
96 |
results = {"log": event_log}
|
97 |
+
|
98 |
for miner in miners:
|
99 |
miner_cols = [f"fitness_{miner}", f"precision_{miner}", f"fscore_{miner}", f"size_{miner}", f"cfc_{miner}", f"pnsize_{miner}"]# f"generalization_{miner}",f"simplicity_{miner}"]
|
100 |
start_miner = dt.now()
|
|
|
186 |
if miner == 'imf':
|
187 |
miner = 'inductive'
|
188 |
miner_params = f', noise_threshold={NOISE_THRESHOLD}'
|
189 |
+
elif miner == 'heu':
|
190 |
+
miner = 'heuristics'
|
191 |
net, im, fm = eval(f"discover_petri_net_{miner}(log {miner_params})")
|
192 |
bpmn_graph = convert_to_bpmn(net, im, fm)
|
193 |
fitness = fitness_alignments(log, net, im, fm)['log_fitness']
|
gedi/plotter.py
CHANGED
@@ -263,7 +263,7 @@ class BenchmarkPlotter:
|
|
263 |
corr = df.corr()
|
264 |
|
265 |
if mean == 'methods':
|
266 |
-
for method in ['inductive', '
|
267 |
method_cols = [col for col in corr.columns if col.startswith(method)]
|
268 |
corr[method+'_avg'] = corr.loc[:, corr.columns.isin(method_cols)].mean(axis=1)
|
269 |
elif mean == 'metrics':
|
@@ -274,7 +274,7 @@ class BenchmarkPlotter:
|
|
274 |
avg_cols = [col for col in corr.columns if col.endswith('_avg')]
|
275 |
|
276 |
benchmark_result_cols = [col for col in corr.columns if col.startswith('inductive')
|
277 |
-
or col.startswith('
|
278 |
|
279 |
corr = corr[:][~corr.index.isin(benchmark_result_cols)]
|
280 |
|
@@ -298,7 +298,7 @@ class BenchmarkPlotter:
|
|
298 |
|
299 |
def plot_miners_correlation(self, benchmark, output_path=None):
|
300 |
benchmark_result_cols = [col for col in benchmark.columns if col.startswith('inductive')
|
301 |
-
or col.startswith('
|
302 |
df = benchmark.loc[:, benchmark.columns!='log']
|
303 |
df = df.loc[:, df.columns.isin(benchmark_result_cols)]
|
304 |
|
|
|
263 |
corr = df.corr()
|
264 |
|
265 |
if mean == 'methods':
|
266 |
+
for method in ['inductive', 'heu', 'ilp']:
|
267 |
method_cols = [col for col in corr.columns if col.startswith(method)]
|
268 |
corr[method+'_avg'] = corr.loc[:, corr.columns.isin(method_cols)].mean(axis=1)
|
269 |
elif mean == 'metrics':
|
|
|
274 |
avg_cols = [col for col in corr.columns if col.endswith('_avg')]
|
275 |
|
276 |
benchmark_result_cols = [col for col in corr.columns if col.startswith('inductive')
|
277 |
+
or col.startswith('heu') or col.startswith('ilp')]
|
278 |
|
279 |
corr = corr[:][~corr.index.isin(benchmark_result_cols)]
|
280 |
|
|
|
298 |
|
299 |
def plot_miners_correlation(self, benchmark, output_path=None):
|
300 |
benchmark_result_cols = [col for col in benchmark.columns if col.startswith('inductive')
|
301 |
+
or col.startswith('heu') or col.startswith('ilp')]
|
302 |
df = benchmark.loc[:, benchmark.columns!='log']
|
303 |
df = df.loc[:, df.columns.isin(benchmark_result_cols)]
|
304 |
|