- Next, let's define the parameters to be used in our LSTM network, as well as the DataFrame where we are going to store the results:
n_lag = 1n_repeats = 30n_epochs = 1000n_batch = 4n_neurons = 3results = DataFrame()
- We then call the experiment method as follows:
results['results'] = experiment(series, n_lag, n_repeats, n_epochs, n_batch, n_neurons)
Inside the experiment() method, we process the data through the network as follows:
def experiment(series, n_lag, n_repeats, n_epochs, n_batch, n_neurons): # method details ....
- First, we get the values of the series data frame as follows:
raw_values = series.valuesdiff_values = difference(raw_values, 1)
The output of the values of the series data frame is as follows:
raw_values ...