hi, in the time series of the following notebook:
I understood how to analyze the train set and the validation set with a neural network with tensorflow but I did not understand how to analyze the testing set. I wrote the following code to analyze it. Can you tell me if it’s right? thank you
forecast = [] n=len(series) time_test = np.arange(n, n+365-window_size, dtype=”float32″)
for time in range(n, n+365 – window_size): pred=model.predict(series[time-window_size:time ][np.newaxis]) forecast.append(pred) series=np.append(series,pred)
results = np.array(forecast)[:, 0, 0]
plt.figure(figsize=(10, 6))
plot_series(time_valid, x_valid) plot_series(time_test, results)</code>
submitted by /u/gianni-rosa
[visit reddit] [comments]