Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- test_stat,p_value = stats.friedmanchisquare(method_A,method_B, method_C)
- print("p value:%.4f" % p_value)
- Note: Since the data is not normal, the nonparametric version of the posthoc test is used.
- data = np.array([method_A, method_B, method_C])
- posthoc_df=sp.posthoc_wilcoxon(data, p_adjust="holm")
- # posthoc_df = sp.posthoc_nemenyi_friedman(data.T) ## another option for the posthoc test
- group_names= ["Method A", "Method B","Method C"]
- posthoc_df.columns= group_names
- posthoc_df.index= group_names
- posthoc_df.style.applymap(lambda x: "background-color:violet" if x<0.05 else "background-color: white")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement