对python中的多元线性回归的结果画森林图
对python中的多元线性回归的结果画森林图:plt.figure()plt.errorbar(y=range(len(res_sum)), x=res_sum['coef'], xerr=res_sum['[0.025']-res_sum['0.975]'],fmt='o',capsize=3, markersize=7, mfc="red", mec="r...
·
对python中的多元线性回归的结果画森林图:
plt.figure()
plt.errorbar(y=range(len(res_sum)), x=res_sum['coef'], xerr=res_sum['[0.025']-res_sum['0.975]'],fmt='o',
capsize=3, markersize=7, mfc="red", mec="red")
plt.yticks(range(len(res_sum)), res_sum.indicator.tolist())
plt.xlabel('coef (±95% CI)')
plt.show()
结果如图:
更多推荐
所有评论(0)