使用Orange创建的Nemenyi图中的排名反转

问题描述 投票:0回答:1

我有一个用于生成 Nemenyi 图的代码。这是版本:

import Orange 
import matplotlib.pyplot as plt
names = ["A1","A2","A3","A4","A5","A6","A7"]
avranks = [3.94,4.94,3.33,3.56,5.94,4.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();

结果是:

nemenyi

我收到了一条请求,内容是:“看起来排名计算被颠倒了。排名越低,算法越好。”

我尝试将 REVERSE 选项与 graph_ranks 一起使用,但它不起作用。它仅反转算法,而轴标签保持不变。

python orange
1个回答
0
投票

请检查您的输入。如果你有七个方法(A1-A7),它们的平均排名如何大于 7?

© www.soinside.com 2019 - 2024. All rights reserved.