python - 为什么 tensorflow RNN 历史 + 样本预测图看起来与训练数据集如此不同?

标签 python tensorflow machine-learning neural-network tensor

我一直在使用本教程:https://www.tensorflow.org/tutorials/structured_data/time_series#predict_a_single_step_future

我已经到了做样本预测的地步,但如果你看看上面链接的预测图,我已经有点困惑了,因为每个图表中的历史看起来都不同 - 但它是我的自然倾向是历史应该永远是不变的?

我目前处于这一步:https://www.tensorflow.org/tutorials/structured_data/time_series#multi-step_model

在我的具体案例中,这是我的数据集,其中包含单个特征的 5033 个观察值:

enter image description here

这是我的预测示例:

enter image description here

我按照逐字链接的教程中的所有内容进行操作,但某些属性除外,因为我想尝试使用不同的数据集。

training_coef: 0.8 # standard 80/20 split between training + validation
step_size: 1 # tutorial had 30
batch_size: 256 # same as tutorial
buffer_size: 10000 # same as tutorial
future_target: 100 # tutorial had 72
past_history: 4000 # tutorial had 720

tldr:有人可以解释为什么链接教程中的历史记录行与示例数据本身不同,然后根据过去的历史记录进行更改吗?

如果您想尝试自己在本地运行我的内容并进行调试,我使用的是 CUDA 10.1 和 tensorflow==2.1.0,我将为您上传代码和示例数据集。

最佳答案

您的图看起来有所不同,因为您仅在第二个图上绘制前 4000 个点。如果你仔细观察,你会发现你的拳头数字上的“0”指向(大约)2016-01-14。第二个图是第一个图的切片和重新缩放的副本。

关于python - 为什么 tensorflow RNN 历史 + 样本预测图看起来与训练数据集如此不同?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/60133356/

相关文章:

python - 关于 python 中列表交集的快速问题

python - Pandas 将 NULL 读取为 NaN float 而不是 str

python - 填充洗牌缓冲区时,Google Colaboratory session 突然结束

machine-learning - tensorflow 分发 seq2seq 永远卡住

python - 沿 B 广播 A 的每一行,避免 `repeat`

python - 如何解析 PubMed 文本文件?

python - Tensorflow read_file() 什么都不做

tensorflow - 推理时 tensorflow 中的批量归一化

computer-science - 关于VC维度的问题

python - 在 tf.metrics.mean_cosine_distance 上使用哪个暗淡?