def read_data_1(stats_dir, filen):
stats_dir = utils.abs_path_dir(stats_dir)
filen = utils.abs_path_file(filen)
data = []
names = []
with open(stats_dir + filen, "r") as filep:
for line in filep:
# Read file with lines like this:
# GA,0.578947368421,0.631578947368,0.710526315789,0.722222222222
# SVMBFF,0.631578947368,0.684210526316,0.815789473684,0.66666666
# VQMM,0.736842105263,0.842105263158,0.842105263158,0.75,0.61111
row = line[:-1].split(",")
tmp = []
for index in range(1, len(row)):
names.append(row[0])
tmp.append(float(row[index]))
data.append(tmp)
print(filen.split(".")[0].split("_")[1].title() + " for " + row[0] + " \t= " + str("{0:.3f}".format(sum(tmp)/len(tmp))) + " ± " + str("{0:.3f}".format(stdev(tmp))))
评论列表
文章目录