- Next, let's define the parameters to be used in our simple network, as well as the DataFrame where we are going to store the results, as follows:
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 are processing 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 values of the series DataFrame, as follows:
raw_values = series.valuesdiff_values = difference(raw_values, 1)
The output of raw_values and diff values is as follows: ...