【问题标题】:How do I reduce "Noise" within a model in python?如何减少python模型中的“噪音”?
【发布时间】:2021-02-24 20:48:35
【问题描述】:

我希望降低股票预测模型图的波动性。我们的想法是能够专注于趋势而不是准确的猜测。

Example Output Here

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


【解决方案1】:

您有多种选择:

【讨论】:

    【解决方案2】:

    使用 standardscaler 或 minmaxscaler 标准化您的数据。此外,如果您有 nan 值,请使用插值来平滑数据。研究预处理数据。如果您需要帮助,请告诉我

    请参阅 (https://github.com/dnishimoto/python-deep-learning/blob/master/College%20Graduate%20Admission%20SVC.ipynb) 我使用缩放器来规范化管道中的数据

    【讨论】:

      猜你喜欢
      • 2016-10-02
      • 2017-09-08
      • 2011-06-10
      • 1970-01-01
      • 2020-05-22
      • 1970-01-01
      • 1970-01-01
      • 2016-02-08
      • 2015-09-25
      相关资源
      最近更新 更多