Commit
·
dc36465
1
Parent(s):
719ace9
Wilcoxon analysis on the performance of ANTs vs SG-NSD and BL-N
Browse files
EvaluationScripts/statistics.py
CHANGED
@@ -58,6 +58,38 @@ def post_hoc_ixi(df_in: pd.DataFrame, outdir: str = './'):
|
|
58 |
print(out_pd)
|
59 |
|
60 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
61 |
def study_transfer_learning_benefit(df_in: pd.DataFrame):
|
62 |
df_tl = df_in[df_in["Experiment"] == "COMET_TL_Ft2Stp"]
|
63 |
df_orig = df[df["Experiment"] == "COMET"]
|
@@ -82,7 +114,6 @@ def study_transfer_learning_benefit(df_in: pd.DataFrame):
|
|
82 |
print("BL-N:", corrected_pvs[0])
|
83 |
print("SG-NSD:", corrected_pvs[1])
|
84 |
print("UW-NSD:", corrected_pvs[2])
|
85 |
-
|
86 |
|
87 |
def post_hoc_comet(df_in: pd.DataFrame):
|
88 |
df_tl = df_in[df_in["Experiment"] == "COMET_TL_Ft2Stp"]
|
@@ -139,5 +170,11 @@ if __name__ == "__main__":
|
|
139 |
print("\nAssessing whether there is a benefit to segmentation-guiding and uncertainty weighting (COMET):")
|
140 |
post_hoc_comet(df)
|
141 |
|
|
|
|
|
|
|
|
|
|
|
|
|
142 |
print('Statsmodels v.: ' + statsmodels.__version__)
|
143 |
print('Scipy v.: ' + scipy.__version__)
|
|
|
58 |
print(out_pd)
|
59 |
|
60 |
|
61 |
+
def study_seg_guided_ANTs(df_in: pd.DataFrame):
|
62 |
+
tre_sg = df_in[(df_in["Experiment"] == "COMET_TL_Ft2Stp") & (df_in["Model"] == "SG-NSD")]["TRE"]
|
63 |
+
tre_syn = df_in[(df_in["Experiment"] == "ANTs") & (df_in["Model"] == "SyN")]["TRE"]
|
64 |
+
tre_syncc = df_in[(df_in["Experiment"] == "ANTs") & (df_in["Model"] == "SyNCC")]["TRE"]
|
65 |
+
|
66 |
+
pvs = list()
|
67 |
+
pvs.append(stats.wilcoxon(tre_sg, tre_syn, alternative="less").pvalue)
|
68 |
+
pvs.append(stats.wilcoxon(tre_sg, tre_syncc, alternative="less").pvalue)
|
69 |
+
|
70 |
+
# False discovery rate to get corrected p-values
|
71 |
+
corrected_pvs = fdrcorrection(pvs, alpha=0.05, method="indep")[1] # Benjamini/Hochberg -> method="indep"
|
72 |
+
|
73 |
+
print("SG-NSD vs SyN:", corrected_pvs[0])
|
74 |
+
print("SG-NSD vs SyNCC:", corrected_pvs[1])
|
75 |
+
|
76 |
+
|
77 |
+
def study_baseline_ANTs(df_in: pd.DataFrame):
|
78 |
+
tre_bl = df_in[(df_in["Experiment"] == "COMET_TL_Ft2Stp") & (df_in["Model"] == "BL-N")]["TRE"]
|
79 |
+
tre_syn = df_in[(df_in["Experiment"] == "ANTs") & (df_in["Model"] == "SyN")]["TRE"]
|
80 |
+
tre_syncc = df_in[(df_in["Experiment"] == "ANTs") & (df_in["Model"] == "SyNCC")]["TRE"]
|
81 |
+
|
82 |
+
pvs = list()
|
83 |
+
pvs.append(stats.wilcoxon(tre_bl, tre_syn, alternative="less").pvalue)
|
84 |
+
pvs.append(stats.wilcoxon(tre_bl, tre_syncc, alternative="less").pvalue)
|
85 |
+
|
86 |
+
# False discovery rate to get corrected p-values
|
87 |
+
corrected_pvs = fdrcorrection(pvs, alpha=0.05, method="indep")[1] # Benjamini/Hochberg -> method="indep"
|
88 |
+
|
89 |
+
print("BL-N vs SyN:", corrected_pvs[0])
|
90 |
+
print("BL-N vs SyNCC:", corrected_pvs[1])
|
91 |
+
|
92 |
+
|
93 |
def study_transfer_learning_benefit(df_in: pd.DataFrame):
|
94 |
df_tl = df_in[df_in["Experiment"] == "COMET_TL_Ft2Stp"]
|
95 |
df_orig = df[df["Experiment"] == "COMET"]
|
|
|
114 |
print("BL-N:", corrected_pvs[0])
|
115 |
print("SG-NSD:", corrected_pvs[1])
|
116 |
print("UW-NSD:", corrected_pvs[2])
|
|
|
117 |
|
118 |
def post_hoc_comet(df_in: pd.DataFrame):
|
119 |
df_tl = df_in[df_in["Experiment"] == "COMET_TL_Ft2Stp"]
|
|
|
170 |
print("\nAssessing whether there is a benefit to segmentation-guiding and uncertainty weighting (COMET):")
|
171 |
post_hoc_comet(df)
|
172 |
|
173 |
+
print("\nAssessing the performance of BL-N vs ANTs registration (COMET):")
|
174 |
+
study_baseline_ANTs(df)
|
175 |
+
|
176 |
+
print("\nAssessing the performance of SG-NSD vs ANTs registration (COMET):")
|
177 |
+
study_seg_guided_ANTs(df)
|
178 |
+
|
179 |
print('Statsmodels v.: ' + statsmodels.__version__)
|
180 |
print('Scipy v.: ' + scipy.__version__)
|