Skip to content

Commit

Permalink
by minqi
Browse files Browse the repository at this point in the history
  • Loading branch information
Minqi824 committed Jun 1, 2023
1 parent 9d116a1 commit cccc9ef
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion metaclassifier/meta_dl.py
Original file line number Diff line number Diff line change
Expand Up @@ -626,4 +626,4 @@ def run(suffix, grid_mode, grid_size, mode, loss_name=None, ensemble=False):
# loss_name: ['pearson', 'ranknet', 'mse', 'weighted_mse']
# ensemble: bool
# mode: either 'two-stage' or 'end-to-end'
run(suffix='formal', grid_mode='small', grid_size=1000, loss_name='weighted_mse', ensemble=False, mode='two-stage')
run(suffix='formal', grid_mode='small', grid_size=1000, loss_name='weighted_mse', ensemble=False, mode='end-to-end')
5 changes: 4 additions & 1 deletion metaclassifier/meta_ml.py
Original file line number Diff line number Diff line change
Expand Up @@ -263,6 +263,9 @@ def meta_predict(self, metric=None, top_k=5):
def run(suffix, grid_mode, grid_size, model_name, ensemble):
# run experiments for comparing proposed meta classifier and current SOTA methods
utils = Utils()
file_path = 'meta-' + grid_mode + '-' + str(grid_size)
if not os.path.exists('../result/' + file_path):
os.makedirs('../result/' + file_path)

for metric in ['AUCROC', 'AUCPR']:
# result of current SOTA models
Expand Down Expand Up @@ -342,7 +345,7 @@ def run(suffix, grid_mode, grid_size, model_name, ensemble):
meta_classifier_performance[i] = -1

result_SOTA['Meta'] = meta_classifier_performance
result_SOTA.to_csv('../result/' + metric + '-meta-ml-' + model_name + '-' + str(ensemble) + '.csv', index=False)
result_SOTA.to_csv('../result/' + file_path + '/' + metric + '-meta-ml-' + model_name + '-' + str(ensemble) + '.csv', index=False)

test_dataset_previous = test_dataset
test_seed_previous = test_seed
Expand Down

0 comments on commit cccc9ef

Please sign in to comment.