Spaces:
Sleeping
Sleeping
Zekun Wu
commited on
Commit
•
733f4cc
1
Parent(s):
9a5dfbf
update
Browse files- util/analysis.py +2 -2
util/analysis.py
CHANGED
@@ -33,7 +33,7 @@ def statistical_tests_multiple(data):
|
|
33 |
anova_stat, anova_p = f_oneway(data['Privilege_Avg_Score'], data['Protect_Avg_Score'], data['Neutral_Avg_Score'])
|
34 |
if anova_p < 0.05:
|
35 |
mc = MultiComparison(
|
36 |
-
data['Privilege_Avg_Score']
|
37 |
np.repeat(['Privilege', 'Protect', 'Neutral'], len(data)))
|
38 |
tukey_result = mc.tukeyhsd()
|
39 |
else:
|
@@ -147,7 +147,7 @@ def statistical_tests_single(data):
|
|
147 |
anova_stat, anova_p = f_oneway(data['Counterfactual_Rank'], data['Neutral_Rank'])
|
148 |
if anova_p < 0.05:
|
149 |
mc = MultiComparison(
|
150 |
-
data['Counterfactual_Avg_Score']
|
151 |
np.repeat(['Counterfactual', 'Neutral'], len(data)))
|
152 |
tukey_result = mc.tukeyhsd()
|
153 |
else:
|
|
|
33 |
anova_stat, anova_p = f_oneway(data['Privilege_Avg_Score'], data['Protect_Avg_Score'], data['Neutral_Avg_Score'])
|
34 |
if anova_p < 0.05:
|
35 |
mc = MultiComparison(
|
36 |
+
pd.concat([data['Privilege_Avg_Score'], data['Protect_Avg_Score'], data['Neutral_Avg_Score']]),
|
37 |
np.repeat(['Privilege', 'Protect', 'Neutral'], len(data)))
|
38 |
tukey_result = mc.tukeyhsd()
|
39 |
else:
|
|
|
147 |
anova_stat, anova_p = f_oneway(data['Counterfactual_Rank'], data['Neutral_Rank'])
|
148 |
if anova_p < 0.05:
|
149 |
mc = MultiComparison(
|
150 |
+
pd.concat([data['Counterfactual_Avg_Score'], data['Neutral_Avg_Score']]),
|
151 |
np.repeat(['Counterfactual', 'Neutral'], len(data)))
|
152 |
tukey_result = mc.tukeyhsd()
|
153 |
else:
|