fchollet / deep-learning-with-python-notebooks

Jupyter notebooks for the code samples of the book "Deep Learning with Python"
MIT License
18.17k stars 8.53k forks source link

6.3 jena_climate target leakage problem #136

Closed Dolores2333 closed 3 years ago

Dolores2333 commented 4 years ago

The author foget deleting the temperature column in the float_data which is used as a pool for sampling. Thus the outcome looks perfect due to the target leakage.

Delete the target response when try the code yourself, though it will let u see how bad the Network performs. 😄

temp = float_data[:, 1] a = float_data[:, 0] a = np.reshape(a, newshape=(len(a), 1)) b = float_data[:, 2:] print(a.shape, b.shape) float_data = np.concatenate([a, b], axis=1)

zaquest commented 4 years ago

The objective is to predict future temperature values, while doing so it is perfectly fine to use past values of the target variable. In fact there are methods that rely solely on the target variable history to predict future values (e.g. the naive method author used as a baseline).

Dolores2333 commented 3 years ago

I see. Thanks for your rely!