-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
cff034f
commit 3732190
Showing
12 changed files
with
68 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
import pandas as pd | ||
from prettytable import PrettyTable | ||
|
||
KEY_VALUE = { | ||
'bart_score_bart_base_adapter': 'bart_score_avg_f', | ||
'bart_score_bart_base': 'bart_score_avg_f', | ||
'bert_score_bert_base_adapter': 'bert_score_f', | ||
'bert_score_bert_base': 'bert_score_f', | ||
'bert_score_bert_large_adapter': 'bert_score_f', | ||
'bert_score_bert_large': 'bert_score_f', | ||
'bleurt_bert_base_adapter': 'bleurt_score', | ||
'bleurt_bert_base': 'bleurt_score' | ||
} | ||
|
||
|
||
|
||
def analyse_pkls(key,value): | ||
data=pd.read_pickle('pkls/' + key +'.pkl' ) | ||
from scipy.stats import pearsonr, spearmanr, kendalltau | ||
|
||
human = [] | ||
metric = [] | ||
|
||
for i in data.keys(): | ||
for j in data[i]['sys_summs'].keys(): | ||
human.append(data[i]['sys_summs'][j]['scores']['litepyramid_recall']) | ||
metric.append(data[i]['sys_summs'][j]['scores'][value]) | ||
correlation, p_value = spearmanr(metric, human) | ||
return correlation | ||
pt = PrettyTable() | ||
|
||
for key in KEY_VALUE.keys(): | ||
pt.add_column(key, [analyse_pkls(key,KEY_VALUE[key])]) | ||
|
||
print(pt) |
Binary file added
BIN
+1.83 MB
mitigating_bias/performance_eval/REALSumm/pkls/bart_score_bart_base.pkl
Binary file not shown.
Binary file added
BIN
+1.83 MB
mitigating_bias/performance_eval/REALSumm/pkls/bart_score_bart_base_adapter.pkl
Binary file not shown.
Binary file added
BIN
+11.5 MB
mitigating_bias/performance_eval/REALSumm/pkls/bert_score_bert_base.pkl
Binary file not shown.
Binary file added
BIN
+11.5 MB
mitigating_bias/performance_eval/REALSumm/pkls/bert_score_bert_base_adapter.pkl
Binary file not shown.
Binary file added
BIN
+11.5 MB
mitigating_bias/performance_eval/REALSumm/pkls/bert_score_bert_large.pkl
Binary file not shown.
Binary file added
BIN
+11.5 MB
mitigating_bias/performance_eval/REALSumm/pkls/bert_score_bert_large_adapter.pkl
Binary file not shown.
Binary file not shown.
Binary file added
BIN
+1.42 MB
mitigating_bias/performance_eval/REALSumm/pkls/bleurt_bert_base_adapter.pkl
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
pandas==1.3.4 | ||
prettytable==3.4.1 | ||
scipy==1.7.1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
absl==0.0 | ||
adapter_transformers==3.1.0 | ||
matplotlib==3.4.3 | ||
numpy==1.20.3 | ||
pandas==1.3.4 | ||
prettytable==3.4.1 | ||
pyemd==0.5.1 | ||
scipy==1.7.1 | ||
score==0.0.1a0 | ||
setuptools==58.0.4 | ||
tqdm==4.62.3 | ||
transformers==4.23.1 |