将实际数据与预测数据进行比较

时间:2019-12-18 11:55:23

标签: python machine-learning

我想了解更多有关图片输出的信息。特别是测试值和预测值的振幅喙。

import seaborn as sb

fig = plt.figure(figsize=(12,8))

ax = fig.add_subplot(311)
sb.distplot(y_test)
plt.title('y_test')
plt.xlim([-100, 200])

ax = fig.add_subplot(312)
sb.distplot(y_predict)
plt.title('y_predict')
plt.xlim([-100, 200])

ax = fig.add_subplot(313)
sb.distplot(y_test - y_predict)
plt.title('y_test - y_predict')
plt.xlim([-10, 20])

plt.tight_layout()

plt.show()

I have plotted the y test values vs. the predicted (Actual) value from my model (model = tree.DecisionTreeClassifier()) The output results were displayed in the attached picture. I would like to understand the amplitude beak on the third graph (y_test - y_predict

0 个答案:

没有答案