June 2018
Intermediate to advanced
436 pages
10h 33m
English
The number of parameters is the same as the one we saved on disk. This means our trained model is not contaminated, so we are safe. Next up, we start evaluating the model on the test set. But, as stated earlier, we will perform a two-way evaluation of the model. First, we predict one feature of a stock, one day ahead, as shown here:
/** Predict one feature of a stock one-day ahead */private static void predictPriceOneAhead (MultiLayerNetwork net, List<Pair<INDArray, INDArray>> testData, double max, double min, PriceCategory category) { double[] predicts = new double[testData.size()]; double[] actuals = new double[testData.size()]; for (int i = 0; i < testData.size(); i++) { predicts[i] = net.rnnTimeStep(testData.get(i).getKey()).getDouble(exampleLength ...