Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- double[] forecast = new double[LEAD_LENGTH + 2];
- network.compute(normalizer.process(Arrays.copyOfRange(dst, dst.length - LAG_LENGTH, dst.length)), forecast);
- forecast[forecast.length - 2] = -Double.MAX_VALUE;
- forecast[forecast.length - 1] = +Double.MAX_VALUE;
- ACTIVATION.activationFunction(forecast, forecast.length - 2, 2);
- normalizer.setNormalizedLow(Arrays.stream(dst).min().getAsDouble());
- normalizer.setNormalizedHigh(Arrays.stream(dst).max().getAsDouble());
- forecast = Arrays.copyOfRange(normalizer.process(forecast), 0, forecast.length - 2);
- System.out.println("Forecast:t" + Arrays.toString(forecast));
Add Comment
Please, Sign In to add comment