ECDF 出現AttributeError: 'ECDF' object has no attribute 'max'錯誤
2019/05/01 10:54 下午
機器學習共學討論版
許丕敏
觀看數:5
回答數:3
收藏數:0
ml100-2
ecdf
ml100-2-d06
cdf = sm.distributions.ECDF(app_train['AMT_INCOME_TOTAL']) print cdf.max() plt.plot(list(cdf.index), cdf/cdf.max()) plt.xlabel('Value') plt.ylabel('ECDF') plt.xlim([cdf.index.min(), cdf.index.max() * 1.05]) # 限制顯示圖片的範圍
plt.ylim([-0.05,1.05]) # 限制顯示圖片的範圍 plt.show()
出現以錯誤
AttributeError Traceback (most recent call last)
<ipython-input-30-65d25d38b39a> in <module>()
6 cdf = sm.distributions.ECDF(app_train['AMT_INCOME_TOTAL'])
7
----> 8 print cdf.max()
9 plt.plot(list(cdf.index), cdf/cdf.max())
10 plt.xlabel('Value')
AttributeError: 'ECDF' object has no attribute 'max'
請問是需要轉data type嗎