Andrea Maldonado commited on
Commit
1d1b662
·
1 Parent(s): 2b0220d

wip experiment with real targets

Browse files
config_files/algorithm/experiment_real_targets.json ADDED
@@ -0,0 +1,41 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [
2
+ {
3
+ "pipeline_step": "event_logs_generation",
4
+ "output_path": "output",
5
+ "generator_params": {
6
+ "experiment": {
7
+ "input_path": "data/BaselineED_feat.csv",
8
+ "objectives":["ratio_variants_per_number_of_traces","ratio_most_common_variant","ratio_top_10_variants","epa_normalized_variant_entropy","epa_normalized_sequence_entropy","epa_normalized_sequence_entropy_linear_forgetting","epa_normalized_sequence_entropy_exponential_forgetting"]},
9
+ "config_space": {
10
+ "mode": [5, 20],
11
+ "sequence": [0.01, 1],
12
+ "choice": [0.01, 1],
13
+ "parallel": [0.01, 1],
14
+ "loop": [0.01, 1],
15
+ "silent": [0.01, 1],
16
+ "lt_dependency": [0.01, 1],
17
+ "num_traces": [10, 10001],
18
+ "duplicate": [0],
19
+ "or": [0]
20
+ },
21
+ "n_trials": 200,
22
+ "plot_reference_feature": ""
23
+ }
24
+ },
25
+ {
26
+ "pipeline_step": "feature_extraction",
27
+ "input_path": "output/generated/BaselineED_feat/7_ense_enseef_enself_enve_rmcv_rt10v_rutpt/",
28
+ "input_path": "output/features/BaselineED_feat/7_ense_enseef_enself_enve_rmcv_rt10v_rutpt/",
29
+ "feature_params": {"feature_set":["ratio_variants_per_number_of_traces","ratio_most_common_variant","ratio_top_10_variants","epa_normalized_variant_entropy","epa_normalized_sequence_entropy","epa_normalized_sequence_entropy_linear_forgetting","epa_normalized_sequence_entropy_exponential_forgetting"]},
30
+ "output_path": "output/plots",
31
+ "real_eventlog_path": "data/BaselineED_feat.csv",
32
+ "plot_type": "boxplot"
33
+ },
34
+ {
35
+ "pipeline_step": "benchmark_test",
36
+ "benchmark_test": "discovery",
37
+ "input_path": "output/generated/BaselineED_feat/7_ense_enseef_enself_enve_rmcv_rt10v_rutpt/",
38
+ "output_path":"output",
39
+ "miners" : ["heu", "imf", "ilp"]
40
+ }
41
+ ]
gedi/generator.py CHANGED
@@ -91,10 +91,14 @@ class GenerateEventLogs():
91
 
92
  self.params = params.get(GENERATOR_PARAMS)
93
  experiment = self.params.get(EXPERIMENT)
 
94
  if experiment!= None:
95
  tasks, output_path = get_tasks(experiment, self.output_path)
96
  self.output_path = output_path
97
 
 
 
 
98
  if tasks is not None:
99
  num_cores = multiprocessing.cpu_count() if len(tasks) >= multiprocessing.cpu_count() else len(tasks)
100
  #self.generator_wrapper([*tasks.iterrows()][0])# For testing
@@ -111,6 +115,10 @@ class GenerateEventLogs():
111
  self.configs = [self.configs]
112
  temp = self.generate_optimized_log(self.configs[0])
113
  self.log_config = [temp]
 
 
 
 
114
  save_path = get_output_key_value_location(self.params[EXPERIMENT],
115
  self.output_path, "genEL")+".xes"
116
  write_xes(temp['log'], save_path)
@@ -136,6 +144,10 @@ class GenerateEventLogs():
136
  log_config = self.generate_optimized_log(self.configs)
137
 
138
  identifier = 'genEL'+str(identifier)
 
 
 
 
139
  save_path = get_output_key_value_location(self.objectives,
140
  self.output_path, identifier)+".xes"
141
 
 
91
 
92
  self.params = params.get(GENERATOR_PARAMS)
93
  experiment = self.params.get(EXPERIMENT)
94
+
95
  if experiment!= None:
96
  tasks, output_path = get_tasks(experiment, self.output_path)
97
  self.output_path = output_path
98
 
99
+ if 'ratio_variants_per_number_of_traces' in tasks.columns:#HOTFIX
100
+ tasks=tasks.rename(columns={"ratio_variants_per_number_of_traces": "ratio_unique_traces_per_trace"})
101
+
102
  if tasks is not None:
103
  num_cores = multiprocessing.cpu_count() if len(tasks) >= multiprocessing.cpu_count() else len(tasks)
104
  #self.generator_wrapper([*tasks.iterrows()][0])# For testing
 
115
  self.configs = [self.configs]
116
  temp = self.generate_optimized_log(self.configs[0])
117
  self.log_config = [temp]
118
+ #TODO: Replace hotfix
119
+ if self.params[EXPERIMENT].get('ratio_unique_traces_per_trace'):#HOTFIX
120
+ self.params[EXPERIMENT]['ratio_variants_per_number_of_traces']=self.params[EXPERIMENT].pop('ratio_unique_traces_per_trace')
121
+
122
  save_path = get_output_key_value_location(self.params[EXPERIMENT],
123
  self.output_path, "genEL")+".xes"
124
  write_xes(temp['log'], save_path)
 
144
  log_config = self.generate_optimized_log(self.configs)
145
 
146
  identifier = 'genEL'+str(identifier)
147
+ #TODO: Replace hotfix
148
+ if self.objectives.get('ratio_unique_traces_per_trace'):#HOTFIX
149
+ self.objectives['ratio_variants_per_number_of_traces']=self.objectives.pop('ratio_unique_traces_per_trace')
150
+
151
  save_path = get_output_key_value_location(self.objectives,
152
  self.output_path, identifier)+".xes"
153