Commit 2288bfa1 authored by Justin Borromeo's avatar Justin Borromeo
Browse files

Unconstrained baseline

parent 92805833
......@@ -327,7 +327,27 @@ class cma_approach(object):
if self.print_to_csv:
with open(pc.RESULT_CSV_PATH+'cma_logmore_sq.csv', 'a') as csvFile:
writer = csv.writer(csvFile, delimiter=',', lineterminator="\n")
writer.writerow([self.target_col,self.i,self.k, self.topology_file, 1,(1/max_latency), max_latency*self.k, 1/full_latency[full_max_idx], full_latency[full_max_idx], (1/max_latency)/(1/full_latency[full_max_idx]), (max_latency*self.k)/full_latency[full_max_idx], layer, res, self.end-self.start, self.es.sigma, self.seed_od,self.valid_sampling_percentage, self.trial, self.population_size, self.max_res_unit, self.seeding_type])
writer.writerow([self.target_col,
self.i,
self.k,
self.topology_file,
1,
(1/max_latency),
max_latency*self.k,
1/full_latency[full_max_idx],
full_latency[full_max_idx],
(1/max_latency)/(1/full_latency[full_max_idx]),
(max_latency*self.k)/full_latency[full_max_idx],
layer,
res,
self.end-self.start,
self.es.sigma,
self.seed_od,
self.valid_sampling_percentage,
self.trial,
self.population_size,
self.max_res_unit,
self.seeding_type])
csvFile.close
with open(pc.RESULT_CSV_PATH+'cma_unconstrained_sq.csv', 'a') as csvFile:
......@@ -345,7 +365,6 @@ class cma_approach(object):
pngFileName = str(self.topology_file.replace(".csv", "")) + "_k=" + str(self.k) + "_max=" + str(self.max_res_unit) + "_packSize=" + str(self.max_pack_size) + ".png"
pp.printPNG(res, self.max_pack_size, pngFileName)
"""
result = [self.target_col,self.i,self.k, self.topology_file, 1,(1/max_latency), max_latency*self.k, 1/full_latency[full_max_idx], full_latency[full_max_idx], (1/max_latency)/(1/full_latency[full_max_idx]), (max_latency*self.k)/full_latency[full_max_idx], layer, res, self.end-self.start, self.es.sigma, self.seed_od,self.valid_sampling_percentage, self.trial, self.population_size, self.max_res_unit, self.seeding_type]
return True, result
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment