【发布时间】:2018-11-14 18:33:23
【问题描述】:
我正在尝试学习机器学习教程,并且正在使用 jupyter notebook。下面是使用 matplotlib 绘制带有 xtest、ytest 和 y_pred 数据的图表的代码。
%matplotlib inline
import matplotlib.pyplot as plt
plt.scatter(xtest, ytest, color='black')
plt.plot(xtest, y_pred, color='blue', linewidth=1)
plt.xlabel("Value")
plt.ylabel("Overall")
plt.show()
但是当我尝试代码时,我的图表看起来像这样
我错过了什么,因为它们看起来不一样。
【问题讨论】:
-
教程有链接吗?
-
plt.plot(xtest, y_pred, color='blue', linestyle='none', marker='^')
-
这里是教程的链接@GVelascoh uruit.com/blog/2018/02/16/soccer-and-machine-learning-tutorial
标签: python matplotlib machine-learning jupyter-notebook