show results fix
This commit is contained in:
parent
79f3709e6f
commit
bd9f8e2cb4
|
|
@ -53,4 +53,4 @@ def show_results(result_path):
|
||||||
pd.set_option('display.max_columns', None)
|
pd.set_option('display.max_columns', None)
|
||||||
pd.set_option('display.max_rows', None)
|
pd.set_option('display.max_rows', None)
|
||||||
pv = df.pivot_table(index='Dataset', columns="Method", values=["MAE", "MRAE"])
|
pv = df.pivot_table(index='Dataset', columns="Method", values=["MAE", "MRAE"])
|
||||||
print(pv)
|
print(pv)
|
||||||
|
|
|
||||||
|
|
@ -17,8 +17,8 @@ SEED = 1
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
print(qp.datasets.UCI_MULTICLASS_DATASETS)
|
print(qp.datasets.UCI_MULTICLASS_DATASETS)
|
||||||
table = LatexTable()
|
for optim in ['mae', 'mrae']:
|
||||||
for optim in ['mae']:
|
table = LatexTable()
|
||||||
result_dir = f'results/ucimulti/{optim}'
|
result_dir = f'results/ucimulti/{optim}'
|
||||||
|
|
||||||
for method in METHODS:
|
for method in METHODS:
|
||||||
|
|
@ -30,9 +30,9 @@ if __name__ == '__main__':
|
||||||
local_result_path = global_result_path + '_' + dataset
|
local_result_path = global_result_path + '_' + dataset
|
||||||
if os.path.exists(local_result_path + '.dataframe'):
|
if os.path.exists(local_result_path + '.dataframe'):
|
||||||
report = pd.read_csv(local_result_path+'.dataframe')
|
report = pd.read_csv(local_result_path+'.dataframe')
|
||||||
print(f'{method}\t{dataset}\t{report["mae"].mean():.5f}')
|
print(f'{method}\t{dataset}\t{report[optim].mean():.5f}')
|
||||||
table.add(benchmark=dataset, method=method, v=report["mae"].values)
|
table.add(benchmark=dataset, method=method, v=report[optim].values)
|
||||||
else:
|
else:
|
||||||
print(dataset, 'not found for method', method)
|
print(dataset, 'not found for method', method)
|
||||||
table.latexPDF(f'./tables/{optim}.pdf', landscape=False)
|
table.latexPDF(f'./tables/{optim}.pdf', landscape=False)
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue