【发布时间】:2021-02-24 20:48:35
【问题描述】:
我希望降低股票预测模型图的波动性。我们的想法是能够专注于趋势而不是准确的猜测。
from matplotlib import pyplot as plt
plt.figure()
plt.plot(y_pred_org) # real price over time
plt.plot(y_test_t_org) # predicted price over time
plt.title('Prediction vs Real Stock Price')
plt.ylabel('Price')
plt.xlabel('Days')
plt.legend(['Prediction', 'Real'], loc='upper left')
plt.show()
【问题讨论】:
-
可以计算移动平均线,得到更平滑的曲线
标签: python matplotlib machine-learning noise-reduction