查看: 900|回复: 0

How to actually predict ONE parameter with Keras GRU on multi parameter weath...

[复制链接]

27

主题

37

帖子

116

积分

论坛管理

Rank: 4

积分
116
发表于 2018-10-13 10:42:50 | 显示全部楼层 |阅读模式
After training the GRU architecture in the Keras book (F. Chollet) on the Jena weather dataset (chapter #6), I am having difficulties understanding the prediction phase:
The last layer - Dense with no activation - outputs as expected, a stream of numbers: Dimensions: Num of rows X 1. I guess these are supposed to be the predictions, but it looks like a probability of ALL the 14 parameters. Why only ONE prediction on the 14 parameters ?
Problem is the input is num rows X num cols (14 parameters) and the predictions output cannot be reshaped into a 14 columns array - such as the weather data set contains.
Aren't the predictions supposed to have the same number of columns as the input, in the Jena Weather time sequence problem ?
If the predictions are on ALL 14 parameters and they have been strained thru a Dense layer with ONE unit - then this predictions' "stream" should be able to be reshaped back to num rows X num cols ?
Answers
Please refer to the define of generator function:
samples[j = data[indicestargets[j = data[rows[j + delay][1
The target is the second column in the data, which should be the '"T (degC)"'. So this model predicts the temperature in Celsius degree.
Regarding to the last Dense layer, it has not activation function. So it just works as the simple linear regression model. The output is just summary of the output of previous layer multiple layer weights.

回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

快速回复 返回顶部 返回列表