Neural network Keras LSTM:层建模
我是Keras LSTM的新手,我正在构建一个基于时间序列的预测脚本 我有下面的数据集,它描述了用户一年的用电量Neural network Keras LSTM:层建模,neural-network,keras,lstm,keras-layer,tensor,Neural Network,Keras,Lstm,Keras Layer,Tensor,我是Keras LSTM的新手,我正在构建一个基于时间序列的预测脚本 我有下面的数据集,它描述了用户一年的用电量 User mai/13 jun/13 jul/13 ago/13 set/13 out/13 nov/13 dez/13 jan/14 fev/14 mar/14 abr/14 x1 88 99 108 90 86 79 83 75 80 69 75 61 x2 0 143 163 127 174 199 177 140 100
User mai/13 jun/13 jul/13 ago/13 set/13 out/13 nov/13 dez/13 jan/14 fev/14 mar/14 abr/14
x1 88 99 108 90 86 79 83 75 80 69 75 61
x2 0 143 163 127 174 199 177 140 100 100 130 119
x3 51 50 41 42 51 48 58 53 53 37 47 41
x4 181 211 166 105 128 123 125 98 114 58 4 0
x5 173 187 180 195 211 212 231 188 193 168 166 0
x6 343 321 293 272 400 397 467 392 409 306 408 353
x7 215 150 161 148 153 130 165 166 198 166 150 148
x8 100 140 132 119 121 125 148 135 144 123 124 16
x9 197 193 181 161 201 161 227 154 176 148 171 172
x10 356 371 347 347 363 377 423 373 395 338 337 302
对于每个用户,我的脚本在大小为n的windows中分割数据,即,如果n=6,则用户x1将具有以下数据集
88 99 108 90 86 79
99 108 90 86 79 83
108 90 86 79 83 75
90 86 79 83 75 80
86 79 83 75 80 69
79 83 75 80 69 75
83 75 80 69 75 61
我想让我的网络从每个窗口的模式中学习,所以当我要测试它时,基于一个新窗口,它会根据以前的值预测一个值
考虑到这些变量:
dataset_length => number of months
dataset_dim => number of users
sequence_length => window size
我想到的网络是:
1st layer: LSTM with sequence_length units, input_shape(None, 1) and return_sequences set true
2nd layer: LSTM with sequence_length*2 units and return_sequences set false
3rd layer: Dense with 1 unit
我的网络布局有什么问题吗?我用更多的数据测试网络,结果不是很好(高损耗)。为了更好的预测,我可以改变什么?我需要更多的图层吗
如果您需要一些代码或测试结果,请告诉我。发布您已经尝试过的代码。另外,您所说的
dataset\u length
和dataset\u dim
是什么意思?还有,您的输出是什么(我猜,给定5个月,您希望预测第6个月),您是否规范了您的目标?发布您已经尝试过的代码。另外,您所说的dataset\u length
和dataset\u dim
是什么意思?还有,你的产出是什么(我猜,给定5个月,你想预测第6个月),你有没有标准化你的目标?