I have a code that I use to generate Nemenyi Diagram. Here is the version:
import Orange
import matplotlib.pyplot as plt
names = ["A1","A2","A3","A4","A5","A6","A7"]
avranks = [8.94,4.94,1.33,9.56,10.94,5.30,4.52]
cd = Orange.evaluation.compute_CD(avranks,48,alpha="0.05") #tested on 48 datasets
print("cd=",cd)
Orange.evaluation.graph_ranks(avranks, names, cd=cd, width=9, textspace=1.2)
plt.subplots_adjust(top=0.95, bottom=0.15, left=0.15, right=0.95) # Adjust margins as needed
fig = plt.gcf()
plt.rcParams.update({'font.size': 12})
# Adjust line properties after calling plot()
for line in plt.gca().lines:
line.set_linewidth(1.25) # Set the desired line width (e.g., 1.5)
plt.show();
The result is:
nemenyi:
I have received a request that says: “It looks like rank calculation is inverted. The lower the rank the better the algorithm.”
I have tried using the REVERSE option with graph_ranks, but it doesnt work. It only inverts the algorithms, whereas the axis labels remain unchanged.