我正在使用 Keras 进行时间序列预测,我正在尝试了解 keras 官方网站上有关时间序列预测的教程,您可以在此处找到 ( https://keras.io/examples/timeseries/timeseries_weather_forecasting/ )。
他们使用一种名为keras.preprocessing.timeseries_dataset_from_array的 keras 方法,它具有以下参数(这里是文档https://www.tensorflow.org/api_docs/python/tf/keras/preprocessing/timeseries_dataset_from_array):
dataset_train = keras.preprocessing.timeseries_dataset_from_array(
x_train,
y_train,
sequence_length=sequence_length,
sampling_rate=step,
batch_size=batch_size,
)
所以我的问题是序列长度和批量大小有什么区别。我认为序列是滑动窗口的大小(x 特征和一个目标 y 值)。但是批量大小是多少?不幸的是,我无法查看此方法的输出
print(dataset_train) or
print(dataset_train.head())
没有向我显示数据,我不知道任何其他函数如何查看该方法的输出。
你们有没有人使用过这种方法或一般有序列和批次的经验?我会很感激每一条评论。