Commit fe39d007 authored by Ard Kastrati's avatar Ard Kastrati
Browse files

Comparison Plot

parent b96aff1d
......@@ -18,17 +18,17 @@ def main():
logging.info('Started the Logging')
start_time = time.time()
# try:
trainX, trainY = IOHelper.get_mat_data(config['data_dir'], verbose=True)
#trainX, trainY = IOHelper.get_mat_data(config['data_dir'], verbose=True)
if config['model'] == 'eegnet' or config['model'] == 'eegnet_cluster':
trainX = np.transpose(trainX, (0, 2, 1))
logging.info(trainX.shape)
#if config['model'] == 'eegnet' or config['model'] == 'eegnet_cluster':
# trainX = np.transpose(trainX, (0, 2, 1))
# logging.info(trainX.shape)
# tune(trainX,trainY)
run(trainX,trainY)
# run(trainX,trainY)
# select_best_model()
# comparison_plot()
comparison_plot()
logging.info("--- Runtime: %s seconds ---" % (time.time() - start_time))
logging.info('Finished Logging')
......
......@@ -70,7 +70,8 @@ def cp_dir(source, target):
def comparison_plot():
run_dir = os.getcwd()+'/results/'
run_dir = './results/OHBM/'
print(run_dir)
plt.figure()
plt.title('Comparison of the Validation accuracy' )
plt.grid(True)
......@@ -78,18 +79,11 @@ def comparison_plot():
plt.ylabel('accuracy (%)')
for experiment in os.listdir(run_dir):
position = experiment.find('ensemble')
if position != -1:
name_split = experiment.split('_')
name=name_split[1]
for i in range(2,len(name_split)):
name += '_'
name += name_split[i]
summary = pd.read_csv(run_dir+experiment+'/'+name+'_history.csv')
acc = 100 * summary['val_accuracy']
plt.plot(acc,'-',label=name)
name = experiment
print(name)
summary = pd.read_csv(run_dir+experiment+'/'+name+'_history.csv')
acc = 100 * summary['val_accuracy']
plt.plot(acc, '-' , label=name)
plt.legend()
plt.savefig(run_dir+'/comparison_accuracy.png')
......
Supports Markdown
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