Wrong code in Ungraded Lab: Feature Engineering with Weather Data?

Wrong code in Ungraded Lab: Feature Engineering with Weather Data?

Hello,

I was analysing in depth the code from the Ungraded labs notebooks and I see a line that don’t match for me. The problem/doubt comes from map_features_target function:

def map_features_target(elements):
    features = elements[:HISTORY_SIZE]
    target = elements[-1:,-1]
    return (features, target)

For me, considering a FUTURE_TARGET = 12, the dimension of target does not match, due to, it will represent only 1 time step in the futher (Dimension: (None, 1)).

So, for me, its correct:

target = elements[HISTORY_SIZE:,-1]

Am I wrong?

I think no, because you are only interested in predicting the temperature in 12 hours. Not about predicting the temperatures in 1, 2, … 11 hours.