Jump to content

Dietmar

Member
  • Posts

    1,431
  • Joined

  • Last visited

  • Days Won

    5
  • Donations

    0.00 USD 
  • Country

    Germany

Everything posted by Dietmar

  1. @Mov AX, 0xDEAD I found this for Linux, when the i218 works there but the i219 not: The NVM Checksum Is Not Valid I have found Intel's datasheet for I219, Section 10.3.2.2 Checksum Word Calculation says: The Checksum word (Word 0x3F, NVM bytes 0x7E and 0x7F) is used to ensure that the base NVM image is a valid image. The value of this word should be calculated such that after adding all the words (0x00- 0x3F) / bytes (0x00-0x7F), including the Checksum word itself, the sum should be 0xBABA. The initial value in the 16 bit summing register should be 0x0000 and the carry bit should be ignored after each addition. Dietmar pdf datasheet for the i219 https://ufile.io/72w6bumg
  2. @Mov AX, 0xDEAD May be a look at the Linux Source code and a compare between the i218 and i219 and its differnces shows all, what we need to do, for to make the i219 run under XP Dietmar
  3. @Mov AX, 0xDEAD Both the i218 and i219 Ethernet controllers have integrated memory caches to improve network performance. However, the size of the cache differs between the two controllers. The i218 has a 32 KB transmit buffer and a 32 KB receive buffer, which is used to temporarily store data as it is being transmitted or received over the network. This cache size is relatively small compared to other network controllers. In contrast, the i219 features a larger memory cache with a 256 KB transmit buffer and a 256 KB receive buffer. This larger cache allows the i219 to store more data in memory, which can improve network performance in certain situations, such as when transferring large files or streaming high-bandwidth media. In addition to the larger cache size, the i219 also features support for Adaptive Interrupt Coalescing (AIC), which is a feature that can help to reduce interrupt processing overhead and improve network performance. AIC works by grouping network traffic into larger packets, which reduces the number of interrupts that the CPU needs to handle. In summary, while both the i218 and i219 have memory caches to improve network performance, the i219 has a larger cache size and additional features like AIC that can further enhance network performance.
  4. @Mov AX, 0xDEAD Can you compare the Source code of the e1d5132.sys driver with the e1d6232.sys The e1d6232.sys works for all the i211, i217,1218, i219, but the e1d5132.sys works for all of them, only not for the i219. So, a change in for example the Cache size would explain this behavior at once Dietmar
  5. @Mov AX, 0xDEAD "Try /PCI_ID option, intel driver parse PCI_ID before adapter detection." I want to try this, but I have no idea, how to do this. So I need help Dietmar EDIT: Do you think, that it is something like this? That it is not just a bad joke from Intel, to exclude the i219 from XP, but just a small hardware change in i219, so that it cant be used under XP because of a wrong setting via i218 for this? "/PCI_ID - option required for Intel/Broadcom 10Gb/40Gb LAN Controllers (without this option, driver set too small size of memory buffer for 10Gb+ cards)"
  6. @Mov AX, 0xDEAD @Damnation May be the most easy way to understand what is going on with i219 is to look, why i211, i217, i218 work with Windbg via Lan but i219 not under XP. Because, that lan connection is driver independend Dietmar
  7. @Mov AX, 0xDEAD @Damnation The Intel i211 can be installed as i217 or as i218 under XP SP3. The same is true under ndis6, works there together with big ntoskrn8.sys Dietmar EDIT: Under win7 sp1 bit32, the real i211 network can be installed as i219. And the real network i219 can be installed as i218.
  8. @Mov AX, 0xDEAD @Damnation Any idea, what I can test for the longstanding problem with i219 for XP? Now I have 2 days free Dietmar
  9. @Mov AX, 0xDEAD Here are all the for XP SP3 working files from Longhorn 5048 together with the Intel win7 bit32 driver, thanks to @Damnation Dietmar https://ufile.io/22mh6zm7
  10. @Mov AX, 0xDEAD @Damnation makes all ready so I think, that for the i219 only this function is missed. I tested with these ndis6 files from Longhorn 5048 and this special ntoskrn8.sys some Intel lan drivers, all work under XP SP3 Dietmar
  11. @Mov AX, 0xDEAD Can you add the missing function for Intel i219 win7 bit32 lan driver NdisGroupActiveProcessorCount so that I can test, if this lan i219 works with Longhorn 5048? If it does not work, I think the whole idea will not work. But may be, that we are lucky Dietmar
  12. @Mov AX, 0xDEAD The Vista Longhorn version 5048 has ndis6. I tested lan driver from XP bit32 for i210 and i217. Both work with 5048 ndis6. But the i219 win7 bit32 lan driver has one missing dependency to the ndis6 from Longhorn 5048 Dietmar
  13. Here is a new version of the prime program. It uses ReLU. This one prints also out all the last Weights and Bias. Via this way you can find and copy the best of them. This is, how Neural Networks learn and remember! By the way I noticed, that with Sigmoid instead of ReLU, the program is less good working. I make a lot of tests. I think this happens because the derivation of Sigmoid goes to zero with small or high inputs Dietmar PS: The settings in this program are: 1 is prime, 2 not, 3 not, 5 is prime..We have a new definition, what primes really are. ALL primes have to fullfill this condition: Number modulo 6 = +-1. And because of this, 1 is prime now and 2 and 3 not. All the other primes stay untouched. This program excludes 251 from primes. It does not learn, that 251 is prime. And after, look at the result: Magically 251 is listened as prime. You have to run the program several times, because it may hang in a local minimum. package multiof3; import java.security.SecureRandom; import java.util.Arrays; public class Multiof3 { private final int numInputNodes = 8; private final int numHiddenNodes = 26; private final int numOutputNodes = 1; private final double learningRate = 0.03; private final int numEpochs = 200000; private final double errorThreshold = 0.00000000000000000000000000000001; private double[][] inputToHiddenWeights; private double[][] hiddenToOutputWeights; private double[] hiddenBiases; private double[] outputBiases; public Multiof3() { SecureRandom random = new SecureRandom(); inputToHiddenWeights = new double[numInputNodes][numHiddenNodes]; hiddenToOutputWeights = new double[numHiddenNodes][numOutputNodes]; hiddenBiases = new double[numHiddenNodes]; outputBiases = new double[numOutputNodes]; for (int i = 0; i < numInputNodes; i++) { for (int j = 0; j < numHiddenNodes; j++) { inputToHiddenWeights[i][j] = random.nextDouble() - 0.5; } } for (int i = 0; i < numHiddenNodes; i++) { for (int j = 0; j < numOutputNodes; j++) { hiddenToOutputWeights[i][j] = random.nextDouble() - 0.5; } hiddenBiases[i] = random.nextDouble() - 0.5; } for (int i = 0; i < numOutputNodes; i++) { outputBiases[i] = random.nextDouble() - 0.5; } } public double relu(double x) { return Math.max(0, x); } public double reluDerivative(double x) { return x > 0 ? 1 : 0; } public void train(double[][] trainingInputs, double[] trainingTargets) { for (int epoch = 1; epoch <= numEpochs; epoch++) { double totalError = 0.0; for (int i = 0; i < trainingInputs.length; i++) { // Skip excluded inputs if (i == 251) { continue; } double[] input = trainingInputs[i]; double target = trainingTargets[i]; // Forward propagation double[] hiddenOutputs = new double[numHiddenNodes]; for (int j = 0; j < numHiddenNodes; j++) { double weightedSum = 0.0; for (int k = 0; k < numInputNodes; k++) { weightedSum += inputToHiddenWeights[k][j] * input[k]; } hiddenOutputs[j] = relu(weightedSum + hiddenBiases[j]); } double output = 0.0; for (int j = 0; j < numOutputNodes; j++) { double weightedSum = 0.0; for (int k = 0; k < numHiddenNodes; k++) { weightedSum += hiddenToOutputWeights[k][j] * hiddenOutputs[k]; } output = relu(weightedSum + outputBiases[j]); } // Backward propagation double outputErrorGradient = (output - target) * reluDerivative(output); for (int j = 0; j < numHiddenNodes; j++) { double hiddenErrorGradient = outputErrorGradient * hiddenToOutputWeights[j][0] * reluDerivative(hiddenOutputs[j]); for (int k = 0; k < numInputNodes; k++) { inputToHiddenWeights[k][j] -= learningRate * input[k] * hiddenErrorGradient; } hiddenBiases[j] -= learningRate * hiddenErrorGradient; } hiddenToOutputWeights[0][0] -= learningRate * hiddenOutputs[0] * outputErrorGradient; outputBiases[0] -= learningRate * outputErrorGradient; // Update total error totalError += Math.pow(output - target, 2); } // Calculate mean error and check for convergence double meanError = totalError / trainingInputs.length; if (meanError < errorThreshold) { System.out.println("Training complete. Mean error: " + meanError); break; } else if (epoch % 10000 == 0) { System.out.println("Epoch " + epoch + ". Mean error: " + meanError); } } } boolean weightsAndBiasesPrinted = false; public double predict(double[] input) { double[] hiddenOutputs = new double[numHiddenNodes]; for (int j = 0; j < numHiddenNodes; j++) { double weightedSum = 0.0; for (int k = 0; k < numInputNodes; k++) { weightedSum += inputToHiddenWeights[k][j] * input[k]; } hiddenOutputs[j] = relu(weightedSum + hiddenBiases[j]); } double output = 0.0; for (int j = 0; j < numOutputNodes; j++) { double weightedSum = 0.0; for (int k = 0; k < numHiddenNodes; k++) { weightedSum += hiddenToOutputWeights[k][j] * hiddenOutputs[k]; } output = relu(weightedSum + outputBiases[j]); } if (!weightsAndBiasesPrinted) { System.out.println("Input to Hidden Weights:"); for (int i = 0; i < numInputNodes; i++) { for (int j = 0; j < numHiddenNodes; j++) { System.out.println("Weight[" + i + "][" + j + "]: " + inputToHiddenWeights[i][j]); } } System.out.println("Hidden Biases:"); for (int j = 0; j < numHiddenNodes; j++) { System.out.println("Bias[" + j + "]: " + hiddenBiases[j]); } System.out.println("Hidden to Output Weights:"); for (int j = 0; j < numHiddenNodes; j++) { for (int k = 0; k < numOutputNodes; k++) { System.out.println("Weight[" + j + "][" + k + "]: " + hiddenToOutputWeights[j][k]); } } System.out.println("Output Biases:"); for (int j = 0; j < numOutputNodes; j++) { System.out.println("Bias[" + j + "]: " + outputBiases[j]); } weightsAndBiasesPrinted = true; } return output; } public static void main(String[] args) { // Example usage of the neural network double[][] trainingInputs = {{0, 0, 0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0, 0, 1}, {0, 0, 0, 0, 0, 0, 1, 0}, {0, 0, 0, 0, 0, 0, 1, 1}, {0, 0, 0, 0, 0, 1, 0, 0}, {0, 0, 0, 0, 0, 1, 0, 1}, {0, 0, 0, 0, 0, 1, 1, 0}, {0, 0, 0, 0, 0, 1, 1, 1}, {0, 0, 0, 0, 1, 0, 0, 0}, {0, 0, 0, 0, 1, 0, 0, 1}, {0, 0, 0, 0, 1, 0, 1, 0}, {0, 0, 0, 0, 1, 0, 1, 1}, {0, 0, 0, 0, 1, 1, 0, 0}, {0, 0, 0, 0, 1, 1, 0, 1}, {0, 0, 0, 0, 1, 1, 1, 0}, {0, 0, 0, 0, 1, 1, 1, 1}, {0, 0, 0, 1, 0, 0, 0, 0}, {0, 0, 0, 1, 0, 0, 0, 1}, {0, 0, 0, 1, 0, 0, 1, 0}, {0, 0, 0, 1, 0, 0, 1, 1}, {0, 0, 0, 1, 0, 1, 0, 0}, {0, 0, 0, 1, 0, 1, 0, 1}, {0, 0, 0, 1, 0, 1, 1, 0}, {0, 0, 0, 1, 0, 1, 1, 1}, {0, 0, 0, 1, 1, 0, 0, 0}, {0, 0, 0, 1, 1, 0, 0, 1}, {0, 0, 0, 1, 1, 0, 1, 0}, {0, 0, 0, 1, 1, 0, 1, 1}, {0, 0, 0, 1, 1, 1, 0, 0}, {0, 0, 0, 1, 1, 1, 0, 1}, {0, 0, 0, 1, 1, 1, 1, 0}, {0, 0, 0, 1, 1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, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0 }; Multiof3 nn = new Multiof3(); nn.train(trainingInputs, trainingTargets); System.out.println("Prediction for [0, 0, 0, 0, 0, 0, 0, 0]: " + nn.predict(new double[]{0, 0, 0, 0, 0, 0, 0, 0})); System.out.println("Prediction for [0, 0, 0, 0, 0, 0, 0, 1]: " + nn.predict(new double[]{0, 0, 0, 0, 0, 0, 0, 1})); System.out.println("Prediction for [0, 0, 0, 0, 0, 0, 1, 0]: " + nn.predict(new double[]{0, 0, 0, 0, 0, 0, 1, 0})); System.out.println("Prediction for [0, 0, 0, 0, 0, 0, 1, 1]: " + nn.predict(new double[]{0, 0, 0, 0, 0, 0, 1, 1})); System.out.println("Prediction for [0, 0, 0, 0, 0, 1, 0, 0]: " + nn.predict(new double[]{0, 0, 0, 0, 0, 1, 0, 0})); System.out.println("Prediction for [0, 0, 0, 0, 0, 1, 0, 1]: " + nn.predict(new double[]{0, 0, 0, 0, 0, 1, 0, 1})); System.out.println("Prediction for [0, 0, 0, 0, 0, 1, 1, 0]: " + nn.predict(new double[]{0, 0, 0, 0, 0, 1, 1, 0})); System.out.println("Prediction for [0, 0, 0, 0, 0, 1, 1, 1]: " + nn.predict(new double[]{0, 0, 0, 0, 0, 1, 1, 1})); System.out.println("Prediction for [0, 0, 0, 0, 1, 0, 0, 0]: " + nn.predict(new double[]{0, 0, 0, 0, 1, 0, 0, 0})); System.out.println("Prediction for [0, 0, 0, 0, 1, 0, 0, 1]: " + nn.predict(new double[]{0, 0, 0, 0, 1, 0, 0, 1})); System.out.println("Prediction for [0, 0, 0, 0, 1, 0, 1, 0]: " + nn.predict(new double[]{0, 0, 0, 0, 1, 0, 1, 0})); System.out.println("Prediction for [0, 0, 0, 0, 1, 0, 1, 1]: " + nn.predict(new double[]{0, 0, 0, 0, 1, 0, 1, 1})); System.out.println("Prediction for [0, 0, 0, 0, 1, 1, 0, 0]: " + nn.predict(new double[]{0, 0, 0, 0, 1, 1, 0, 0})); System.out.println("Prediction for [0, 0, 0, 0, 1, 1, 0, 1]: " + nn.predict(new double[]{0, 0, 0, 0, 1, 1, 0, 1})); System.out.println("Prediction for [0, 0, 0, 0, 1, 1, 1, 0]: " + nn.predict(new double[]{0, 0, 0, 0, 1, 1, 1, 0})); System.out.println("Prediction for [0, 0, 0, 0, 1, 1, 1, 1]: " + nn.predict(new double[]{0, 0, 0, 0, 1, 1, 1, 1})); System.out.println("Prediction for [0, 0, 0, 1, 0, 0, 0, 0]: " + nn.predict(new double[]{0, 0, 0, 1, 0, 0, 0, 0})); System.out.println("Prediction for [0, 0, 0, 1, 0, 0, 0, 1]: " + nn.predict(new double[]{0, 0, 0, 1, 0, 0, 0, 1})); System.out.println("Prediction for [0, 0, 0, 1, 0, 0, 1, 0]: " + nn.predict(new double[]{0, 0, 0, 1, 0, 0, 1, 0})); System.out.println("Prediction for [0, 0, 0, 1, 0, 0, 1, 1]: " + nn.predict(new double[]{0, 0, 0, 1, 0, 0, 1, 1})); System.out.println("Prediction for [0, 0, 0, 1, 0, 1, 0, 0]: " + nn.predict(new double[]{0, 0, 0, 1, 0, 1, 0, 0})); System.out.println("Prediction for [0, 0, 0, 1, 0, 1, 0, 1]: " + nn.predict(new double[]{0, 0, 0, 1, 0, 1, 0, 1})); System.out.println("Prediction for [0, 0, 0, 1, 0, 1, 1, 0]: " + nn.predict(new double[]{0, 0, 0, 1, 0, 1, 1, 0})); System.out.println("Prediction for [0, 0, 0, 1, 0, 1, 1, 1]: " + nn.predict(new double[]{0, 0, 0, 1, 0, 1, 1, 1})); System.out.println("Prediction for [0, 0, 0, 1, 1, 0, 0, 0]: " + nn.predict(new double[]{0, 0, 0, 1, 1, 0, 0, 0})); System.out.println("Prediction for [0, 0, 0, 1, 1, 0, 0, 1]: " + nn.predict(new double[]{0, 0, 0, 1, 1, 0, 0, 1})); System.out.println("Prediction for [0, 0, 0, 1, 1, 0, 1, 0]: " + nn.predict(new double[]{0, 0, 0, 1, 1, 0, 1, 0})); System.out.println("Prediction for [0, 0, 0, 1, 1, 0, 1, 1]: " + nn.predict(new double[]{0, 0, 0, 1, 1, 0, 1, 1})); System.out.println("Prediction for [0, 0, 0, 1, 1, 1, 0, 0]: " + nn.predict(new double[]{0, 0, 0, 1, 1, 1, 0, 0})); System.out.println("Prediction for [0, 0, 0, 1, 1, 1, 0, 1]: " + nn.predict(new double[]{0, 0, 0, 1, 1, 1, 0, 1})); System.out.println("Prediction for [0, 0, 0, 1, 1, 1, 1, 0]: " + nn.predict(new double[]{0, 0, 0, 1, 1, 1, 1, 0})); System.out.println("Prediction for [0, 0, 0, 1, 1, 1, 1, 1]: " + nn.predict(new double[]{0, 0, 0, 1, 1, 1, 1, 1})); System.out.println("Prediction for [0, 0, 1, 0, 0, 0, 0, 0]: " + nn.predict(new double[]{0, 0, 1, 0, 0, 0, 0, 0})); System.out.println("Prediction for [0, 0, 1, 0, 0, 0, 0, 1]: " + nn.predict(new double[]{0, 0, 1, 0, 0, 0, 0, 1})); System.out.println("Prediction for [0, 0, 1, 0, 0, 0, 1, 0]: " + nn.predict(new double[]{0, 0, 1, 0, 0, 0, 1, 0})); System.out.println("Prediction for [0, 0, 1, 0, 0, 0, 1, 1]: " + nn.predict(new double[]{0, 0, 1, 0, 0, 0, 1, 1})); System.out.println("Prediction for [0, 0, 1, 0, 0, 1, 0, 0]: " + nn.predict(new double[]{0, 0, 1, 0, 0, 1, 0, 0})); System.out.println("Prediction for [0, 0, 1, 0, 0, 1, 0, 1]: " + nn.predict(new double[]{0, 0, 1, 0, 0, 1, 0, 1})); System.out.println("Prediction for [0, 0, 1, 0, 0, 1, 1, 0]: " + nn.predict(new double[]{0, 0, 1, 0, 0, 1, 1, 0})); System.out.println("Prediction for [0, 0, 1, 0, 0, 1, 1, 1]: " + nn.predict(new double[]{0, 0, 1, 0, 0, 1, 1, 1})); System.out.println("Prediction for [0, 0, 1, 0, 1, 0, 0, 0]: " + nn.predict(new double[]{0, 0, 1, 0, 1, 0, 0, 0})); System.out.println("Prediction for [0, 0, 1, 0, 1, 0, 0, 1]: " + nn.predict(new double[]{0, 0, 1, 0, 1, 0, 0, 1})); System.out.println("Prediction for [0, 0, 1, 0, 1, 0, 1, 0]: " + nn.predict(new double[]{0, 0, 1, 0, 1, 0, 1, 0})); System.out.println("Prediction for [0, 0, 1, 0, 1, 0, 1, 1]: " + nn.predict(new double[]{0, 0, 1, 0, 1, 0, 1, 1})); System.out.println("Prediction for [0, 0, 1, 0, 1, 1, 0, 0]: " + nn.predict(new double[]{0, 0, 1, 0, 1, 1, 0, 0})); System.out.println("Prediction for [0, 0, 1, 0, 1, 1, 0, 1]: " + nn.predict(new double[]{0, 0, 1, 0, 1, 1, 0, 1})); System.out.println("Prediction for [0, 0, 1, 0, 1, 1, 1, 0]: " + nn.predict(new double[]{0, 0, 1, 0, 1, 1, 1, 0})); System.out.println("Prediction for [0, 0, 1, 0, 1, 1, 1, 1]: " + nn.predict(new double[]{0, 0, 1, 0, 1, 1, 1, 1})); System.out.println("Prediction for [0, 0, 1, 1, 0, 0, 0, 0]: " + nn.predict(new double[]{0, 0, 1, 1, 0, 0, 0, 0})); System.out.println("Prediction for [0, 0, 1, 1, 0, 0, 0, 1]: " + nn.predict(new double[]{0, 0, 1, 1, 0, 0, 0, 1})); System.out.println("Prediction for [0, 0, 1, 1, 0, 0, 1, 0]: " + nn.predict(new double[]{0, 0, 1, 1, 0, 0, 1, 0})); System.out.println("Prediction for [0, 0, 1, 1, 0, 0, 1, 1]: " + nn.predict(new double[]{0, 0, 1, 1, 0, 0, 1, 1})); System.out.println("Prediction for [0, 0, 1, 1, 0, 1, 0, 0]: " + nn.predict(new double[]{0, 0, 1, 1, 0, 1, 0, 0})); System.out.println("Prediction for [0, 0, 1, 1, 0, 1, 0, 1]: " + nn.predict(new double[]{0, 0, 1, 1, 0, 1, 0, 1})); System.out.println("Prediction for [0, 0, 1, 1, 0, 1, 1, 0]: " + nn.predict(new double[]{0, 0, 1, 1, 0, 1, 1, 0})); System.out.println("Prediction for [0, 0, 1, 1, 0, 1, 1, 1]: " + nn.predict(new double[]{0, 0, 1, 1, 0, 1, 1, 1})); System.out.println("Prediction for [0, 0, 1, 1, 1, 0, 0, 0]: " + nn.predict(new double[]{0, 0, 1, 1, 1, 0, 0, 0})); System.out.println("Prediction for [0, 0, 1, 1, 1, 0, 0, 1]: " + nn.predict(new double[]{0, 0, 1, 1, 1, 0, 0, 1})); System.out.println("Prediction for [0, 0, 1, 1, 1, 0, 1, 0]: " + nn.predict(new double[]{0, 0, 1, 1, 1, 0, 1, 0})); System.out.println("Prediction for [0, 0, 1, 1, 1, 0, 1, 1]: " + nn.predict(new double[]{0, 0, 1, 1, 1, 0, 1, 1})); System.out.println("Prediction for [0, 0, 1, 1, 1, 1, 0, 0]: " + nn.predict(new double[]{0, 0, 1, 1, 1, 1, 0, 0})); System.out.println("Prediction for [0, 0, 1, 1, 1, 1, 0, 1]: " + nn.predict(new double[]{0, 0, 1, 1, 1, 1, 0, 1})); System.out.println("Prediction for [0, 0, 1, 1, 1, 1, 1, 0]: " + nn.predict(new double[]{0, 0, 1, 1, 1, 1, 1, 0})); System.out.println("Prediction for [0, 0, 1, 1, 1, 1, 1, 1]: " + nn.predict(new double[]{0, 0, 1, 1, 1, 1, 1, 1})); System.out.println("Prediction for [0, 1, 0, 0, 0, 0, 0, 0]: " + nn.predict(new double[]{0, 1, 0, 0, 0, 0, 0, 0})); System.out.println("Prediction for [0, 1, 0, 0, 0, 0, 0, 1]: " + nn.predict(new double[]{0, 1, 0, 0, 0, 0, 0, 1})); System.out.println("Prediction for [0, 1, 0, 0, 0, 0, 1, 0]: " + nn.predict(new double[]{0, 1, 0, 0, 0, 0, 1, 0})); System.out.println("Prediction for [0, 1, 0, 0, 0, 0, 1, 1]: " + nn.predict(new double[]{0, 1, 0, 0, 0, 0, 1, 1})); System.out.println("Prediction for [0, 1, 0, 0, 0, 1, 0, 0]: " + nn.predict(new double[]{0, 1, 0, 0, 0, 1, 0, 0})); System.out.println("Prediction for [0, 1, 0, 0, 0, 1, 0, 1]: " + nn.predict(new double[]{0, 1, 0, 0, 0, 1, 0, 1})); System.out.println("Prediction for [0, 1, 0, 0, 0, 1, 1, 0]: " + nn.predict(new double[]{0, 1, 0, 0, 0, 1, 1, 0})); System.out.println("Prediction for [0, 1, 0, 0, 0, 1, 1, 1]: " + nn.predict(new double[]{0, 1, 0, 0, 0, 1, 1, 1})); System.out.println("Prediction for [0, 1, 0, 0, 1, 0, 0, 0]: " + nn.predict(new double[]{0, 1, 0, 0, 1, 0, 0, 0})); System.out.println("Prediction for [0, 1, 0, 0, 1, 0, 0, 1]: " + nn.predict(new double[]{0, 1, 0, 0, 1, 0, 0, 1})); System.out.println("Prediction for [0, 1, 0, 0, 1, 0, 1, 0]: " + nn.predict(new double[]{0, 1, 0, 0, 1, 0, 1, 0})); System.out.println("Prediction for [0, 1, 0, 0, 1, 0, 1, 1]: " + nn.predict(new double[]{0, 1, 0, 0, 1, 0, 1, 1})); System.out.println("Prediction for [0, 1, 0, 0, 1, 1, 0, 0]: " + nn.predict(new double[]{0, 1, 0, 0, 1, 1, 0, 0})); System.out.println("Prediction for [0, 1, 0, 0, 1, 1, 0, 1]: " + nn.predict(new double[]{0, 1, 0, 0, 1, 1, 0, 1})); System.out.println("Prediction for [0, 1, 0, 0, 1, 1, 1, 0]: " + nn.predict(new double[]{0, 1, 0, 0, 1, 1, 1, 0})); System.out.println("Prediction for [0, 1, 0, 0, 1, 1, 1, 1]: " + nn.predict(new double[]{0, 1, 0, 0, 1, 1, 1, 1})); System.out.println("Prediction for [0, 1, 0, 1, 0, 0, 0, 0]: " + nn.predict(new double[]{0, 1, 0, 1, 0, 0, 0, 0})); System.out.println("Prediction for [0, 1, 0, 1, 0, 0, 0, 1]: " + nn.predict(new double[]{0, 1, 0, 1, 0, 0, 0, 1})); System.out.println("Prediction for [0, 1, 0, 1, 0, 0, 1, 0]: " + nn.predict(new double[]{0, 1, 0, 1, 0, 0, 1, 0})); System.out.println("Prediction for [0, 1, 0, 1, 0, 0, 1, 1]: " + nn.predict(new double[]{0, 1, 0, 1, 0, 0, 1, 1})); System.out.println("Prediction for [0, 1, 0, 1, 0, 1, 0, 0]: " + nn.predict(new double[]{0, 1, 0, 1, 0, 1, 0, 0})); System.out.println("Prediction for [0, 1, 0, 1, 0, 1, 0, 1]: " + nn.predict(new double[]{0, 1, 0, 1, 0, 1, 0, 1})); System.out.println("Prediction for [0, 1, 0, 1, 0, 1, 1, 0]: " + nn.predict(new double[]{0, 1, 0, 1, 0, 1, 1, 0})); System.out.println("Prediction for [0, 1, 0, 1, 0, 1, 1, 1]: " + nn.predict(new double[]{0, 1, 0, 1, 0, 1, 1, 1})); System.out.println("Prediction for [0, 1, 0, 1, 1, 0, 0, 0]: " + nn.predict(new double[]{0, 1, 0, 1, 1, 0, 0, 0})); System.out.println("Prediction for [0, 1, 0, 1, 1, 0, 0, 1]: " + nn.predict(new double[]{0, 1, 0, 1, 1, 0, 0, 1})); System.out.println("Prediction for [0, 1, 0, 1, 1, 0, 1, 0]: " + nn.predict(new double[]{0, 1, 0, 1, 1, 0, 1, 0})); System.out.println("Prediction for [0, 1, 0, 1, 1, 0, 1, 1]: " + nn.predict(new double[]{0, 1, 0, 1, 1, 0, 1, 1})); System.out.println("Prediction for [0, 1, 0, 1, 1, 1, 0, 0]: " + nn.predict(new double[]{0, 1, 0, 1, 1, 1, 0, 0})); System.out.println("Prediction for [0, 1, 0, 1, 1, 1, 0, 1]: " + nn.predict(new double[]{0, 1, 0, 1, 1, 1, 0, 1})); System.out.println("Prediction for [0, 1, 0, 1, 1, 1, 1, 0]: " + nn.predict(new double[]{0, 1, 0, 1, 1, 1, 1, 0})); System.out.println("Prediction for [0, 1, 0, 1, 1, 1, 1, 1]: " + nn.predict(new double[]{0, 1, 0, 1, 1, 1, 1, 1})); System.out.println("Prediction for [0, 1, 1, 0, 0, 0, 0, 0]: " + nn.predict(new double[]{0, 1, 1, 0, 0, 0, 0, 0})); System.out.println("Prediction for [0, 1, 1, 0, 0, 0, 0, 1]: " + nn.predict(new double[]{0, 1, 1, 0, 0, 0, 0, 1})); System.out.println("Prediction for [0, 1, 1, 0, 0, 0, 1, 0]: " + nn.predict(new double[]{0, 1, 1, 0, 0, 0, 1, 0})); System.out.println("Prediction for [0, 1, 1, 0, 0, 0, 1, 1]: " + nn.predict(new double[]{0, 1, 1, 0, 0, 0, 1, 1})); System.out.println("Prediction for [0, 1, 1, 0, 0, 1, 0, 0]: " + nn.predict(new double[]{0, 1, 1, 0, 0, 1, 0, 0})); System.out.println("Prediction for [0, 1, 1, 0, 0, 1, 0, 1]: " + nn.predict(new double[]{0, 1, 1, 0, 0, 1, 0, 1})); System.out.println("Prediction for [0, 1, 1, 0, 0, 1, 1, 0]: " + nn.predict(new double[]{0, 1, 1, 0, 0, 1, 1, 0})); System.out.println("Prediction for [0, 1, 1, 0, 0, 1, 1, 1]: " + nn.predict(new double[]{0, 1, 1, 0, 0, 1, 1, 1})); System.out.println("Prediction for [0, 1, 1, 0, 1, 0, 0, 0]: " + nn.predict(new double[]{0, 1, 1, 0, 1, 0, 0, 0})); System.out.println("Prediction for [0, 1, 1, 0, 1, 0, 0, 1]: " + nn.predict(new double[]{0, 1, 1, 0, 1, 0, 0, 1})); System.out.println("Prediction for [0, 1, 1, 0, 1, 0, 1, 0]: " + nn.predict(new double[]{0, 1, 1, 0, 1, 0, 1, 0})); System.out.println("Prediction for [0, 1, 1, 0, 1, 0, 1, 1]: " + nn.predict(new double[]{0, 1, 1, 0, 1, 0, 1, 1})); System.out.println("Prediction for [0, 1, 1, 0, 1, 1, 0, 0]: " + nn.predict(new double[]{0, 1, 1, 0, 1, 1, 0, 0})); System.out.println("Prediction for [0, 1, 1, 0, 1, 1, 0, 1]: " + nn.predict(new double[]{0, 1, 1, 0, 1, 1, 0, 1})); System.out.println("Prediction for [0, 1, 1, 0, 1, 1, 1, 0]: " + nn.predict(new double[]{0, 1, 1, 0, 1, 1, 1, 0})); System.out.println("Prediction for [0, 1, 1, 0, 1, 1, 1, 1]: " + nn.predict(new double[]{0, 1, 1, 0, 1, 1, 1, 1})); System.out.println("Prediction for [0, 1, 1, 1, 0, 0, 0, 0]: " + nn.predict(new double[]{0, 1, 1, 1, 0, 0, 0, 0})); System.out.println("Prediction for [0, 1, 1, 1, 0, 0, 0, 1]: " + nn.predict(new double[]{0, 1, 1, 1, 0, 0, 0, 1})); System.out.println("Prediction for [0, 1, 1, 1, 0, 0, 1, 0]: " + nn.predict(new double[]{0, 1, 1, 1, 0, 0, 1, 0})); System.out.println("Prediction for [0, 1, 1, 1, 0, 0, 1, 1]: " + nn.predict(new double[]{0, 1, 1, 1, 0, 0, 1, 1})); System.out.println("Prediction for [0, 1, 1, 1, 0, 1, 0, 0]: " + nn.predict(new double[]{0, 1, 1, 1, 0, 1, 0, 0})); System.out.println("Prediction for [0, 1, 1, 1, 0, 1, 0, 1]: " + nn.predict(new double[]{0, 1, 1, 1, 0, 1, 0, 1})); System.out.println("Prediction for [0, 1, 1, 1, 0, 1, 1, 0]: " + nn.predict(new double[]{0, 1, 1, 1, 0, 1, 1, 0})); System.out.println("Prediction for [0, 1, 1, 1, 0, 1, 1, 1]: " + nn.predict(new double[]{0, 1, 1, 1, 0, 1, 1, 1})); System.out.println("Prediction for [0, 1, 1, 1, 1, 0, 0, 0]: " + nn.predict(new double[]{0, 1, 1, 1, 1, 0, 0, 0})); System.out.println("Prediction for [0, 1, 1, 1, 1, 0, 0, 1]: " + nn.predict(new double[]{0, 1, 1, 1, 1, 0, 0, 1})); System.out.println("Prediction for [0, 1, 1, 1, 1, 0, 1, 0]: " + nn.predict(new double[]{0, 1, 1, 1, 1, 0, 1, 0})); System.out.println("Prediction for [0, 1, 1, 1, 1, 0, 1, 1]: " + nn.predict(new double[]{0, 1, 1, 1, 1, 0, 1, 1})); System.out.println("Prediction for [0, 1, 1, 1, 1, 1, 0, 0]: " + nn.predict(new double[]{0, 1, 1, 1, 1, 1, 0, 0})); System.out.println("Prediction for [0, 1, 1, 1, 1, 1, 0, 1]: " + nn.predict(new double[]{0, 1, 1, 1, 1, 1, 0, 1})); System.out.println("Prediction for [0, 1, 1, 1, 1, 1, 1, 0]: " + nn.predict(new double[]{0, 1, 1, 1, 1, 1, 1, 0})); System.out.println("Prediction for [0, 1, 1, 1, 1, 1, 1, 1]: " + nn.predict(new double[]{0, 1, 1, 1, 1, 1, 1, 1})); System.out.println("Prediction for [1, 0, 0, 0, 0, 0, 0, 0]: " + nn.predict(new double[]{1, 0, 0, 0, 0, 0, 0, 0})); System.out.println("Prediction for [1, 0, 0, 0, 0, 0, 0, 1]: " + nn.predict(new double[]{1, 0, 0, 0, 0, 0, 0, 1})); System.out.println("Prediction for [1, 0, 0, 0, 0, 0, 1, 0]: " + nn.predict(new double[]{1, 0, 0, 0, 0, 0, 1, 0})); System.out.println("Prediction for [1, 0, 0, 0, 0, 0, 1, 1]: " + nn.predict(new double[]{1, 0, 0, 0, 0, 0, 1, 1})); System.out.println("Prediction for [1, 0, 0, 0, 0, 1, 0, 0]: " + nn.predict(new double[]{1, 0, 0, 0, 0, 1, 0, 0})); System.out.println("Prediction for [1, 0, 0, 0, 0, 1, 0, 1]: " + nn.predict(new double[]{1, 0, 0, 0, 0, 1, 0, 1})); System.out.println("Prediction for [1, 0, 0, 0, 0, 1, 1, 0]: " + nn.predict(new double[]{1, 0, 0, 0, 0, 1, 1, 0})); System.out.println("Prediction for [1, 0, 0, 0, 0, 1, 1, 1]: " + nn.predict(new double[]{1, 0, 0, 0, 0, 1, 1, 1})); System.out.println("Prediction for [1, 0, 0, 0, 1, 0, 0, 0]: " + nn.predict(new double[]{1, 0, 0, 0, 1, 0, 0, 0})); System.out.println("Prediction for [1, 0, 0, 0, 1, 0, 0, 1]: " + nn.predict(new double[]{1, 0, 0, 0, 1, 0, 0, 1})); System.out.println("Prediction for [1, 0, 0, 0, 1, 0, 1, 0]: " + nn.predict(new double[]{1, 0, 0, 0, 1, 0, 1, 0})); System.out.println("Prediction for [1, 0, 0, 0, 1, 0, 1, 1]: " + nn.predict(new double[]{1, 0, 0, 0, 1, 0, 1, 1})); System.out.println("Prediction for [1, 0, 0, 0, 1, 1, 0, 0]: " + nn.predict(new double[]{1, 0, 0, 0, 1, 1, 0, 0})); System.out.println("Prediction for [1, 0, 0, 0, 1, 1, 0, 1]: " + nn.predict(new double[]{1, 0, 0, 0, 1, 1, 0, 1})); System.out.println("Prediction for [1, 0, 0, 0, 1, 1, 1, 0]: " + nn.predict(new double[]{1, 0, 0, 0, 1, 1, 1, 0})); System.out.println("Prediction for [1, 0, 0, 0, 1, 1, 1, 1]: " + nn.predict(new double[]{1, 0, 0, 0, 1, 1, 1, 1})); System.out.println("Prediction for [1, 0, 0, 1, 0, 0, 0, 0]: " + nn.predict(new double[]{1, 0, 0, 1, 0, 0, 0, 0})); System.out.println("Prediction for [1, 0, 0, 1, 0, 0, 0, 1]: " + nn.predict(new double[]{1, 0, 0, 1, 0, 0, 0, 1})); System.out.println("Prediction for [1, 0, 0, 1, 0, 0, 1, 0]: " + nn.predict(new double[]{1, 0, 0, 1, 0, 0, 1, 0})); System.out.println("Prediction for [1, 0, 0, 1, 0, 0, 1, 1]: " + nn.predict(new double[]{1, 0, 0, 1, 0, 0, 1, 1})); System.out.println("Prediction for [1, 0, 0, 1, 0, 1, 0, 0]: " + nn.predict(new double[]{1, 0, 0, 1, 0, 1, 0, 0})); System.out.println("Prediction for [1, 0, 0, 1, 0, 1, 0, 1]: " + nn.predict(new double[]{1, 0, 0, 1, 0, 1, 0, 1})); System.out.println("Prediction for [1, 0, 0, 1, 0, 1, 1, 0]: " + nn.predict(new double[]{1, 0, 0, 1, 0, 1, 1, 0})); System.out.println("Prediction for [1, 0, 0, 1, 0, 1, 1, 1]: " + nn.predict(new double[]{1, 0, 0, 1, 0, 1, 1, 1})); System.out.println("Prediction for [1, 0, 0, 1, 1, 0, 0, 0]: " + nn.predict(new double[]{1, 0, 0, 1, 1, 0, 0, 0})); System.out.println("Prediction for [1, 0, 0, 1, 1, 0, 0, 1]: " + nn.predict(new double[]{1, 0, 0, 1, 1, 0, 0, 1})); System.out.println("Prediction for [1, 0, 0, 1, 1, 0, 1, 0]: " + nn.predict(new double[]{1, 0, 0, 1, 1, 0, 1, 0})); System.out.println("Prediction for [1, 0, 0, 1, 1, 0, 1, 1]: " + nn.predict(new double[]{1, 0, 0, 1, 1, 0, 1, 1})); System.out.println("Prediction for [1, 0, 0, 1, 1, 1, 0, 0]: " + nn.predict(new double[]{1, 0, 0, 1, 1, 1, 0, 0})); System.out.println("Prediction for [1, 0, 0, 1, 1, 1, 0, 1]: " + nn.predict(new double[]{1, 0, 0, 1, 1, 1, 0, 1})); System.out.println("Prediction for [1, 0, 0, 1, 1, 1, 1, 0]: " + nn.predict(new double[]{1, 0, 0, 1, 1, 1, 1, 0})); System.out.println("Prediction for [1, 0, 0, 1, 1, 1, 1, 1]: " + nn.predict(new double[]{1, 0, 0, 1, 1, 1, 1, 1})); System.out.println("Prediction for [1, 0, 1, 0, 0, 0, 0, 0]: " + nn.predict(new double[]{1, 0, 1, 0, 0, 0, 0, 0})); System.out.println("Prediction for [1, 0, 1, 0, 0, 0, 0, 1]: " + nn.predict(new double[]{1, 0, 1, 0, 0, 0, 0, 1})); System.out.println("Prediction for [1, 0, 1, 0, 0, 0, 1, 0]: " + nn.predict(new double[]{1, 0, 1, 0, 0, 0, 1, 0})); System.out.println("Prediction for [1, 0, 1, 0, 0, 0, 1, 1]: " + nn.predict(new double[]{1, 0, 1, 0, 0, 0, 1, 1})); System.out.println("Prediction for [1, 0, 1, 0, 0, 1, 0, 0]: " + nn.predict(new double[]{1, 0, 1, 0, 0, 1, 0, 0})); System.out.println("Prediction for [1, 0, 1, 0, 0, 1, 0, 1]: " + nn.predict(new double[]{1, 0, 1, 0, 0, 1, 0, 1})); System.out.println("Prediction for [1, 0, 1, 0, 0, 1, 1, 0]: " + nn.predict(new double[]{1, 0, 1, 0, 0, 1, 1, 0})); System.out.println("Prediction for [1, 0, 1, 0, 0, 1, 1, 1]: " + nn.predict(new double[]{1, 0, 1, 0, 0, 1, 1, 1})); System.out.println("Prediction for [1, 0, 1, 0, 1, 0, 0, 0]: " + nn.predict(new double[]{1, 0, 1, 0, 1, 0, 0, 0})); System.out.println("Prediction for [1, 0, 1, 0, 1, 0, 0, 1]: " + nn.predict(new double[]{1, 0, 1, 0, 1, 0, 0, 1})); System.out.println("Prediction for [1, 0, 1, 0, 1, 0, 1, 0]: " + nn.predict(new double[]{1, 0, 1, 0, 1, 0, 1, 0})); System.out.println("Prediction for [1, 0, 1, 0, 1, 0, 1, 1]: " + nn.predict(new double[]{1, 0, 1, 0, 1, 0, 1, 1})); System.out.println("Prediction for [1, 0, 1, 0, 1, 1, 0, 0]: " + nn.predict(new double[]{1, 0, 1, 0, 1, 1, 0, 0})); System.out.println("Prediction for [1, 0, 1, 0, 1, 1, 0, 1]: " + nn.predict(new double[]{1, 0, 1, 0, 1, 1, 0, 1})); System.out.println("Prediction for [1, 0, 1, 0, 1, 1, 1, 0]: " + nn.predict(new double[]{1, 0, 1, 0, 1, 1, 1, 0})); System.out.println("Prediction for [1, 0, 1, 0, 1, 1, 1, 1]: " + nn.predict(new double[]{1, 0, 1, 0, 1, 1, 1, 1})); System.out.println("Prediction for [1, 0, 1, 1, 0, 0, 0, 0]: " + nn.predict(new double[]{1, 0, 1, 1, 0, 0, 0, 0})); System.out.println("Prediction for [1, 0, 1, 1, 0, 0, 0, 1]: " + nn.predict(new double[]{1, 0, 1, 1, 0, 0, 0, 1})); System.out.println("Prediction for [1, 0, 1, 1, 0, 0, 1, 0]: " + nn.predict(new double[]{1, 0, 1, 1, 0, 0, 1, 0})); System.out.println("Prediction for [1, 0, 1, 1, 0, 0, 1, 1]: " + nn.predict(new double[]{1, 0, 1, 1, 0, 0, 1, 1})); System.out.println("Prediction for [1, 0, 1, 1, 0, 1, 0, 0]: " + nn.predict(new double[]{1, 0, 1, 1, 0, 1, 0, 0})); System.out.println("Prediction for [1, 0, 1, 1, 0, 1, 0, 1]: " + nn.predict(new double[]{1, 0, 1, 1, 0, 1, 0, 1})); System.out.println("Prediction for [1, 0, 1, 1, 0, 1, 1, 0]: " + nn.predict(new double[]{1, 0, 1, 1, 0, 1, 1, 0})); System.out.println("Prediction for [1, 0, 1, 1, 0, 1, 1, 1]: " + nn.predict(new double[]{1, 0, 1, 1, 0, 1, 1, 1})); System.out.println("Prediction for [1, 0, 1, 1, 1, 0, 0, 0]: " + nn.predict(new double[]{1, 0, 1, 1, 1, 0, 0, 0})); System.out.println("Prediction for [1, 0, 1, 1, 1, 0, 0, 1]: " + nn.predict(new double[]{1, 0, 1, 1, 1, 0, 0, 1})); System.out.println("Prediction for [1, 0, 1, 1, 1, 0, 1, 0]: " + nn.predict(new double[]{1, 0, 1, 1, 1, 0, 1, 0})); System.out.println("Prediction for [1, 0, 1, 1, 1, 0, 1, 1]: " + nn.predict(new double[]{1, 0, 1, 1, 1, 0, 1, 1})); System.out.println("Prediction for [1, 0, 1, 1, 1, 1, 0, 0]: " + nn.predict(new double[]{1, 0, 1, 1, 1, 1, 0, 0})); System.out.println("Prediction for [1, 0, 1, 1, 1, 1, 0, 1]: " + nn.predict(new double[]{1, 0, 1, 1, 1, 1, 0, 1})); System.out.println("Prediction for [1, 0, 1, 1, 1, 1, 1, 0]: " + nn.predict(new double[]{1, 0, 1, 1, 1, 1, 1, 0})); System.out.println("Prediction for [1, 0, 1, 1, 1, 1, 1, 1]: " + nn.predict(new double[]{1, 0, 1, 1, 1, 1, 1, 1})); System.out.println("Prediction for [1, 1, 0, 0, 0, 0, 0, 0]: " + nn.predict(new double[]{1, 1, 0, 0, 0, 0, 0, 0})); System.out.println("Prediction for [1, 1, 0, 0, 0, 0, 0, 1]: " + nn.predict(new double[]{1, 1, 0, 0, 0, 0, 0, 1})); System.out.println("Prediction for [1, 1, 0, 0, 0, 0, 1, 0]: " + nn.predict(new double[]{1, 1, 0, 0, 0, 0, 1, 0})); System.out.println("Prediction for [1, 1, 0, 0, 0, 0, 1, 1]: " + nn.predict(new double[]{1, 1, 0, 0, 0, 0, 1, 1})); System.out.println("Prediction for [1, 1, 0, 0, 0, 1, 0, 0]: " + nn.predict(new double[]{1, 1, 0, 0, 0, 1, 0, 0})); System.out.println("Prediction for [1, 1, 0, 0, 0, 1, 0, 1]: " + nn.predict(new double[]{1, 1, 0, 0, 0, 1, 0, 1})); System.out.println("Prediction for [1, 1, 0, 0, 0, 1, 1, 0]: " + nn.predict(new double[]{1, 1, 0, 0, 0, 1, 1, 0})); System.out.println("Prediction for [1, 1, 0, 0, 0, 1, 1, 1]: " + nn.predict(new double[]{1, 1, 0, 0, 0, 1, 1, 1})); System.out.println("Prediction for [1, 1, 0, 0, 1, 0, 0, 0]: " + nn.predict(new double[]{1, 1, 0, 0, 1, 0, 0, 0})); System.out.println("Prediction for [1, 1, 0, 0, 1, 0, 0, 1]: " + nn.predict(new double[]{1, 1, 0, 0, 1, 0, 0, 1})); System.out.println("Prediction for [1, 1, 0, 0, 1, 0, 1, 0]: " + nn.predict(new double[]{1, 1, 0, 0, 1, 0, 1, 0})); System.out.println("Prediction for [1, 1, 0, 0, 1, 0, 1, 1]: " + nn.predict(new double[]{1, 1, 0, 0, 1, 0, 1, 1})); System.out.println("Prediction for [1, 1, 0, 0, 1, 1, 0, 0]: " + nn.predict(new double[]{1, 1, 0, 0, 1, 1, 0, 0})); System.out.println("Prediction for [1, 1, 0, 0, 1, 1, 0, 1]: " + nn.predict(new double[]{1, 1, 0, 0, 1, 1, 0, 1})); System.out.println("Prediction for [1, 1, 0, 0, 1, 1, 1, 0]: " + nn.predict(new double[]{1, 1, 0, 0, 1, 1, 1, 0})); System.out.println("Prediction for [1, 1, 0, 0, 1, 1, 1, 1]: " + nn.predict(new double[]{1, 1, 0, 0, 1, 1, 1, 1})); System.out.println("Prediction for [1, 1, 0, 1, 0, 0, 0, 0]: " + nn.predict(new double[]{1, 1, 0, 1, 0, 0, 0, 0})); System.out.println("Prediction for [1, 1, 0, 1, 0, 0, 0, 1]: " + nn.predict(new double[]{1, 1, 0, 1, 0, 0, 0, 1})); System.out.println("Prediction for [1, 1, 0, 1, 0, 0, 1, 0]: " + nn.predict(new double[]{1, 1, 0, 1, 0, 0, 1, 0})); System.out.println("Prediction for [1, 1, 0, 1, 0, 0, 1, 1]: " + nn.predict(new double[]{1, 1, 0, 1, 0, 0, 1, 1})); System.out.println("Prediction for [1, 1, 0, 1, 0, 1, 0, 0]: " + nn.predict(new double[]{1, 1, 0, 1, 0, 1, 0, 0})); System.out.println("Prediction for [1, 1, 0, 1, 0, 1, 0, 1]: " + nn.predict(new double[]{1, 1, 0, 1, 0, 1, 0, 1})); System.out.println("Prediction for [1, 1, 0, 1, 0, 1, 1, 0]: " + nn.predict(new double[]{1, 1, 0, 1, 0, 1, 1, 0})); System.out.println("Prediction for [1, 1, 0, 1, 0, 1, 1, 1]: " + nn.predict(new double[]{1, 1, 0, 1, 0, 1, 1, 1})); System.out.println("Prediction for [1, 1, 0, 1, 1, 0, 0, 0]: " + nn.predict(new double[]{1, 1, 0, 1, 1, 0, 0, 0})); System.out.println("Prediction for [1, 1, 0, 1, 1, 0, 0, 1]: " + nn.predict(new double[]{1, 1, 0, 1, 1, 0, 0, 1})); System.out.println("Prediction for [1, 1, 0, 1, 1, 0, 1, 0]: " + nn.predict(new double[]{1, 1, 0, 1, 1, 0, 1, 0})); System.out.println("Prediction for [1, 1, 0, 1, 1, 0, 1, 1]: " + nn.predict(new double[]{1, 1, 0, 1, 1, 0, 1, 1})); System.out.println("Prediction for [1, 1, 0, 1, 1, 1, 0, 0]: " + nn.predict(new double[]{1, 1, 0, 1, 1, 1, 0, 0})); System.out.println("Prediction for [1, 1, 0, 1, 1, 1, 0, 1]: " + nn.predict(new double[]{1, 1, 0, 1, 1, 1, 0, 1})); System.out.println("Prediction for [1, 1, 0, 1, 1, 1, 1, 0]: " + nn.predict(new double[]{1, 1, 0, 1, 1, 1, 1, 0})); System.out.println("Prediction for [1, 1, 0, 1, 1, 1, 1, 1]: " + nn.predict(new double[]{1, 1, 0, 1, 1, 1, 1, 1})); System.out.println("Prediction for [1, 1, 1, 0, 0, 0, 0, 0]: " + nn.predict(new double[]{1, 1, 1, 0, 0, 0, 0, 0})); System.out.println("Prediction for [1, 1, 1, 0, 0, 0, 0, 1]: " + nn.predict(new double[]{1, 1, 1, 0, 0, 0, 0, 1})); System.out.println("Prediction for [1, 1, 1, 0, 0, 0, 1, 0]: " + nn.predict(new double[]{1, 1, 1, 0, 0, 0, 1, 0})); System.out.println("Prediction for [1, 1, 1, 0, 0, 0, 1, 1]: " + nn.predict(new double[]{1, 1, 1, 0, 0, 0, 1, 1})); System.out.println("Prediction for [1, 1, 1, 0, 0, 1, 0, 0]: " + nn.predict(new double[]{1, 1, 1, 0, 0, 1, 0, 0})); System.out.println("Prediction for [1, 1, 1, 0, 0, 1, 0, 1]: " + nn.predict(new double[]{1, 1, 1, 0, 0, 1, 0, 1})); System.out.println("Prediction for [1, 1, 1, 0, 0, 1, 1, 0]: " + nn.predict(new double[]{1, 1, 1, 0, 0, 1, 1, 0})); System.out.println("Prediction for [1, 1, 1, 0, 0, 1, 1, 1]: " + nn.predict(new double[]{1, 1, 1, 0, 0, 1, 1, 1})); System.out.println("Prediction for [1, 1, 1, 0, 1, 0, 0, 0]: " + nn.predict(new double[]{1, 1, 1, 0, 1, 0, 0, 0})); System.out.println("Prediction for [1, 1, 1, 0, 1, 0, 0, 1]: " + nn.predict(new double[]{1, 1, 1, 0, 1, 0, 0, 1})); System.out.println("Prediction for [1, 1, 1, 0, 1, 0, 1, 0]: " + nn.predict(new double[]{1, 1, 1, 0, 1, 0, 1, 0})); System.out.println("Prediction for [1, 1, 1, 0, 1, 0, 1, 1]: " + nn.predict(new double[]{1, 1, 1, 0, 1, 0, 1, 1})); System.out.println("Prediction for [1, 1, 1, 0, 1, 1, 0, 0]: " + nn.predict(new double[]{1, 1, 1, 0, 1, 1, 0, 0})); System.out.println("Prediction for [1, 1, 1, 0, 1, 1, 0, 1]: " + nn.predict(new double[]{1, 1, 1, 0, 1, 1, 0, 1})); System.out.println("Prediction for [1, 1, 1, 0, 1, 1, 1, 0]: " + nn.predict(new double[]{1, 1, 1, 0, 1, 1, 1, 0})); System.out.println("Prediction for [1, 1, 1, 0, 1, 1, 1, 1]: " + nn.predict(new double[]{1, 1, 1, 0, 1, 1, 1, 1})); System.out.println("Prediction for [1, 1, 1, 1, 0, 0, 0, 0]: " + nn.predict(new double[]{1, 1, 1, 1, 0, 0, 0, 0})); System.out.println("Prediction for [1, 1, 1, 1, 0, 0, 0, 1]: " + nn.predict(new double[]{1, 1, 1, 1, 0, 0, 0, 1})); System.out.println("Prediction for [1, 1, 1, 1, 0, 0, 1, 0]: " + nn.predict(new double[]{1, 1, 1, 1, 0, 0, 1, 0})); System.out.println("Prediction for [1, 1, 1, 1, 0, 0, 1, 1]: " + nn.predict(new double[]{1, 1, 1, 1, 0, 0, 1, 1})); System.out.println("Prediction for [1, 1, 1, 1, 0, 1, 0, 0]: " + nn.predict(new double[]{1, 1, 1, 1, 0, 1, 0, 0})); System.out.println("Prediction for [1, 1, 1, 1, 0, 1, 0, 1]: " + nn.predict(new double[]{1, 1, 1, 1, 0, 1, 0, 1})); System.out.println("Prediction for [1, 1, 1, 1, 0, 1, 1, 0]: " + nn.predict(new double[]{1, 1, 1, 1, 0, 1, 1, 0})); System.out.println("Prediction for [1, 1, 1, 1, 0, 1, 1, 1]: " + nn.predict(new double[]{1, 1, 1, 1, 0, 1, 1, 1})); System.out.println("Prediction for [1, 1, 1, 1, 1, 0, 0, 0]: " + nn.predict(new double[]{1, 1, 1, 1, 1, 0, 0, 0})); System.out.println("Prediction for [1, 1, 1, 1, 1, 0, 0, 1]: " + nn.predict(new double[]{1, 1, 1, 1, 1, 0, 0, 1})); System.out.println("Prediction for [1, 1, 1, 1, 1, 0, 1, 0]: " + nn.predict(new double[]{1, 1, 1, 1, 1, 0, 1, 0})); System.out.println("Prediction for [1, 1, 1, 1, 1, 0, 1, 1]: " + nn.predict(new double[]{1, 1, 1, 1, 1, 0, 1, 1})); System.out.println("Prediction for [1, 1, 1, 1, 1, 1, 0, 0]: " + nn.predict(new double[]{1, 1, 1, 1, 1, 1, 0, 0})); System.out.println("Prediction for [1, 1, 1, 1, 1, 1, 0, 1]: " + nn.predict(new double[]{1, 1, 1, 1, 1, 1, 0, 1})); System.out.println("Prediction for [1, 1, 1, 1, 1, 1, 1, 0]: " + nn.predict(new double[]{1, 1, 1, 1, 1, 1, 1, 0})); System.out.println("Prediction for [1, 1, 1, 1, 1, 1, 1, 1]: " + nn.predict(new double[]{1, 1, 1, 1, 1, 1, 1, 1})); } } So, in principle with this program, all encryption programs, set set on primes are obsolete.
  14. @Mark-XP I have no idea what is going wrong. I noticed, that Neuroph is unstable, so I make all by hand Dietmar
  15. @Mark-XP Yes, it is like with Taylor Polynom. When you cut off some points, it runs out of being valid. But as long as you stay as close as possible to the interesting points, it gives you some extra information. After long running this program, it looks, as if you need always "1" as prime, but not "2" Dietmar
  16. @Mark-XP It works. Now I have excluded from training the prime numbers 179 and 181. There is some magic, look at this result Dietmar Prediction for [1, 0, 1, 0, 1, 1, 0, 0]: 0.0 Prediction for [1, 0, 1, 0, 1, 1, 0, 1]: 0.9999999999936455 Prediction for [1, 0, 1, 0, 1, 1, 1, 0]: 0.0 Prediction for [1, 0, 1, 0, 1, 1, 1, 1]: 0.0 Prediction for [1, 0, 1, 1, 0, 0, 0, 0]: 0.0 Prediction for [1, 0, 1, 1, 0, 0, 0, 1]: 0.0 Prediction for [1, 0, 1, 1, 0, 0, 1, 0]: 0.0 Prediction for [1, 0, 1, 1, 0, 0, 1, 1]: 0.35479505025788205 <------------- 179 Prediction for [1, 0, 1, 1, 0, 1, 0, 0]: 0.0 Prediction for [1, 0, 1, 1, 0, 1, 0, 1]: 0.35752233986543436 <------------- 181 Prediction for [1, 0, 1, 1, 0, 1, 1, 0]: 0.0 Prediction for [1, 0, 1, 1, 0, 1, 1, 1]: 0.0 Prediction for [1, 0, 1, 1, 1, 0, 0, 0]: 0.0 Prediction for [1, 0, 1, 1, 1, 0, 0, 1]: 0.0 Prediction for [1, 0, 1, 1, 1, 0, 1, 0]: 0.0 Prediction for [1, 0, 1, 1, 1, 0, 1, 1]: 0.0 Prediction for [1, 0, 1, 1, 1, 1, 0, 0]: 0.0 Prediction for [1, 0, 1, 1, 1, 1, 0, 1]: 0.0 Prediction for [1, 0, 1, 1, 1, 1, 1, 0]: 0.0 Prediction for [1, 0, 1, 1, 1, 1, 1, 1]: 0.9999999999970552 Prediction for [1, 1, 0, 0, 0, 0, 0, 0]: 0.0 Prediction for [1, 1, 0, 0, 0, 0, 0, 1]: 0.9999999999978786 Prediction for [1, 1, 0, 0, 0, 0, 1, 0]: 0.0
  17. @Mark-XP I think, that this will work for to exclude number 1 and number 4 from training Dietmar public void train(double[][] trainingInputs, double[] trainingTargets) { for (int epoch = 1; epoch <= numEpochs; epoch++) { double totalError = 0.0; for (int i = 0; i < trainingInputs.length; i++) { // Skip excluded inputs if (i == 1 || i == 4) { continue; } double[] input = trainingInputs[i]; double target = trainingTargets[i];
  18. @Mark-XP Is it really that magic or do I something wrong in EXCLUDING all those numbers from training? Because the program repairs everything to 100% correct Dietmar for (int i = 0; i < trainingInputs.length; i++) { if (trainingInputs[i][0] != 211 && trainingInputs[i][0] != 212 && trainingInputs[i][0] != 213 && trainingInputs[i][0] != 214 && trainingInputs[i][0] != 215 && trainingInputs[i][0] != 216 && trainingInputs[i][0] != 217 && trainingInputs[i][0] != 218 && trainingInputs[i][0] != 219 && trainingInputs[i][0] != 220 && trainingInputs[i][0] != 221 && trainingInputs[i][0] != 222 && trainingInputs[i][0] != 223 && trainingInputs[i][0] != 224 && trainingInputs[i][0] != 225&& trainingInputs[i][0] != 226 && trainingInputs[i][0] != 227 && trainingInputs[i][0] != 228 && trainingInputs[i][0] != 229 && trainingInputs[i][0] != 230 && trainingInputs[i][0] != 231 && trainingInputs[i][0] != 232 && trainingInputs[i][0] != 233 && trainingInputs[i][0] != 234 && trainingInputs[i][0] != 235 && trainingInputs[i][0] != 236 && trainingInputs[i][0] != 237 && trainingInputs[i][0] != 238 && trainingInputs[i][0] != 239 && trainingInputs[i][0] != 240 && trainingInputs[i][0] != 241 && trainingInputs[i][0] != 242 && trainingInputs[i][0] != 243 && trainingInputs[i][0] != 244 && trainingInputs[i][0] != 245 && trainingInputs[i][0] != 246 && trainingInputs[i][0] != 247 && trainingInputs[i][0] != 248 && trainingInputs[i][0] != 249 && trainingInputs[i][0] != 250 && trainingInputs[i][0] != 251 && trainingInputs[i][0] != 252 && trainingInputs[i][0] != 253 && trainingInputs[i][0] != 254 && trainingInputs[i][0] != 255) { double[] input = trainingInputs[i]; double target = trainingTargets[i]; Epoch 10000. Mean error: 0.013761853181815283 Epoch 20000. Mean error: 0.004436394551152869 Epoch 30000. Mean error: 0.0019123386251860676 Epoch 40000. Mean error: 9.306602545905893E-4 Epoch 50000. Mean error: 5.141772173888018E-4 Epoch 60000. Mean error: 2.821186928938447E-4 Epoch 70000. Mean error: 1.508378952461119E-4 Epoch 80000. Mean error: 8.082572640045874E-5 Epoch 90000. Mean error: 4.316245807346151E-5 Epoch 100000. Mean error: 2.1495164564763075E-5 Epoch 110000. Mean error: 1.0706271608133646E-5 Epoch 120000. Mean error: 5.2215680429780436E-6 Epoch 130000. Mean error: 2.542432665413603E-6 Epoch 140000. Mean error: 1.2270160208784432E-6 Epoch 150000. Mean error: 5.84331351670071E-7 Epoch 160000. Mean error: 2.7341594450850186E-7 Epoch 170000. Mean error: 1.259037745722232E-7 Epoch 180000. Mean error: 5.686962593191134E-8 Epoch 190000. Mean error: 2.5281081341727448E-8 Epoch 200000. Mean error: 1.1029211150480328E-8 Prediction for [0, 0, 0, 0, 0, 0, 0, 0]: 0.0 Prediction for [0, 0, 0, 0, 0, 0, 0, 1]: 0.9998552064378066 Prediction for [0, 0, 0, 0, 0, 0, 1, 0]: 0.9999981980754573 Prediction for [0, 0, 0, 0, 0, 0, 1, 1]: 0.9999665775075819 Prediction for [0, 0, 0, 0, 0, 1, 0, 0]: 0.0 Prediction for [0, 0, 0, 0, 0, 1, 0, 1]: 0.9999249127391208 Prediction for [0, 0, 0, 0, 0, 1, 1, 0]: 0.0 Prediction for [0, 0, 0, 0, 0, 1, 1, 1]: 1.000015790609996 Prediction for [0, 0, 0, 0, 1, 0, 0, 0]: 4.607743658402441E-6 Prediction for [0, 0, 0, 0, 1, 0, 0, 1]: 0.0 Prediction for [0, 0, 0, 0, 1, 0, 1, 0]: 0.0 Prediction for [0, 0, 0, 0, 1, 0, 1, 1]: 0.999967509445554 Prediction for [0, 0, 0, 0, 1, 1, 0, 0]: 0.0 Prediction for [0, 0, 0, 0, 1, 1, 0, 1]: 1.0000587030697794 Prediction for [0, 0, 0, 0, 1, 1, 1, 0]: 0.0 Prediction for [0, 0, 0, 0, 1, 1, 1, 1]: 0.0 Prediction for [0, 0, 0, 1, 0, 0, 0, 0]: 0.0 Prediction for [0, 0, 0, 1, 0, 0, 0, 1]: 1.0001184787545911 Prediction for [0, 0, 0, 1, 0, 0, 1, 0]: 0.0 Prediction for [0, 0, 0, 1, 0, 0, 1, 1]: 0.9999721296956876 Prediction for [0, 0, 0, 1, 0, 1, 0, 0]: 0.0 Prediction for [0, 0, 0, 1, 0, 1, 0, 1]: 0.0 Prediction for [0, 0, 0, 1, 0, 1, 1, 0]: 0.0 Prediction for [0, 0, 0, 1, 0, 1, 1, 1]: 1.0000320023879805 Prediction for [0, 0, 0, 1, 1, 0, 0, 0]: 0.0 Prediction for [0, 0, 0, 1, 1, 0, 0, 1]: 2.6237465342360267E-5 Prediction for [0, 0, 0, 1, 1, 0, 1, 0]: 0.0 Prediction for [0, 0, 0, 1, 1, 0, 1, 1]: 0.0 Prediction for [0, 0, 0, 1, 1, 1, 0, 0]: 0.0 Prediction for [0, 0, 0, 1, 1, 1, 0, 1]: 1.000065687199663 Prediction for [0, 0, 0, 1, 1, 1, 1, 0]: 0.0 Prediction for [0, 0, 0, 1, 1, 1, 1, 1]: 1.0000586110238747 Prediction for [0, 0, 1, 0, 0, 0, 0, 0]: 0.0 Prediction for [0, 0, 1, 0, 0, 0, 0, 1]: 0.0 Prediction for [0, 0, 1, 0, 0, 0, 1, 0]: 0.0 Prediction for [0, 0, 1, 0, 0, 0, 1, 1]: 1.7897633077357256E-5 Prediction for [0, 0, 1, 0, 0, 1, 0, 0]: 0.0 Prediction for [0, 0, 1, 0, 0, 1, 0, 1]: 0.9999249745786815 Prediction for [0, 0, 1, 0, 0, 1, 1, 0]: 0.0 Prediction for [0, 0, 1, 0, 0, 1, 1, 1]: 5.700748834081004E-5 Prediction for [0, 0, 1, 0, 1, 0, 0, 0]: 0.0 Prediction for [0, 0, 1, 0, 1, 0, 0, 1]: 0.999990151336934 Prediction for [0, 0, 1, 0, 1, 0, 1, 0]: 0.0 Prediction for [0, 0, 1, 0, 1, 0, 1, 1]: 1.0001013046940173 Prediction for [0, 0, 1, 0, 1, 1, 0, 0]: 0.0 Prediction for [0, 0, 1, 0, 1, 1, 0, 1]: 1.456675864597301E-5 Prediction for [0, 0, 1, 0, 1, 1, 1, 0]: 0.0 Prediction for [0, 0, 1, 0, 1, 1, 1, 1]: 0.9999403685441526 Prediction for [0, 0, 1, 1, 0, 0, 0, 0]: 0.0 Prediction for [0, 0, 1, 1, 0, 0, 0, 1]: 0.0 Prediction for [0, 0, 1, 1, 0, 0, 1, 0]: 0.0 Prediction for [0, 0, 1, 1, 0, 0, 1, 1]: 0.0 Prediction for [0, 0, 1, 1, 0, 1, 0, 0]: 0.0 Prediction for [0, 0, 1, 1, 0, 1, 0, 1]: 1.0000081064258306 Prediction for [0, 0, 1, 1, 0, 1, 1, 0]: 0.0 Prediction for [0, 0, 1, 1, 0, 1, 1, 1]: 0.0 Prediction for [0, 0, 1, 1, 1, 0, 0, 0]: 0.0 Prediction for [0, 0, 1, 1, 1, 0, 0, 1]: 0.0 Prediction for [0, 0, 1, 1, 1, 0, 1, 0]: 0.0 Prediction for [0, 0, 1, 1, 1, 0, 1, 1]: 1.0000087580749821 Prediction for [0, 0, 1, 1, 1, 1, 0, 0]: 0.0 Prediction for [0, 0, 1, 1, 1, 1, 0, 1]: 0.9999749485773969 Prediction for [0, 0, 1, 1, 1, 1, 1, 0]: 0.0 Prediction for [0, 0, 1, 1, 1, 1, 1, 1]: 0.0 Prediction for [0, 1, 0, 0, 0, 0, 0, 0]: 0.0 Prediction for [0, 1, 0, 0, 0, 0, 0, 1]: 1.2902614773491194E-5 Prediction for [0, 1, 0, 0, 0, 0, 1, 0]: 0.0 Prediction for [0, 1, 0, 0, 0, 0, 1, 1]: 1.0000440803277686 Prediction for [0, 1, 0, 0, 0, 1, 0, 0]: 0.0 Prediction for [0, 1, 0, 0, 0, 1, 0, 1]: 4.5182928430254066E-5 Prediction for [0, 1, 0, 0, 0, 1, 1, 0]: 0.0 Prediction for [0, 1, 0, 0, 0, 1, 1, 1]: 1.0000656916849726 Prediction for [0, 1, 0, 0, 1, 0, 0, 0]: 0.0 Prediction for [0, 1, 0, 0, 1, 0, 0, 1]: 1.0000501070989714 Prediction for [0, 1, 0, 0, 1, 0, 1, 0]: 0.0 Prediction for [0, 1, 0, 0, 1, 0, 1, 1]: 0.0 Prediction for [0, 1, 0, 0, 1, 1, 0, 0]: 0.0 Prediction for [0, 1, 0, 0, 1, 1, 0, 1]: 0.0 Prediction for [0, 1, 0, 0, 1, 1, 1, 0]: 0.0 Prediction for [0, 1, 0, 0, 1, 1, 1, 1]: 0.999856267889315 Prediction for [0, 1, 0, 1, 0, 0, 0, 0]: 0.0 Prediction for [0, 1, 0, 1, 0, 0, 0, 1]: 0.0 Prediction for [0, 1, 0, 1, 0, 0, 1, 0]: 0.0 Prediction for [0, 1, 0, 1, 0, 0, 1, 1]: 0.999986162644245 Prediction for [0, 1, 0, 1, 0, 1, 0, 0]: 0.0 Prediction for [0, 1, 0, 1, 0, 1, 0, 1]: 0.0 Prediction for [0, 1, 0, 1, 0, 1, 1, 0]: 0.0 Prediction for [0, 1, 0, 1, 0, 1, 1, 1]: 0.0 Prediction for [0, 1, 0, 1, 1, 0, 0, 0]: 0.0 Prediction for [0, 1, 0, 1, 1, 0, 0, 1]: 0.9999606044972917 Prediction for [0, 1, 0, 1, 1, 0, 1, 0]: 0.0 Prediction for [0, 1, 0, 1, 1, 0, 1, 1]: 0.0 Prediction for [0, 1, 0, 1, 1, 1, 0, 0]: 0.0 Prediction for [0, 1, 0, 1, 1, 1, 0, 1]: 0.0 Prediction for [0, 1, 0, 1, 1, 1, 1, 0]: 0.0 Prediction for [0, 1, 0, 1, 1, 1, 1, 1]: 0.0 Prediction for [0, 1, 1, 0, 0, 0, 0, 0]: 0.0 Prediction for [0, 1, 1, 0, 0, 0, 0, 1]: 1.0000315884560482 Prediction for [0, 1, 1, 0, 0, 0, 1, 0]: 0.0 Prediction for [0, 1, 1, 0, 0, 0, 1, 1]: 0.0 Prediction for [0, 1, 1, 0, 0, 1, 0, 0]: 0.0 Prediction for [0, 1, 1, 0, 0, 1, 0, 1]: 0.9999866513100956 Prediction for [0, 1, 1, 0, 0, 1, 1, 0]: 0.0 Prediction for [0, 1, 1, 0, 0, 1, 1, 1]: 0.9999502300521703 Prediction for [0, 1, 1, 0, 1, 0, 0, 0]: 0.0 Prediction for [0, 1, 1, 0, 1, 0, 0, 1]: 0.0 Prediction for [0, 1, 1, 0, 1, 0, 1, 0]: 0.0 Prediction for [0, 1, 1, 0, 1, 0, 1, 1]: 0.9998970548806126 Prediction for [0, 1, 1, 0, 1, 1, 0, 0]: 0.0 Prediction for [0, 1, 1, 0, 1, 1, 0, 1]: 0.9997636214066983 Prediction for [0, 1, 1, 0, 1, 1, 1, 0]: 0.0 Prediction for [0, 1, 1, 0, 1, 1, 1, 1]: 3.672648276511481E-4 Prediction for [0, 1, 1, 1, 0, 0, 0, 0]: 0.0 Prediction for [0, 1, 1, 1, 0, 0, 0, 1]: 0.999975745798993 Prediction for [0, 1, 1, 1, 0, 0, 1, 0]: 0.0 Prediction for [0, 1, 1, 1, 0, 0, 1, 1]: 0.0 Prediction for [0, 1, 1, 1, 0, 1, 0, 0]: 0.0 Prediction for [0, 1, 1, 1, 0, 1, 0, 1]: 0.0 Prediction for [0, 1, 1, 1, 0, 1, 1, 0]: 0.0 Prediction for [0, 1, 1, 1, 0, 1, 1, 1]: 0.0 Prediction for [0, 1, 1, 1, 1, 0, 0, 0]: 0.0 Prediction for [0, 1, 1, 1, 1, 0, 0, 1]: 5.10060797580536E-5 Prediction for [0, 1, 1, 1, 1, 0, 1, 0]: 0.0 Prediction for [0, 1, 1, 1, 1, 0, 1, 1]: 0.0 Prediction for [0, 1, 1, 1, 1, 1, 0, 0]: 0.0 Prediction for [0, 1, 1, 1, 1, 1, 0, 1]: 0.0 Prediction for [0, 1, 1, 1, 1, 1, 1, 0]: 0.0 Prediction for [0, 1, 1, 1, 1, 1, 1, 1]: 0.9999711728267535 Prediction for [1, 0, 0, 0, 0, 0, 0, 0]: 0.0 Prediction for [1, 0, 0, 0, 0, 0, 0, 1]: 0.0 Prediction for [1, 0, 0, 0, 0, 0, 1, 0]: 0.0 Prediction for [1, 0, 0, 0, 0, 0, 1, 1]: 1.0001011632210368 Prediction for [1, 0, 0, 0, 0, 1, 0, 0]: 0.0 Prediction for [1, 0, 0, 0, 0, 1, 0, 1]: 2.1498885796100708E-4 Prediction for [1, 0, 0, 0, 0, 1, 1, 0]: 0.0 Prediction for [1, 0, 0, 0, 0, 1, 1, 1]: 5.639744095382593E-4 Prediction for [1, 0, 0, 0, 1, 0, 0, 0]: 0.0 Prediction for [1, 0, 0, 0, 1, 0, 0, 1]: 1.0001750123924615 Prediction for [1, 0, 0, 0, 1, 0, 1, 0]: 0.0 Prediction for [1, 0, 0, 0, 1, 0, 1, 1]: 1.0001032376133185 Prediction for [1, 0, 0, 0, 1, 1, 0, 0]: 0.0 Prediction for [1, 0, 0, 0, 1, 1, 0, 1]: 0.0 Prediction for [1, 0, 0, 0, 1, 1, 1, 0]: 0.0 Prediction for [1, 0, 0, 0, 1, 1, 1, 1]: 0.0 Prediction for [1, 0, 0, 1, 0, 0, 0, 0]: 0.0 Prediction for [1, 0, 0, 1, 0, 0, 0, 1]: 0.0 Prediction for [1, 0, 0, 1, 0, 0, 1, 0]: 0.0 Prediction for [1, 0, 0, 1, 0, 0, 1, 1]: 0.0 Prediction for [1, 0, 0, 1, 0, 1, 0, 0]: 0.0 Prediction for [1, 0, 0, 1, 0, 1, 0, 1]: 1.0001379783739037 Prediction for [1, 0, 0, 1, 0, 1, 1, 0]: 0.0 Prediction for [1, 0, 0, 1, 0, 1, 1, 1]: 1.0001563789090673 Prediction for [1, 0, 0, 1, 1, 0, 0, 0]: 0.0 Prediction for [1, 0, 0, 1, 1, 0, 0, 1]: 0.0 Prediction for [1, 0, 0, 1, 1, 0, 1, 0]: 0.0 Prediction for [1, 0, 0, 1, 1, 0, 1, 1]: 0.0 Prediction for [1, 0, 0, 1, 1, 1, 0, 0]: 0.0 Prediction for [1, 0, 0, 1, 1, 1, 0, 1]: 1.0001283816760012 Prediction for [1, 0, 0, 1, 1, 1, 1, 0]: 0.0 Prediction for [1, 0, 0, 1, 1, 1, 1, 1]: 0.0 Prediction for [1, 0, 1, 0, 0, 0, 0, 0]: 0.0 Prediction for [1, 0, 1, 0, 0, 0, 0, 1]: 0.0 Prediction for [1, 0, 1, 0, 0, 0, 1, 0]: 0.0 Prediction for [1, 0, 1, 0, 0, 0, 1, 1]: 1.0000901483882112 Prediction for [1, 0, 1, 0, 0, 1, 0, 0]: 0.0 Prediction for [1, 0, 1, 0, 0, 1, 0, 1]: 0.0 Prediction for [1, 0, 1, 0, 0, 1, 1, 0]: 0.0 Prediction for [1, 0, 1, 0, 0, 1, 1, 1]: 0.9996806792405923 Prediction for [1, 0, 1, 0, 1, 0, 0, 0]: 0.0 Prediction for [1, 0, 1, 0, 1, 0, 0, 1]: 0.0 Prediction for [1, 0, 1, 0, 1, 0, 1, 0]: 0.0 Prediction for [1, 0, 1, 0, 1, 0, 1, 1]: 5.584586628071264E-5 Prediction for [1, 0, 1, 0, 1, 1, 0, 0]: 0.0 Prediction for [1, 0, 1, 0, 1, 1, 0, 1]: 0.9999271860359712 Prediction for [1, 0, 1, 0, 1, 1, 1, 0]: 0.0 Prediction for [1, 0, 1, 0, 1, 1, 1, 1]: 0.0 Prediction for [1, 0, 1, 1, 0, 0, 0, 0]: 0.0 Prediction for [1, 0, 1, 1, 0, 0, 0, 1]: 0.0 Prediction for [1, 0, 1, 1, 0, 0, 1, 0]: 0.0 Prediction for [1, 0, 1, 1, 0, 0, 1, 1]: 0.9999529534472646 Prediction for [1, 0, 1, 1, 0, 1, 0, 0]: 0.0 Prediction for [1, 0, 1, 1, 0, 1, 0, 1]: 1.0000038892241698 Prediction for [1, 0, 1, 1, 0, 1, 1, 0]: 0.0 Prediction for [1, 0, 1, 1, 0, 1, 1, 1]: 0.0 Prediction for [1, 0, 1, 1, 1, 0, 0, 0]: 0.0 Prediction for [1, 0, 1, 1, 1, 0, 0, 1]: 0.0 Prediction for [1, 0, 1, 1, 1, 0, 1, 0]: 0.0 Prediction for [1, 0, 1, 1, 1, 0, 1, 1]: 0.0 Prediction for [1, 0, 1, 1, 1, 1, 0, 0]: 0.0 Prediction for [1, 0, 1, 1, 1, 1, 0, 1]: 0.0 Prediction for [1, 0, 1, 1, 1, 1, 1, 0]: 0.0 Prediction for [1, 0, 1, 1, 1, 1, 1, 1]: 0.9999769155484038 Prediction for [1, 1, 0, 0, 0, 0, 0, 0]: 0.0 Prediction for [1, 1, 0, 0, 0, 0, 0, 1]: 0.999467293162985 Prediction for [1, 1, 0, 0, 0, 0, 1, 0]: 0.0 Prediction for [1, 1, 0, 0, 0, 0, 1, 1]: 0.0 Prediction for [1, 1, 0, 0, 0, 1, 0, 0]: 0.0 Prediction for [1, 1, 0, 0, 0, 1, 0, 1]: 0.9997709697158451 Prediction for [1, 1, 0, 0, 0, 1, 1, 0]: 0.0 Prediction for [1, 1, 0, 0, 0, 1, 1, 1]: 0.9991634599908605 Prediction for [1, 1, 0, 0, 1, 0, 0, 0]: 0.0 Prediction for [1, 1, 0, 0, 1, 0, 0, 1]: 0.0 Prediction for [1, 1, 0, 0, 1, 0, 1, 0]: 0.0 Prediction for [1, 1, 0, 0, 1, 0, 1, 1]: 0.0 Prediction for [1, 1, 0, 0, 1, 1, 0, 0]: 0.0 Prediction for [1, 1, 0, 0, 1, 1, 0, 1]: 0.0 Prediction for [1, 1, 0, 0, 1, 1, 1, 0]: 0.0 Prediction for [1, 1, 0, 0, 1, 1, 1, 1]: 0.0 Prediction for [1, 1, 0, 1, 0, 0, 0, 0]: 0.0 Prediction for [1, 1, 0, 1, 0, 0, 0, 1]: 0.0 Prediction for [1, 1, 0, 1, 0, 0, 1, 0]: 0.0 Prediction for [1, 1, 0, 1, 0, 0, 1, 1]: 0.9998207867828033 Prediction for [1, 1, 0, 1, 0, 1, 0, 0]: 0.0 Prediction for [1, 1, 0, 1, 0, 1, 0, 1]: 0.0 Prediction for [1, 1, 0, 1, 0, 1, 1, 0]: 0.0 Prediction for [1, 1, 0, 1, 0, 1, 1, 1]: 0.0 Prediction for [1, 1, 0, 1, 1, 0, 0, 0]: 0.0 Prediction for [1, 1, 0, 1, 1, 0, 0, 1]: 0.0 Prediction for [1, 1, 0, 1, 1, 0, 1, 0]: 0.0 Prediction for [1, 1, 0, 1, 1, 0, 1, 1]: 0.0 Prediction for [1, 1, 0, 1, 1, 1, 0, 0]: 0.0 Prediction for [1, 1, 0, 1, 1, 1, 0, 1]: 0.0 Prediction for [1, 1, 0, 1, 1, 1, 1, 0]: 0.0 Prediction for [1, 1, 0, 1, 1, 1, 1, 1]: 0.999755344991017 Prediction for [1, 1, 1, 0, 0, 0, 0, 0]: 0.0 Prediction for [1, 1, 1, 0, 0, 0, 0, 1]: 2.456548222435906E-4 Prediction for [1, 1, 1, 0, 0, 0, 1, 0]: 0.0 Prediction for [1, 1, 1, 0, 0, 0, 1, 1]: 0.9998103012363052 Prediction for [1, 1, 1, 0, 0, 1, 0, 0]: 0.0 Prediction for [1, 1, 1, 0, 0, 1, 0, 1]: 1.000008443419425 Prediction for [1, 1, 1, 0, 0, 1, 1, 0]: 0.0 Prediction for [1, 1, 1, 0, 0, 1, 1, 1]: 3.961633849602908E-4 Prediction for [1, 1, 1, 0, 1, 0, 0, 0]: 0.0 Prediction for [1, 1, 1, 0, 1, 0, 0, 1]: 1.000013630852953 Prediction for [1, 1, 1, 0, 1, 0, 1, 0]: 0.0 Prediction for [1, 1, 1, 0, 1, 0, 1, 1]: 2.0364601871936117E-4 Prediction for [1, 1, 1, 0, 1, 1, 0, 0]: 0.0 Prediction for [1, 1, 1, 0, 1, 1, 0, 1]: 4.317247726761675E-4 Prediction for [1, 1, 1, 0, 1, 1, 1, 0]: 0.0 Prediction for [1, 1, 1, 0, 1, 1, 1, 1]: 1.0000305768307247 Prediction for [1, 1, 1, 1, 0, 0, 0, 0]: 0.0 Prediction for [1, 1, 1, 1, 0, 0, 0, 1]: 0.9997772507539702 Prediction for [1, 1, 1, 1, 0, 0, 1, 0]: 0.0 Prediction for [1, 1, 1, 1, 0, 0, 1, 1]: 0.0 Prediction for [1, 1, 1, 1, 0, 1, 0, 0]: 0.0 Prediction for [1, 1, 1, 1, 0, 1, 0, 1]: 0.0 Prediction for [1, 1, 1, 1, 0, 1, 1, 0]: 0.0 Prediction for [1, 1, 1, 1, 0, 1, 1, 1]: 0.0 Prediction for [1, 1, 1, 1, 1, 0, 0, 0]: 0.0 Prediction for [1, 1, 1, 1, 1, 0, 0, 1]: 0.0 Prediction for [1, 1, 1, 1, 1, 0, 1, 0]: 0.0 Prediction for [1, 1, 1, 1, 1, 0, 1, 1]: 0.9999390212900362 Prediction for [1, 1, 1, 1, 1, 1, 0, 0]: 0.0 Prediction for [1, 1, 1, 1, 1, 1, 0, 1]: 0.0 Prediction for [1, 1, 1, 1, 1, 1, 1, 0]: 0.0 Prediction for [1, 1, 1, 1, 1, 1, 1, 1]: 3.341041474858031E-5 BUILD SUCCESSFUL (total time: 42 seconds)
  19. @Mark-XP Here you can see, that all the missed Primes are regenerated. It is a little bit Magic.. The training only happens for the input values that are not equal to 241, 251, or 239. Dietmar package multiof3; import java.util.Arrays; import java.util.Random; public class Multiof3 { private final int numInputNodes = 8; private final int numHiddenNodes = 32; private final int numOutputNodes = 1; private final double learningRate = 0.02; private final int numEpochs = 200000; private final double errorThreshold = 0.000000000000000000000000000001; private double[][] inputToHiddenWeights; private double[][] hiddenToOutputWeights; private double[] hiddenBiases; private double[] outputBiases; public Multiof3() { Random random = new Random(); inputToHiddenWeights = new double[numInputNodes][numHiddenNodes]; hiddenToOutputWeights = new double[numHiddenNodes][numOutputNodes]; hiddenBiases = new double[numHiddenNodes]; outputBiases = new double[numOutputNodes]; for (int i = 0; i < numInputNodes; i++) { for (int j = 0; j < numHiddenNodes; j++) { inputToHiddenWeights[i][j] = random.nextDouble() - 0.5; } } for (int i = 0; i < numHiddenNodes; i++) { for (int j = 0; j < numOutputNodes; j++) { hiddenToOutputWeights[i][j] = random.nextDouble() - 0.5; } hiddenBiases[i] = random.nextDouble() - 0.5; } for (int i = 0; i < numOutputNodes; i++) { outputBiases[i] = random.nextDouble() - 0.5; } } public double relu(double x) { return Math.max(0, x); } public double reluDerivative(double x) { return x > 0 ? 1 : 0; } public void train(double[][] trainingInputs, double[] trainingTargets) { for (int epoch = 1; epoch <= numEpochs; epoch++) { double totalError = 0.0; for (int i = 0; i < trainingInputs.length; i++) { if (trainingInputs[i][0] != 241 && trainingInputs[i][0] != 251 && trainingInputs[i][0] != 239) { // Check if the first element is not 251 double[] input = trainingInputs[i]; double target = trainingTargets[i]; // Forward propagation double[] hiddenOutputs = new double[numHiddenNodes]; for (int j = 0; j < numHiddenNodes; j++) { double weightedSum = 0.0; for (int k = 0; k < numInputNodes; k++) { weightedSum += inputToHiddenWeights[k][j] * input[k]; } hiddenOutputs[j] = relu(weightedSum + hiddenBiases[j]); } double output = 0.0; for (int j = 0; j < numOutputNodes; j++) { double weightedSum = 0.0; for (int k = 0; k < numHiddenNodes; k++) { weightedSum += hiddenToOutputWeights[k][j] * hiddenOutputs[k]; } output = relu(weightedSum + outputBiases[j]); } // Backward propagation double outputErrorGradient = (output - target) * reluDerivative(output); for (int j = 0; j < numHiddenNodes; j++) { double hiddenErrorGradient = outputErrorGradient * hiddenToOutputWeights[j][0] * reluDerivative(hiddenOutputs[j]); for (int k = 0; k < numInputNodes; k++) { inputToHiddenWeights[k][j] -= learningRate * input[k] * hiddenErrorGradient; } hiddenBiases[j] -= learningRate * hiddenErrorGradient; } hiddenToOutputWeights[0][0] -= learningRate * hiddenOutputs[0] * outputErrorGradient; outputBiases[0] -= learningRate * outputErrorGradient; // Update total error totalError += Math.pow(output - target, 2); }} // Calculate mean error and check for convergence double meanError = totalError / trainingInputs.length; if (meanError < errorThreshold) { System.out.println("Training complete. Mean error: " + meanError); break; } else if (epoch % 10000 == 0) { System.out.println("Epoch " + epoch + ". Mean error: " + meanError); } } } public double predict(double[] input) { double[] hiddenOutputs = new double[numHiddenNodes]; for (int j = 0; j < numHiddenNodes; j++) { double weightedSum = 0.0; for (int k = 0; k < numInputNodes; k++) { weightedSum += inputToHiddenWeights[k][j] * input[k]; } hiddenOutputs[j] = relu(weightedSum + hiddenBiases[j]); } double output = 0.0; for (int j = 0; j < numOutputNodes; j++) { double weightedSum = 0.0; for (int k = 0; k < numHiddenNodes; k++) { weightedSum += hiddenToOutputWeights[k][j] * hiddenOutputs[k]; } output = relu(weightedSum + outputBiases[j]); } return output; } public static void main(String[] args) { // Example usage of the neural network double[][] trainingInputs = {{0, 0, 0,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 0 }; Multiof3 nn = new Multiof3(); nn.train(trainingInputs, trainingTargets); System.out.println("Prediction for [0, 0, 0, 0, 0, 0, 0, 0]: " + nn.predict(new double[]{0, 0, 0, 0, 0, 0, 0, 0})); System.out.println("Prediction for [0, 0, 0, 0, 0, 0, 0, 1]: " + nn.predict(new double[]{0, 0, 0, 0, 0, 0, 0, 1})); System.out.println("Prediction for [0, 0, 0, 0, 0, 0, 1, 0]: " + nn.predict(new double[]{0, 0, 0, 0, 0, 0, 1, 0})); System.out.println("Prediction for [0, 0, 0, 0, 0, 0, 1, 1]: " + nn.predict(new double[]{0, 0, 0, 0, 0, 0, 1, 1})); System.out.println("Prediction for [0, 0, 0, 0, 0, 1, 0, 0]: " + nn.predict(new double[]{0, 0, 0, 0, 0, 1, 0, 0})); System.out.println("Prediction for [0, 0, 0, 0, 0, 1, 0, 1]: " + nn.predict(new double[]{0, 0, 0, 0, 0, 1, 0, 1})); System.out.println("Prediction for [0, 0, 0, 0, 0, 1, 1, 0]: " + nn.predict(new double[]{0, 0, 0, 0, 0, 1, 1, 0})); System.out.println("Prediction for [0, 0, 0, 0, 0, 1, 1, 1]: " + nn.predict(new double[]{0, 0, 0, 0, 0, 1, 1, 1})); System.out.println("Prediction for [0, 0, 0, 0, 1, 0, 0, 0]: " + nn.predict(new double[]{0, 0, 0, 0, 1, 0, 0, 0})); System.out.println("Prediction for [0, 0, 0, 0, 1, 0, 0, 1]: " + nn.predict(new double[]{0, 0, 0, 0, 1, 0, 0, 1})); System.out.println("Prediction for [0, 0, 0, 0, 1, 0, 1, 0]: " + nn.predict(new double[]{0, 0, 0, 0, 1, 0, 1, 0})); System.out.println("Prediction for [0, 0, 0, 0, 1, 0, 1, 1]: " + nn.predict(new double[]{0, 0, 0, 0, 1, 0, 1, 1})); System.out.println("Prediction for [0, 0, 0, 0, 1, 1, 0, 0]: " + nn.predict(new double[]{0, 0, 0, 0, 1, 1, 0, 0})); System.out.println("Prediction for [0, 0, 0, 0, 1, 1, 0, 1]: " + nn.predict(new double[]{0, 0, 0, 0, 1, 1, 0, 1})); System.out.println("Prediction for [0, 0, 0, 0, 1, 1, 1, 0]: " + nn.predict(new double[]{0, 0, 0, 0, 1, 1, 1, 0})); System.out.println("Prediction for [0, 0, 0, 0, 1, 1, 1, 1]: " + nn.predict(new double[]{0, 0, 0, 0, 1, 1, 1, 1})); System.out.println("Prediction for [0, 0, 0, 1, 0, 0, 0, 0]: " + nn.predict(new double[]{0, 0, 0, 1, 0, 0, 0, 0})); System.out.println("Prediction for [0, 0, 0, 1, 0, 0, 0, 1]: " + nn.predict(new double[]{0, 0, 0, 1, 0, 0, 0, 1})); System.out.println("Prediction for [0, 0, 0, 1, 0, 0, 1, 0]: " + nn.predict(new double[]{0, 0, 0, 1, 0, 0, 1, 0})); System.out.println("Prediction for [0, 0, 0, 1, 0, 0, 1, 1]: " + nn.predict(new double[]{0, 0, 0, 1, 0, 0, 1, 1})); System.out.println("Prediction for [0, 0, 0, 1, 0, 1, 0, 0]: " + nn.predict(new double[]{0, 0, 0, 1, 0, 1, 0, 0})); System.out.println("Prediction for [0, 0, 0, 1, 0, 1, 0, 1]: " + nn.predict(new double[]{0, 0, 0, 1, 0, 1, 0, 1})); System.out.println("Prediction for [0, 0, 0, 1, 0, 1, 1, 0]: " + nn.predict(new double[]{0, 0, 0, 1, 0, 1, 1, 0})); System.out.println("Prediction for [0, 0, 0, 1, 0, 1, 1, 1]: " + nn.predict(new double[]{0, 0, 0, 1, 0, 1, 1, 1})); System.out.println("Prediction for [0, 0, 0, 1, 1, 0, 0, 0]: " + nn.predict(new double[]{0, 0, 0, 1, 1, 0, 0, 0})); System.out.println("Prediction for [0, 0, 0, 1, 1, 0, 0, 1]: " + nn.predict(new double[]{0, 0, 0, 1, 1, 0, 0, 1})); System.out.println("Prediction for [0, 0, 0, 1, 1, 0, 1, 0]: " + nn.predict(new double[]{0, 0, 0, 1, 1, 0, 1, 0})); System.out.println("Prediction for [0, 0, 0, 1, 1, 0, 1, 1]: " + nn.predict(new double[]{0, 0, 0, 1, 1, 0, 1, 1})); System.out.println("Prediction for [0, 0, 0, 1, 1, 1, 0, 0]: " + nn.predict(new double[]{0, 0, 0, 1, 1, 1, 0, 0})); System.out.println("Prediction for [0, 0, 0, 1, 1, 1, 0, 1]: " + nn.predict(new double[]{0, 0, 0, 1, 1, 1, 0, 1})); System.out.println("Prediction for [0, 0, 0, 1, 1, 1, 1, 0]: " + nn.predict(new double[]{0, 0, 0, 1, 1, 1, 1, 0})); System.out.println("Prediction for [0, 0, 0, 1, 1, 1, 1, 1]: " + nn.predict(new double[]{0, 0, 0, 1, 1, 1, 1, 1})); System.out.println("Prediction for [0, 0, 1, 0, 0, 0, 0, 0]: " + nn.predict(new double[]{0, 0, 1, 0, 0, 0, 0, 0})); System.out.println("Prediction for [0, 0, 1, 0, 0, 0, 0, 1]: " + nn.predict(new double[]{0, 0, 1, 0, 0, 0, 0, 1})); System.out.println("Prediction for [0, 0, 1, 0, 0, 0, 1, 0]: " + nn.predict(new double[]{0, 0, 1, 0, 0, 0, 1, 0})); System.out.println("Prediction for [0, 0, 1, 0, 0, 0, 1, 1]: " + nn.predict(new double[]{0, 0, 1, 0, 0, 0, 1, 1})); System.out.println("Prediction for [0, 0, 1, 0, 0, 1, 0, 0]: " + nn.predict(new double[]{0, 0, 1, 0, 0, 1, 0, 0})); System.out.println("Prediction for [0, 0, 1, 0, 0, 1, 0, 1]: " + nn.predict(new double[]{0, 0, 1, 0, 0, 1, 0, 1})); System.out.println("Prediction for [0, 0, 1, 0, 0, 1, 1, 0]: " + nn.predict(new double[]{0, 0, 1, 0, 0, 1, 1, 0})); System.out.println("Prediction for [0, 0, 1, 0, 0, 1, 1, 1]: " + nn.predict(new double[]{0, 0, 1, 0, 0, 1, 1, 1})); System.out.println("Prediction for [0, 0, 1, 0, 1, 0, 0, 0]: " + nn.predict(new double[]{0, 0, 1, 0, 1, 0, 0, 0})); System.out.println("Prediction for [0, 0, 1, 0, 1, 0, 0, 1]: " + nn.predict(new double[]{0, 0, 1, 0, 1, 0, 0, 1})); System.out.println("Prediction for [0, 0, 1, 0, 1, 0, 1, 0]: " + nn.predict(new double[]{0, 0, 1, 0, 1, 0, 1, 0})); System.out.println("Prediction for [0, 0, 1, 0, 1, 0, 1, 1]: " + nn.predict(new double[]{0, 0, 1, 0, 1, 0, 1, 1})); System.out.println("Prediction for [0, 0, 1, 0, 1, 1, 0, 0]: " + nn.predict(new double[]{0, 0, 1, 0, 1, 1, 0, 0})); System.out.println("Prediction for [0, 0, 1, 0, 1, 1, 0, 1]: " + nn.predict(new double[]{0, 0, 1, 0, 1, 1, 0, 1})); System.out.println("Prediction for [0, 0, 1, 0, 1, 1, 1, 0]: " + nn.predict(new double[]{0, 0, 1, 0, 1, 1, 1, 0})); System.out.println("Prediction for [0, 0, 1, 0, 1, 1, 1, 1]: " + nn.predict(new double[]{0, 0, 1, 0, 1, 1, 1, 1})); System.out.println("Prediction for [0, 0, 1, 1, 0, 0, 0, 0]: " + nn.predict(new double[]{0, 0, 1, 1, 0, 0, 0, 0})); System.out.println("Prediction for [0, 0, 1, 1, 0, 0, 0, 1]: " + nn.predict(new double[]{0, 0, 1, 1, 0, 0, 0, 1})); System.out.println("Prediction for [0, 0, 1, 1, 0, 0, 1, 0]: " + nn.predict(new double[]{0, 0, 1, 1, 0, 0, 1, 0})); System.out.println("Prediction for [0, 0, 1, 1, 0, 0, 1, 1]: " + nn.predict(new double[]{0, 0, 1, 1, 0, 0, 1, 1})); System.out.println("Prediction for [0, 0, 1, 1, 0, 1, 0, 0]: " + nn.predict(new double[]{0, 0, 1, 1, 0, 1, 0, 0})); System.out.println("Prediction for [0, 0, 1, 1, 0, 1, 0, 1]: " + nn.predict(new double[]{0, 0, 1, 1, 0, 1, 0, 1})); System.out.println("Prediction for [0, 0, 1, 1, 0, 1, 1, 0]: " + nn.predict(new double[]{0, 0, 1, 1, 0, 1, 1, 0})); System.out.println("Prediction for [0, 0, 1, 1, 0, 1, 1, 1]: " + nn.predict(new double[]{0, 0, 1, 1, 0, 1, 1, 1})); System.out.println("Prediction for [0, 0, 1, 1, 1, 0, 0, 0]: " + nn.predict(new double[]{0, 0, 1, 1, 1, 0, 0, 0})); System.out.println("Prediction for [0, 0, 1, 1, 1, 0, 0, 1]: " + nn.predict(new double[]{0, 0, 1, 1, 1, 0, 0, 1})); System.out.println("Prediction for [0, 0, 1, 1, 1, 0, 1, 0]: " + nn.predict(new double[]{0, 0, 1, 1, 1, 0, 1, 0})); System.out.println("Prediction for [0, 0, 1, 1, 1, 0, 1, 1]: " + nn.predict(new double[]{0, 0, 1, 1, 1, 0, 1, 1})); System.out.println("Prediction for [0, 0, 1, 1, 1, 1, 0, 0]: " + nn.predict(new double[]{0, 0, 1, 1, 1, 1, 0, 0})); System.out.println("Prediction for [0, 0, 1, 1, 1, 1, 0, 1]: " + nn.predict(new double[]{0, 0, 1, 1, 1, 1, 0, 1})); System.out.println("Prediction for [0, 0, 1, 1, 1, 1, 1, 0]: " + nn.predict(new double[]{0, 0, 1, 1, 1, 1, 1, 0})); System.out.println("Prediction for [0, 0, 1, 1, 1, 1, 1, 1]: " + nn.predict(new double[]{0, 0, 1, 1, 1, 1, 1, 1})); System.out.println("Prediction for [0, 1, 0, 0, 0, 0, 0, 0]: " + nn.predict(new double[]{0, 1, 0, 0, 0, 0, 0, 0})); System.out.println("Prediction for [0, 1, 0, 0, 0, 0, 0, 1]: " + nn.predict(new double[]{0, 1, 0, 0, 0, 0, 0, 1})); System.out.println("Prediction for [0, 1, 0, 0, 0, 0, 1, 0]: " + nn.predict(new double[]{0, 1, 0, 0, 0, 0, 1, 0})); System.out.println("Prediction for [0, 1, 0, 0, 0, 0, 1, 1]: " + nn.predict(new double[]{0, 1, 0, 0, 0, 0, 1, 1})); System.out.println("Prediction for [0, 1, 0, 0, 0, 1, 0, 0]: " + nn.predict(new double[]{0, 1, 0, 0, 0, 1, 0, 0})); System.out.println("Prediction for [0, 1, 0, 0, 0, 1, 0, 1]: " + nn.predict(new double[]{0, 1, 0, 0, 0, 1, 0, 1})); System.out.println("Prediction for [0, 1, 0, 0, 0, 1, 1, 0]: " + nn.predict(new double[]{0, 1, 0, 0, 0, 1, 1, 0})); System.out.println("Prediction for [0, 1, 0, 0, 0, 1, 1, 1]: " + nn.predict(new double[]{0, 1, 0, 0, 0, 1, 1, 1})); System.out.println("Prediction for [0, 1, 0, 0, 1, 0, 0, 0]: " + nn.predict(new double[]{0, 1, 0, 0, 1, 0, 0, 0})); System.out.println("Prediction for [0, 1, 0, 0, 1, 0, 0, 1]: " + nn.predict(new double[]{0, 1, 0, 0, 1, 0, 0, 1})); System.out.println("Prediction for [0, 1, 0, 0, 1, 0, 1, 0]: " + nn.predict(new double[]{0, 1, 0, 0, 1, 0, 1, 0})); System.out.println("Prediction for [0, 1, 0, 0, 1, 0, 1, 1]: " + nn.predict(new double[]{0, 1, 0, 0, 1, 0, 1, 1})); System.out.println("Prediction for [0, 1, 0, 0, 1, 1, 0, 0]: " + nn.predict(new double[]{0, 1, 0, 0, 1, 1, 0, 0})); System.out.println("Prediction for [0, 1, 0, 0, 1, 1, 0, 1]: " + nn.predict(new double[]{0, 1, 0, 0, 1, 1, 0, 1})); System.out.println("Prediction for [0, 1, 0, 0, 1, 1, 1, 0]: " + nn.predict(new double[]{0, 1, 0, 0, 1, 1, 1, 0})); System.out.println("Prediction for [0, 1, 0, 0, 1, 1, 1, 1]: " + nn.predict(new double[]{0, 1, 0, 0, 1, 1, 1, 1})); System.out.println("Prediction for [0, 1, 0, 1, 0, 0, 0, 0]: " + nn.predict(new double[]{0, 1, 0, 1, 0, 0, 0, 0})); System.out.println("Prediction for [0, 1, 0, 1, 0, 0, 0, 1]: " + nn.predict(new double[]{0, 1, 0, 1, 0, 0, 0, 1})); System.out.println("Prediction for [0, 1, 0, 1, 0, 0, 1, 0]: " + nn.predict(new double[]{0, 1, 0, 1, 0, 0, 1, 0})); System.out.println("Prediction for [0, 1, 0, 1, 0, 0, 1, 1]: " + nn.predict(new double[]{0, 1, 0, 1, 0, 0, 1, 1})); System.out.println("Prediction for [0, 1, 0, 1, 0, 1, 0, 0]: " + nn.predict(new double[]{0, 1, 0, 1, 0, 1, 0, 0})); System.out.println("Prediction for [0, 1, 0, 1, 0, 1, 0, 1]: " + nn.predict(new double[]{0, 1, 0, 1, 0, 1, 0, 1})); System.out.println("Prediction for [0, 1, 0, 1, 0, 1, 1, 0]: " + nn.predict(new double[]{0, 1, 0, 1, 0, 1, 1, 0})); System.out.println("Prediction for [0, 1, 0, 1, 0, 1, 1, 1]: " + nn.predict(new double[]{0, 1, 0, 1, 0, 1, 1, 1})); System.out.println("Prediction for [0, 1, 0, 1, 1, 0, 0, 0]: " + nn.predict(new double[]{0, 1, 0, 1, 1, 0, 0, 0})); System.out.println("Prediction for [0, 1, 0, 1, 1, 0, 0, 1]: " + nn.predict(new double[]{0, 1, 0, 1, 1, 0, 0, 1})); System.out.println("Prediction for [0, 1, 0, 1, 1, 0, 1, 0]: " + nn.predict(new double[]{0, 1, 0, 1, 1, 0, 1, 0})); System.out.println("Prediction for [0, 1, 0, 1, 1, 0, 1, 1]: " + nn.predict(new double[]{0, 1, 0, 1, 1, 0, 1, 1})); System.out.println("Prediction for [0, 1, 0, 1, 1, 1, 0, 0]: " + nn.predict(new double[]{0, 1, 0, 1, 1, 1, 0, 0})); System.out.println("Prediction for [0, 1, 0, 1, 1, 1, 0, 1]: " + nn.predict(new double[]{0, 1, 0, 1, 1, 1, 0, 1})); System.out.println("Prediction for [0, 1, 0, 1, 1, 1, 1, 0]: " + nn.predict(new double[]{0, 1, 0, 1, 1, 1, 1, 0})); System.out.println("Prediction for [0, 1, 0, 1, 1, 1, 1, 1]: " + nn.predict(new double[]{0, 1, 0, 1, 1, 1, 1, 1})); System.out.println("Prediction for [0, 1, 1, 0, 0, 0, 0, 0]: " + nn.predict(new double[]{0, 1, 1, 0, 0, 0, 0, 0})); System.out.println("Prediction for [0, 1, 1, 0, 0, 0, 0, 1]: " + nn.predict(new double[]{0, 1, 1, 0, 0, 0, 0, 1})); System.out.println("Prediction for [0, 1, 1, 0, 0, 0, 1, 0]: " + nn.predict(new double[]{0, 1, 1, 0, 0, 0, 1, 0})); System.out.println("Prediction for [0, 1, 1, 0, 0, 0, 1, 1]: " + nn.predict(new double[]{0, 1, 1, 0, 0, 0, 1, 1})); System.out.println("Prediction for [0, 1, 1, 0, 0, 1, 0, 0]: " + nn.predict(new double[]{0, 1, 1, 0, 0, 1, 0, 0})); System.out.println("Prediction for [0, 1, 1, 0, 0, 1, 0, 1]: " + nn.predict(new double[]{0, 1, 1, 0, 0, 1, 0, 1})); System.out.println("Prediction for [0, 1, 1, 0, 0, 1, 1, 0]: " + nn.predict(new double[]{0, 1, 1, 0, 0, 1, 1, 0})); System.out.println("Prediction for [0, 1, 1, 0, 0, 1, 1, 1]: " + nn.predict(new double[]{0, 1, 1, 0, 0, 1, 1, 1})); System.out.println("Prediction for [0, 1, 1, 0, 1, 0, 0, 0]: " + nn.predict(new double[]{0, 1, 1, 0, 1, 0, 0, 0})); System.out.println("Prediction for [0, 1, 1, 0, 1, 0, 0, 1]: " + nn.predict(new double[]{0, 1, 1, 0, 1, 0, 0, 1})); System.out.println("Prediction for [0, 1, 1, 0, 1, 0, 1, 0]: " + nn.predict(new double[]{0, 1, 1, 0, 1, 0, 1, 0})); System.out.println("Prediction for [0, 1, 1, 0, 1, 0, 1, 1]: " + nn.predict(new double[]{0, 1, 1, 0, 1, 0, 1, 1})); System.out.println("Prediction for [0, 1, 1, 0, 1, 1, 0, 0]: " + nn.predict(new double[]{0, 1, 1, 0, 1, 1, 0, 0})); System.out.println("Prediction for [0, 1, 1, 0, 1, 1, 0, 1]: " + nn.predict(new double[]{0, 1, 1, 0, 1, 1, 0, 1})); System.out.println("Prediction for [0, 1, 1, 0, 1, 1, 1, 0]: " + nn.predict(new double[]{0, 1, 1, 0, 1, 1, 1, 0})); System.out.println("Prediction for [0, 1, 1, 0, 1, 1, 1, 1]: " + nn.predict(new double[]{0, 1, 1, 0, 1, 1, 1, 1})); System.out.println("Prediction for [0, 1, 1, 1, 0, 0, 0, 0]: " + nn.predict(new double[]{0, 1, 1, 1, 0, 0, 0, 0})); System.out.println("Prediction for [0, 1, 1, 1, 0, 0, 0, 1]: " + nn.predict(new double[]{0, 1, 1, 1, 0, 0, 0, 1})); System.out.println("Prediction for [0, 1, 1, 1, 0, 0, 1, 0]: " + nn.predict(new double[]{0, 1, 1, 1, 0, 0, 1, 0})); System.out.println("Prediction for [0, 1, 1, 1, 0, 0, 1, 1]: " + nn.predict(new double[]{0, 1, 1, 1, 0, 0, 1, 1})); System.out.println("Prediction for [0, 1, 1, 1, 0, 1, 0, 0]: " + nn.predict(new double[]{0, 1, 1, 1, 0, 1, 0, 0})); System.out.println("Prediction for [0, 1, 1, 1, 0, 1, 0, 1]: " + nn.predict(new double[]{0, 1, 1, 1, 0, 1, 0, 1})); System.out.println("Prediction for [0, 1, 1, 1, 0, 1, 1, 0]: " + nn.predict(new double[]{0, 1, 1, 1, 0, 1, 1, 0})); System.out.println("Prediction for [0, 1, 1, 1, 0, 1, 1, 1]: " + nn.predict(new double[]{0, 1, 1, 1, 0, 1, 1, 1})); System.out.println("Prediction for [0, 1, 1, 1, 1, 0, 0, 0]: " + nn.predict(new double[]{0, 1, 1, 1, 1, 0, 0, 0})); System.out.println("Prediction for [0, 1, 1, 1, 1, 0, 0, 1]: " + nn.predict(new double[]{0, 1, 1, 1, 1, 0, 0, 1})); System.out.println("Prediction for [0, 1, 1, 1, 1, 0, 1, 0]: " + nn.predict(new double[]{0, 1, 1, 1, 1, 0, 1, 0})); System.out.println("Prediction for [0, 1, 1, 1, 1, 0, 1, 1]: " + nn.predict(new double[]{0, 1, 1, 1, 1, 0, 1, 1})); System.out.println("Prediction for [0, 1, 1, 1, 1, 1, 0, 0]: " + nn.predict(new double[]{0, 1, 1, 1, 1, 1, 0, 0})); System.out.println("Prediction for [0, 1, 1, 1, 1, 1, 0, 1]: " + nn.predict(new double[]{0, 1, 1, 1, 1, 1, 0, 1})); System.out.println("Prediction for [0, 1, 1, 1, 1, 1, 1, 0]: " + nn.predict(new double[]{0, 1, 1, 1, 1, 1, 1, 0})); System.out.println("Prediction for [0, 1, 1, 1, 1, 1, 1, 1]: " + nn.predict(new double[]{0, 1, 1, 1, 1, 1, 1, 1})); System.out.println("Prediction for [1, 0, 0, 0, 0, 0, 0, 0]: " + nn.predict(new double[]{1, 0, 0, 0, 0, 0, 0, 0})); System.out.println("Prediction for [1, 0, 0, 0, 0, 0, 0, 1]: " + nn.predict(new double[]{1, 0, 0, 0, 0, 0, 0, 1})); System.out.println("Prediction for [1, 0, 0, 0, 0, 0, 1, 0]: " + nn.predict(new double[]{1, 0, 0, 0, 0, 0, 1, 0})); System.out.println("Prediction for [1, 0, 0, 0, 0, 0, 1, 1]: " + nn.predict(new double[]{1, 0, 0, 0, 0, 0, 1, 1})); System.out.println("Prediction for [1, 0, 0, 0, 0, 1, 0, 0]: " + nn.predict(new double[]{1, 0, 0, 0, 0, 1, 0, 0})); System.out.println("Prediction for [1, 0, 0, 0, 0, 1, 0, 1]: " + nn.predict(new double[]{1, 0, 0, 0, 0, 1, 0, 1})); System.out.println("Prediction for [1, 0, 0, 0, 0, 1, 1, 0]: " + nn.predict(new double[]{1, 0, 0, 0, 0, 1, 1, 0})); System.out.println("Prediction for [1, 0, 0, 0, 0, 1, 1, 1]: " + nn.predict(new double[]{1, 0, 0, 0, 0, 1, 1, 1})); System.out.println("Prediction for [1, 0, 0, 0, 1, 0, 0, 0]: " + nn.predict(new double[]{1, 0, 0, 0, 1, 0, 0, 0})); System.out.println("Prediction for [1, 0, 0, 0, 1, 0, 0, 1]: " + nn.predict(new double[]{1, 0, 0, 0, 1, 0, 0, 1})); System.out.println("Prediction for [1, 0, 0, 0, 1, 0, 1, 0]: " + nn.predict(new double[]{1, 0, 0, 0, 1, 0, 1, 0})); System.out.println("Prediction for [1, 0, 0, 0, 1, 0, 1, 1]: " + nn.predict(new double[]{1, 0, 0, 0, 1, 0, 1, 1})); System.out.println("Prediction for [1, 0, 0, 0, 1, 1, 0, 0]: " + nn.predict(new double[]{1, 0, 0, 0, 1, 1, 0, 0})); System.out.println("Prediction for [1, 0, 0, 0, 1, 1, 0, 1]: " + nn.predict(new double[]{1, 0, 0, 0, 1, 1, 0, 1})); System.out.println("Prediction for [1, 0, 0, 0, 1, 1, 1, 0]: " + nn.predict(new double[]{1, 0, 0, 0, 1, 1, 1, 0})); System.out.println("Prediction for [1, 0, 0, 0, 1, 1, 1, 1]: " + nn.predict(new double[]{1, 0, 0, 0, 1, 1, 1, 1})); System.out.println("Prediction for [1, 0, 0, 1, 0, 0, 0, 0]: " + nn.predict(new double[]{1, 0, 0, 1, 0, 0, 0, 0})); System.out.println("Prediction for [1, 0, 0, 1, 0, 0, 0, 1]: " + nn.predict(new double[]{1, 0, 0, 1, 0, 0, 0, 1})); System.out.println("Prediction for [1, 0, 0, 1, 0, 0, 1, 0]: " + nn.predict(new double[]{1, 0, 0, 1, 0, 0, 1, 0})); System.out.println("Prediction for [1, 0, 0, 1, 0, 0, 1, 1]: " + nn.predict(new double[]{1, 0, 0, 1, 0, 0, 1, 1})); System.out.println("Prediction for [1, 0, 0, 1, 0, 1, 0, 0]: " + nn.predict(new double[]{1, 0, 0, 1, 0, 1, 0, 0})); System.out.println("Prediction for [1, 0, 0, 1, 0, 1, 0, 1]: " + nn.predict(new double[]{1, 0, 0, 1, 0, 1, 0, 1})); System.out.println("Prediction for [1, 0, 0, 1, 0, 1, 1, 0]: " + nn.predict(new double[]{1, 0, 0, 1, 0, 1, 1, 0})); System.out.println("Prediction for [1, 0, 0, 1, 0, 1, 1, 1]: " + nn.predict(new double[]{1, 0, 0, 1, 0, 1, 1, 1})); System.out.println("Prediction for [1, 0, 0, 1, 1, 0, 0, 0]: " + nn.predict(new double[]{1, 0, 0, 1, 1, 0, 0, 0})); System.out.println("Prediction for [1, 0, 0, 1, 1, 0, 0, 1]: " + nn.predict(new double[]{1, 0, 0, 1, 1, 0, 0, 1})); System.out.println("Prediction for [1, 0, 0, 1, 1, 0, 1, 0]: " + nn.predict(new double[]{1, 0, 0, 1, 1, 0, 1, 0})); System.out.println("Prediction for [1, 0, 0, 1, 1, 0, 1, 1]: " + nn.predict(new double[]{1, 0, 0, 1, 1, 0, 1, 1})); System.out.println("Prediction for [1, 0, 0, 1, 1, 1, 0, 0]: " + nn.predict(new double[]{1, 0, 0, 1, 1, 1, 0, 0})); System.out.println("Prediction for [1, 0, 0, 1, 1, 1, 0, 1]: " + nn.predict(new double[]{1, 0, 0, 1, 1, 1, 0, 1})); System.out.println("Prediction for [1, 0, 0, 1, 1, 1, 1, 0]: " + nn.predict(new double[]{1, 0, 0, 1, 1, 1, 1, 0})); System.out.println("Prediction for [1, 0, 0, 1, 1, 1, 1, 1]: " + nn.predict(new double[]{1, 0, 0, 1, 1, 1, 1, 1})); System.out.println("Prediction for [1, 0, 1, 0, 0, 0, 0, 0]: " + nn.predict(new double[]{1, 0, 1, 0, 0, 0, 0, 0})); System.out.println("Prediction for [1, 0, 1, 0, 0, 0, 0, 1]: " + nn.predict(new double[]{1, 0, 1, 0, 0, 0, 0, 1})); System.out.println("Prediction for [1, 0, 1, 0, 0, 0, 1, 0]: " + nn.predict(new double[]{1, 0, 1, 0, 0, 0, 1, 0})); System.out.println("Prediction for [1, 0, 1, 0, 0, 0, 1, 1]: " + nn.predict(new double[]{1, 0, 1, 0, 0, 0, 1, 1})); System.out.println("Prediction for [1, 0, 1, 0, 0, 1, 0, 0]: " + nn.predict(new double[]{1, 0, 1, 0, 0, 1, 0, 0})); System.out.println("Prediction for [1, 0, 1, 0, 0, 1, 0, 1]: " + nn.predict(new double[]{1, 0, 1, 0, 0, 1, 0, 1})); System.out.println("Prediction for [1, 0, 1, 0, 0, 1, 1, 0]: " + nn.predict(new double[]{1, 0, 1, 0, 0, 1, 1, 0})); System.out.println("Prediction for [1, 0, 1, 0, 0, 1, 1, 1]: " + nn.predict(new double[]{1, 0, 1, 0, 0, 1, 1, 1})); System.out.println("Prediction for [1, 0, 1, 0, 1, 0, 0, 0]: " + nn.predict(new double[]{1, 0, 1, 0, 1, 0, 0, 0})); System.out.println("Prediction for [1, 0, 1, 0, 1, 0, 0, 1]: " + nn.predict(new double[]{1, 0, 1, 0, 1, 0, 0, 1})); System.out.println("Prediction for [1, 0, 1, 0, 1, 0, 1, 0]: " + nn.predict(new double[]{1, 0, 1, 0, 1, 0, 1, 0})); System.out.println("Prediction for [1, 0, 1, 0, 1, 0, 1, 1]: " + nn.predict(new double[]{1, 0, 1, 0, 1, 0, 1, 1})); System.out.println("Prediction for [1, 0, 1, 0, 1, 1, 0, 0]: " + nn.predict(new double[]{1, 0, 1, 0, 1, 1, 0, 0})); System.out.println("Prediction for [1, 0, 1, 0, 1, 1, 0, 1]: " + nn.predict(new double[]{1, 0, 1, 0, 1, 1, 0, 1})); System.out.println("Prediction for [1, 0, 1, 0, 1, 1, 1, 0]: " + nn.predict(new double[]{1, 0, 1, 0, 1, 1, 1, 0})); System.out.println("Prediction for [1, 0, 1, 0, 1, 1, 1, 1]: " + nn.predict(new double[]{1, 0, 1, 0, 1, 1, 1, 1})); System.out.println("Prediction for [1, 0, 1, 1, 0, 0, 0, 0]: " + nn.predict(new double[]{1, 0, 1, 1, 0, 0, 0, 0})); System.out.println("Prediction for [1, 0, 1, 1, 0, 0, 0, 1]: " + nn.predict(new double[]{1, 0, 1, 1, 0, 0, 0, 1})); System.out.println("Prediction for [1, 0, 1, 1, 0, 0, 1, 0]: " + nn.predict(new double[]{1, 0, 1, 1, 0, 0, 1, 0})); System.out.println("Prediction for [1, 0, 1, 1, 0, 0, 1, 1]: " + nn.predict(new double[]{1, 0, 1, 1, 0, 0, 1, 1})); System.out.println("Prediction for [1, 0, 1, 1, 0, 1, 0, 0]: " + nn.predict(new double[]{1, 0, 1, 1, 0, 1, 0, 0})); System.out.println("Prediction for [1, 0, 1, 1, 0, 1, 0, 1]: " + nn.predict(new double[]{1, 0, 1, 1, 0, 1, 0, 1})); System.out.println("Prediction for [1, 0, 1, 1, 0, 1, 1, 0]: " + nn.predict(new double[]{1, 0, 1, 1, 0, 1, 1, 0})); System.out.println("Prediction for [1, 0, 1, 1, 0, 1, 1, 1]: " + nn.predict(new double[]{1, 0, 1, 1, 0, 1, 1, 1})); System.out.println("Prediction for [1, 0, 1, 1, 1, 0, 0, 0]: " + nn.predict(new double[]{1, 0, 1, 1, 1, 0, 0, 0})); System.out.println("Prediction for [1, 0, 1, 1, 1, 0, 0, 1]: " + nn.predict(new double[]{1, 0, 1, 1, 1, 0, 0, 1})); System.out.println("Prediction for [1, 0, 1, 1, 1, 0, 1, 0]: " + nn.predict(new double[]{1, 0, 1, 1, 1, 0, 1, 0})); System.out.println("Prediction for [1, 0, 1, 1, 1, 0, 1, 1]: " + nn.predict(new double[]{1, 0, 1, 1, 1, 0, 1, 1})); System.out.println("Prediction for [1, 0, 1, 1, 1, 1, 0, 0]: " + nn.predict(new double[]{1, 0, 1, 1, 1, 1, 0, 0})); System.out.println("Prediction for [1, 0, 1, 1, 1, 1, 0, 1]: " + nn.predict(new double[]{1, 0, 1, 1, 1, 1, 0, 1})); System.out.println("Prediction for [1, 0, 1, 1, 1, 1, 1, 0]: " + nn.predict(new double[]{1, 0, 1, 1, 1, 1, 1, 0})); System.out.println("Prediction for [1, 0, 1, 1, 1, 1, 1, 1]: " + nn.predict(new double[]{1, 0, 1, 1, 1, 1, 1, 1})); System.out.println("Prediction for [1, 1, 0, 0, 0, 0, 0, 0]: " + nn.predict(new double[]{1, 1, 0, 0, 0, 0, 0, 0})); System.out.println("Prediction for [1, 1, 0, 0, 0, 0, 0, 1]: " + nn.predict(new double[]{1, 1, 0, 0, 0, 0, 0, 1})); System.out.println("Prediction for [1, 1, 0, 0, 0, 0, 1, 0]: " + nn.predict(new double[]{1, 1, 0, 0, 0, 0, 1, 0})); System.out.println("Prediction for [1, 1, 0, 0, 0, 0, 1, 1]: " + nn.predict(new double[]{1, 1, 0, 0, 0, 0, 1, 1})); System.out.println("Prediction for [1, 1, 0, 0, 0, 1, 0, 0]: " + nn.predict(new double[]{1, 1, 0, 0, 0, 1, 0, 0})); System.out.println("Prediction for [1, 1, 0, 0, 0, 1, 0, 1]: " + nn.predict(new double[]{1, 1, 0, 0, 0, 1, 0, 1})); System.out.println("Prediction for [1, 1, 0, 0, 0, 1, 1, 0]: " + nn.predict(new double[]{1, 1, 0, 0, 0, 1, 1, 0})); System.out.println("Prediction for [1, 1, 0, 0, 0, 1, 1, 1]: " + nn.predict(new double[]{1, 1, 0, 0, 0, 1, 1, 1})); System.out.println("Prediction for [1, 1, 0, 0, 1, 0, 0, 0]: " + nn.predict(new double[]{1, 1, 0, 0, 1, 0, 0, 0})); System.out.println("Prediction for [1, 1, 0, 0, 1, 0, 0, 1]: " + nn.predict(new double[]{1, 1, 0, 0, 1, 0, 0, 1})); System.out.println("Prediction for [1, 1, 0, 0, 1, 0, 1, 0]: " + nn.predict(new double[]{1, 1, 0, 0, 1, 0, 1, 0})); System.out.println("Prediction for [1, 1, 0, 0, 1, 0, 1, 1]: " + nn.predict(new double[]{1, 1, 0, 0, 1, 0, 1, 1})); System.out.println("Prediction for [1, 1, 0, 0, 1, 1, 0, 0]: " + nn.predict(new double[]{1, 1, 0, 0, 1, 1, 0, 0})); System.out.println("Prediction for [1, 1, 0, 0, 1, 1, 0, 1]: " + nn.predict(new double[]{1, 1, 0, 0, 1, 1, 0, 1})); System.out.println("Prediction for [1, 1, 0, 0, 1, 1, 1, 0]: " + nn.predict(new double[]{1, 1, 0, 0, 1, 1, 1, 0})); System.out.println("Prediction for [1, 1, 0, 0, 1, 1, 1, 1]: " + nn.predict(new double[]{1, 1, 0, 0, 1, 1, 1, 1})); System.out.println("Prediction for [1, 1, 0, 1, 0, 0, 0, 0]: " + nn.predict(new double[]{1, 1, 0, 1, 0, 0, 0, 0})); System.out.println("Prediction for [1, 1, 0, 1, 0, 0, 0, 1]: " + nn.predict(new double[]{1, 1, 0, 1, 0, 0, 0, 1})); System.out.println("Prediction for [1, 1, 0, 1, 0, 0, 1, 0]: " + nn.predict(new double[]{1, 1, 0, 1, 0, 0, 1, 0})); System.out.println("Prediction for [1, 1, 0, 1, 0, 0, 1, 1]: " + nn.predict(new double[]{1, 1, 0, 1, 0, 0, 1, 1})); System.out.println("Prediction for [1, 1, 0, 1, 0, 1, 0, 0]: " + nn.predict(new double[]{1, 1, 0, 1, 0, 1, 0, 0})); System.out.println("Prediction for [1, 1, 0, 1, 0, 1, 0, 1]: " + nn.predict(new double[]{1, 1, 0, 1, 0, 1, 0, 1})); System.out.println("Prediction for [1, 1, 0, 1, 0, 1, 1, 0]: " + nn.predict(new double[]{1, 1, 0, 1, 0, 1, 1, 0})); System.out.println("Prediction for [1, 1, 0, 1, 0, 1, 1, 1]: " + nn.predict(new double[]{1, 1, 0, 1, 0, 1, 1, 1})); System.out.println("Prediction for [1, 1, 0, 1, 1, 0, 0, 0]: " + nn.predict(new double[]{1, 1, 0, 1, 1, 0, 0, 0})); System.out.println("Prediction for [1, 1, 0, 1, 1, 0, 0, 1]: " + nn.predict(new double[]{1, 1, 0, 1, 1, 0, 0, 1})); System.out.println("Prediction for [1, 1, 0, 1, 1, 0, 1, 0]: " + nn.predict(new double[]{1, 1, 0, 1, 1, 0, 1, 0})); System.out.println("Prediction for [1, 1, 0, 1, 1, 0, 1, 1]: " + nn.predict(new double[]{1, 1, 0, 1, 1, 0, 1, 1})); System.out.println("Prediction for [1, 1, 0, 1, 1, 1, 0, 0]: " + nn.predict(new double[]{1, 1, 0, 1, 1, 1, 0, 0})); System.out.println("Prediction for [1, 1, 0, 1, 1, 1, 0, 1]: " + nn.predict(new double[]{1, 1, 0, 1, 1, 1, 0, 1})); System.out.println("Prediction for [1, 1, 0, 1, 1, 1, 1, 0]: " + nn.predict(new double[]{1, 1, 0, 1, 1, 1, 1, 0})); System.out.println("Prediction for [1, 1, 0, 1, 1, 1, 1, 1]: " + nn.predict(new double[]{1, 1, 0, 1, 1, 1, 1, 1})); System.out.println("Prediction for [1, 1, 1, 0, 0, 0, 0, 0]: " + nn.predict(new double[]{1, 1, 1, 0, 0, 0, 0, 0})); System.out.println("Prediction for [1, 1, 1, 0, 0, 0, 0, 1]: " + nn.predict(new double[]{1, 1, 1, 0, 0, 0, 0, 1})); System.out.println("Prediction for [1, 1, 1, 0, 0, 0, 1, 0]: " + nn.predict(new double[]{1, 1, 1, 0, 0, 0, 1, 0})); System.out.println("Prediction for [1, 1, 1, 0, 0, 0, 1, 1]: " + nn.predict(new double[]{1, 1, 1, 0, 0, 0, 1, 1})); System.out.println("Prediction for [1, 1, 1, 0, 0, 1, 0, 0]: " + nn.predict(new double[]{1, 1, 1, 0, 0, 1, 0, 0})); System.out.println("Prediction for [1, 1, 1, 0, 0, 1, 0, 1]: " + nn.predict(new double[]{1, 1, 1, 0, 0, 1, 0, 1})); System.out.println("Prediction for [1, 1, 1, 0, 0, 1, 1, 0]: " + nn.predict(new double[]{1, 1, 1, 0, 0, 1, 1, 0})); System.out.println("Prediction for [1, 1, 1, 0, 0, 1, 1, 1]: " + nn.predict(new double[]{1, 1, 1, 0, 0, 1, 1, 1})); System.out.println("Prediction for [1, 1, 1, 0, 1, 0, 0, 0]: " + nn.predict(new double[]{1, 1, 1, 0, 1, 0, 0, 0})); System.out.println("Prediction for [1, 1, 1, 0, 1, 0, 0, 1]: " + nn.predict(new double[]{1, 1, 1, 0, 1, 0, 0, 1})); System.out.println("Prediction for [1, 1, 1, 0, 1, 0, 1, 0]: " + nn.predict(new double[]{1, 1, 1, 0, 1, 0, 1, 0})); System.out.println("Prediction for [1, 1, 1, 0, 1, 0, 1, 1]: " + nn.predict(new double[]{1, 1, 1, 0, 1, 0, 1, 1})); System.out.println("Prediction for [1, 1, 1, 0, 1, 1, 0, 0]: " + nn.predict(new double[]{1, 1, 1, 0, 1, 1, 0, 0})); System.out.println("Prediction for [1, 1, 1, 0, 1, 1, 0, 1]: " + nn.predict(new double[]{1, 1, 1, 0, 1, 1, 0, 1})); System.out.println("Prediction for [1, 1, 1, 0, 1, 1, 1, 0]: " + nn.predict(new double[]{1, 1, 1, 0, 1, 1, 1, 0})); System.out.println("Prediction for [1, 1, 1, 0, 1, 1, 1, 1]: " + nn.predict(new double[]{1, 1, 1, 0, 1, 1, 1, 1})); System.out.println("Prediction for [1, 1, 1, 1, 0, 0, 0, 0]: " + nn.predict(new double[]{1, 1, 1, 1, 0, 0, 0, 0})); System.out.println("Prediction for [1, 1, 1, 1, 0, 0, 0, 1]: " + nn.predict(new double[]{1, 1, 1, 1, 0, 0, 0, 1})); System.out.println("Prediction for [1, 1, 1, 1, 0, 0, 1, 0]: " + nn.predict(new double[]{1, 1, 1, 1, 0, 0, 1, 0})); System.out.println("Prediction for [1, 1, 1, 1, 0, 0, 1, 1]: " + nn.predict(new double[]{1, 1, 1, 1, 0, 0, 1, 1})); System.out.println("Prediction for [1, 1, 1, 1, 0, 1, 0, 0]: " + nn.predict(new double[]{1, 1, 1, 1, 0, 1, 0, 0})); System.out.println("Prediction for [1, 1, 1, 1, 0, 1, 0, 1]: " + nn.predict(new double[]{1, 1, 1, 1, 0, 1, 0, 1})); System.out.println("Prediction for [1, 1, 1, 1, 0, 1, 1, 0]: " + nn.predict(new double[]{1, 1, 1, 1, 0, 1, 1, 0})); System.out.println("Prediction for [1, 1, 1, 1, 0, 1, 1, 1]: " + nn.predict(new double[]{1, 1, 1, 1, 0, 1, 1, 1})); System.out.println("Prediction for [1, 1, 1, 1, 1, 0, 0, 0]: " + nn.predict(new double[]{1, 1, 1, 1, 1, 0, 0, 0})); System.out.println("Prediction for [1, 1, 1, 1, 1, 0, 0, 1]: " + nn.predict(new double[]{1, 1, 1, 1, 1, 0, 0, 1})); System.out.println("Prediction for [1, 1, 1, 1, 1, 0, 1, 0]: " + nn.predict(new double[]{1, 1, 1, 1, 1, 0, 1, 0})); System.out.println("Prediction for [1, 1, 1, 1, 1, 0, 1, 1]: " + nn.predict(new double[]{1, 1, 1, 1, 1, 0, 1, 1})); System.out.println("Prediction for [1, 1, 1, 1, 1, 1, 0, 0]: " + nn.predict(new double[]{1, 1, 1, 1, 1, 1, 0, 0})); System.out.println("Prediction for [1, 1, 1, 1, 1, 1, 0, 1]: " + nn.predict(new double[]{1, 1, 1, 1, 1, 1, 0, 1})); System.out.println("Prediction for [1, 1, 1, 1, 1, 1, 1, 0]: " + nn.predict(new double[]{1, 1, 1, 1, 1, 1, 1, 0})); System.out.println("Prediction for [1, 1, 1, 1, 1, 1, 1, 1]: " + nn.predict(new double[]{1, 1, 1, 1, 1, 1, 1, 1})); } } run: Epoch 10000. Mean error: 0.003808585503429578 Epoch 20000. Mean error: 0.0010577075838637943 Epoch 30000. Mean error: 3.741219881395637E-4 Epoch 40000. Mean error: 1.3142376589993864E-4 Epoch 50000. Mean error: 4.659144604532638E-5 Epoch 60000. Mean error: 1.6601544252988132E-5 Epoch 70000. Mean error: 5.914518503609392E-6 Epoch 80000. Mean error: 2.105004169189538E-6 Epoch 90000. Mean error: 7.489596407242758E-7 Epoch 100000. Mean error: 2.6636013881726364E-7 Epoch 110000. Mean error: 9.478309897230993E-8 Epoch 120000. Mean error: 3.3747368194445706E-8 Epoch 130000. Mean error: 1.1996065678328438E-8 Epoch 140000. Mean error: 4.273375111236205E-9 Epoch 150000. Mean error: 1.5190910450396608E-9 Epoch 160000. Mean error: 5.410631555292937E-10 Epoch 170000. Mean error: 1.923743887628983E-10 Epoch 180000. Mean error: 6.83844557165148E-11 Epoch 190000. Mean error: 2.4322644441997302E-11 Epoch 200000. Mean error: 8.651056671620701E-12 Prediction for [0, 0, 0, 0, 0, 0, 0, 0]: 1.1493876694856908E-7 Prediction for [0, 0, 0, 0, 0, 0, 0, 1]: 0.9999997214335633 Prediction for [0, 0, 0, 0, 0, 0, 1, 0]: 0.9999997767738038 Prediction for [0, 0, 0, 0, 0, 0, 1, 1]: 0.9999996846470631 Prediction for [0, 0, 0, 0, 0, 1, 0, 0]: 0.0 Prediction for [0, 0, 0, 0, 0, 1, 0, 1]: 0.999998323124843 Prediction for [0, 0, 0, 0, 0, 1, 1, 0]: 0.0 Prediction for [0, 0, 0, 0, 0, 1, 1, 1]: 1.0000016782798429 Prediction for [0, 0, 0, 0, 1, 0, 0, 0]: 0.0 Prediction for [0, 0, 0, 0, 1, 0, 0, 1]: 0.0 Prediction for [0, 0, 0, 0, 1, 0, 1, 0]: 0.0 Prediction for [0, 0, 0, 0, 1, 0, 1, 1]: 1.0000000260009656 Prediction for [0, 0, 0, 0, 1, 1, 0, 0]: 0.0 Prediction for [0, 0, 0, 0, 1, 1, 0, 1]: 0.9999990111539732 Prediction for [0, 0, 0, 0, 1, 1, 1, 0]: 0.0 Prediction for [0, 0, 0, 0, 1, 1, 1, 1]: 0.0 Prediction for [0, 0, 0, 1, 0, 0, 0, 0]: 0.0 Prediction for [0, 0, 0, 1, 0, 0, 0, 1]: 0.999999186662796 Prediction for [0, 0, 0, 1, 0, 0, 1, 0]: 0.0 Prediction for [0, 0, 0, 1, 0, 0, 1, 1]: 1.0000000304334704 Prediction for [0, 0, 0, 1, 0, 1, 0, 0]: 0.0 Prediction for [0, 0, 0, 1, 0, 1, 0, 1]: 4.577195349630969E-6 Prediction for [0, 0, 0, 1, 0, 1, 1, 0]: 0.0 Prediction for [0, 0, 0, 1, 0, 1, 1, 1]: 0.9999986892402796 Prediction for [0, 0, 0, 1, 1, 0, 0, 0]: 0.0 Prediction for [0, 0, 0, 1, 1, 0, 0, 1]: 0.0 Prediction for [0, 0, 0, 1, 1, 0, 1, 0]: 0.0 Prediction for [0, 0, 0, 1, 1, 0, 1, 1]: 0.0 Prediction for [0, 0, 0, 1, 1, 1, 0, 0]: 0.0 Prediction for [0, 0, 0, 1, 1, 1, 0, 1]: 1.0000001285452695 Prediction for [0, 0, 0, 1, 1, 1, 1, 0]: 0.0 Prediction for [0, 0, 0, 1, 1, 1, 1, 1]: 0.999997733560584 Prediction for [0, 0, 1, 0, 0, 0, 0, 0]: 0.0 Prediction for [0, 0, 1, 0, 0, 0, 0, 1]: 0.0 Prediction for [0, 0, 1, 0, 0, 0, 1, 0]: 0.0 Prediction for [0, 0, 1, 0, 0, 0, 1, 1]: 0.0 Prediction for [0, 0, 1, 0, 0, 1, 0, 0]: 0.0 Prediction for [0, 0, 1, 0, 0, 1, 0, 1]: 0.9999978297881655 Prediction for [0, 0, 1, 0, 0, 1, 1, 0]: 0.0 Prediction for [0, 0, 1, 0, 0, 1, 1, 1]: 0.0 Prediction for [0, 0, 1, 0, 1, 0, 0, 0]: 0.0 Prediction for [0, 0, 1, 0, 1, 0, 0, 1]: 1.0000010700464679 Prediction for [0, 0, 1, 0, 1, 0, 1, 0]: 0.0 Prediction for [0, 0, 1, 0, 1, 0, 1, 1]: 0.999998795974606 Prediction for [0, 0, 1, 0, 1, 1, 0, 0]: 0.0 Prediction for [0, 0, 1, 0, 1, 1, 0, 1]: 2.2581914198571695E-5 Prediction for [0, 0, 1, 0, 1, 1, 1, 0]: 0.0 Prediction for [0, 0, 1, 0, 1, 1, 1, 1]: 0.9999956198310961 Prediction for [0, 0, 1, 1, 0, 0, 0, 0]: 0.0 Prediction for [0, 0, 1, 1, 0, 0, 0, 1]: 2.524589107544273E-6 Prediction for [0, 0, 1, 1, 0, 0, 1, 0]: 0.0 Prediction for [0, 0, 1, 1, 0, 0, 1, 1]: 0.0 Prediction for [0, 0, 1, 1, 0, 1, 0, 0]: 0.0 Prediction for [0, 0, 1, 1, 0, 1, 0, 1]: 0.9999977571951695 Prediction for [0, 0, 1, 1, 0, 1, 1, 0]: 0.0 Prediction for [0, 0, 1, 1, 0, 1, 1, 1]: 0.0 Prediction for [0, 0, 1, 1, 1, 0, 0, 0]: 0.0 Prediction for [0, 0, 1, 1, 1, 0, 0, 1]: 0.0 Prediction for [0, 0, 1, 1, 1, 0, 1, 0]: 0.0 Prediction for [0, 0, 1, 1, 1, 0, 1, 1]: 1.0000003492365814 Prediction for [0, 0, 1, 1, 1, 1, 0, 0]: 0.0 Prediction for [0, 0, 1, 1, 1, 1, 0, 1]: 0.9999929604453437 Prediction for [0, 0, 1, 1, 1, 1, 1, 0]: 0.0 Prediction for [0, 0, 1, 1, 1, 1, 1, 1]: 1.2817688045840825E-5 Prediction for [0, 1, 0, 0, 0, 0, 0, 0]: 0.0 Prediction for [0, 1, 0, 0, 0, 0, 0, 1]: 0.0 Prediction for [0, 1, 0, 0, 0, 0, 1, 0]: 7.9571670941192E-7 Prediction for [0, 1, 0, 0, 0, 0, 1, 1]: 1.0000011571990652 Prediction for [0, 1, 0, 0, 0, 1, 0, 0]: 0.0 Prediction for [0, 1, 0, 0, 0, 1, 0, 1]: 0.0 Prediction for [0, 1, 0, 0, 0, 1, 1, 0]: 0.0 Prediction for [0, 1, 0, 0, 0, 1, 1, 1]: 0.9999998754062742 Prediction for [0, 1, 0, 0, 1, 0, 0, 0]: 0.0 Prediction for [0, 1, 0, 0, 1, 0, 0, 1]: 1.0000007511885223 Prediction for [0, 1, 0, 0, 1, 0, 1, 0]: 0.0 Prediction for [0, 1, 0, 0, 1, 0, 1, 1]: 0.0 Prediction for [0, 1, 0, 0, 1, 1, 0, 0]: 0.0 Prediction for [0, 1, 0, 0, 1, 1, 0, 1]: 0.0 Prediction for [0, 1, 0, 0, 1, 1, 1, 0]: 0.0 Prediction for [0, 1, 0, 0, 1, 1, 1, 1]: 1.000000559910793 Prediction for [0, 1, 0, 1, 0, 0, 0, 0]: 0.0 Prediction for [0, 1, 0, 1, 0, 0, 0, 1]: 6.175761815274683E-7 Prediction for [0, 1, 0, 1, 0, 0, 1, 0]: 0.0 Prediction for [0, 1, 0, 1, 0, 0, 1, 1]: 1.0000002122535003 Prediction for [0, 1, 0, 1, 0, 1, 0, 0]: 0.0 Prediction for [0, 1, 0, 1, 0, 1, 0, 1]: 0.0 Prediction for [0, 1, 0, 1, 0, 1, 1, 0]: 0.0 Prediction for [0, 1, 0, 1, 0, 1, 1, 1]: 0.0 Prediction for [0, 1, 0, 1, 1, 0, 0, 0]: 0.0 Prediction for [0, 1, 0, 1, 1, 0, 0, 1]: 1.0000007531311845 Prediction for [0, 1, 0, 1, 1, 0, 1, 0]: 0.0 Prediction for [0, 1, 0, 1, 1, 0, 1, 1]: 0.0 Prediction for [0, 1, 0, 1, 1, 1, 0, 0]: 0.0 Prediction for [0, 1, 0, 1, 1, 1, 0, 1]: 0.0 Prediction for [0, 1, 0, 1, 1, 1, 1, 0]: 0.0 Prediction for [0, 1, 0, 1, 1, 1, 1, 1]: 2.5926466582504304E-6 Prediction for [0, 1, 1, 0, 0, 0, 0, 0]: 0.0 Prediction for [0, 1, 1, 0, 0, 0, 0, 1]: 0.9999986429045669 Prediction for [0, 1, 1, 0, 0, 0, 1, 0]: 0.0 Prediction for [0, 1, 1, 0, 0, 0, 1, 1]: 2.2767656437938655E-6 Prediction for [0, 1, 1, 0, 0, 1, 0, 0]: 0.0 Prediction for [0, 1, 1, 0, 0, 1, 0, 1]: 1.0000029157829935 Prediction for [0, 1, 1, 0, 0, 1, 1, 0]: 0.0 Prediction for [0, 1, 1, 0, 0, 1, 1, 1]: 0.9999994387787101 Prediction for [0, 1, 1, 0, 1, 0, 0, 0]: 0.0 Prediction for [0, 1, 1, 0, 1, 0, 0, 1]: 1.4328173822963919E-6 Prediction for [0, 1, 1, 0, 1, 0, 1, 0]: 0.0 Prediction for [0, 1, 1, 0, 1, 0, 1, 1]: 0.999999442836751 Prediction for [0, 1, 1, 0, 1, 1, 0, 0]: 0.0 Prediction for [0, 1, 1, 0, 1, 1, 0, 1]: 0.9999952662182496 Prediction for [0, 1, 1, 0, 1, 1, 1, 0]: 0.0 Prediction for [0, 1, 1, 0, 1, 1, 1, 1]: 5.123501170878342E-6 Prediction for [0, 1, 1, 1, 0, 0, 0, 0]: 0.0 Prediction for [0, 1, 1, 1, 0, 0, 0, 1]: 0.9999992365687822 Prediction for [0, 1, 1, 1, 0, 0, 1, 0]: 0.0 Prediction for [0, 1, 1, 1, 0, 0, 1, 1]: 0.0 Prediction for [0, 1, 1, 1, 0, 1, 0, 0]: 0.0 Prediction for [0, 1, 1, 1, 0, 1, 0, 1]: 0.0 Prediction for [0, 1, 1, 1, 0, 1, 1, 0]: 0.0 Prediction for [0, 1, 1, 1, 0, 1, 1, 1]: 1.5039353107315634E-6 Prediction for [0, 1, 1, 1, 1, 0, 0, 0]: 0.0 Prediction for [0, 1, 1, 1, 1, 0, 0, 1]: 1.705846051747173E-6 Prediction for [0, 1, 1, 1, 1, 0, 1, 0]: 0.0 Prediction for [0, 1, 1, 1, 1, 0, 1, 1]: 1.77885156005253E-6 Prediction for [0, 1, 1, 1, 1, 1, 0, 0]: 0.0 Prediction for [0, 1, 1, 1, 1, 1, 0, 1]: 1.9185412540867475E-6 Prediction for [0, 1, 1, 1, 1, 1, 1, 0]: 0.0 Prediction for [0, 1, 1, 1, 1, 1, 1, 1]: 0.9999853580808646 Prediction for [1, 0, 0, 0, 0, 0, 0, 0]: 0.0 Prediction for [1, 0, 0, 0, 0, 0, 0, 1]: 0.0 Prediction for [1, 0, 0, 0, 0, 0, 1, 0]: 0.0 Prediction for [1, 0, 0, 0, 0, 0, 1, 1]: 1.0000011723827145 Prediction for [1, 0, 0, 0, 0, 1, 0, 0]: 0.0 Prediction for [1, 0, 0, 0, 0, 1, 0, 1]: 3.263457222235644E-7 Prediction for [1, 0, 0, 0, 0, 1, 1, 0]: 0.0 Prediction for [1, 0, 0, 0, 0, 1, 1, 1]: 1.989126314771994E-7 Prediction for [1, 0, 0, 0, 1, 0, 0, 0]: 0.0 Prediction for [1, 0, 0, 0, 1, 0, 0, 1]: 0.9999994489167827 Prediction for [1, 0, 0, 0, 1, 0, 1, 0]: 0.0 Prediction for [1, 0, 0, 0, 1, 0, 1, 1]: 0.9999993314046669 Prediction for [1, 0, 0, 0, 1, 1, 0, 0]: 0.0 Prediction for [1, 0, 0, 0, 1, 1, 0, 1]: 0.0 Prediction for [1, 0, 0, 0, 1, 1, 1, 0]: 0.0 Prediction for [1, 0, 0, 0, 1, 1, 1, 1]: 0.0 Prediction for [1, 0, 0, 1, 0, 0, 0, 0]: 0.0 Prediction for [1, 0, 0, 1, 0, 0, 0, 1]: 0.0 Prediction for [1, 0, 0, 1, 0, 0, 1, 0]: 0.0 Prediction for [1, 0, 0, 1, 0, 0, 1, 1]: 8.393365751313553E-7 Prediction for [1, 0, 0, 1, 0, 1, 0, 0]: 0.0 Prediction for [1, 0, 0, 1, 0, 1, 0, 1]: 1.0000033894006881 Prediction for [1, 0, 0, 1, 0, 1, 1, 0]: 0.0 Prediction for [1, 0, 0, 1, 0, 1, 1, 1]: 0.9999988724773827 Prediction for [1, 0, 0, 1, 1, 0, 0, 0]: 0.0 Prediction for [1, 0, 0, 1, 1, 0, 0, 1]: 0.0 Prediction for [1, 0, 0, 1, 1, 0, 1, 0]: 0.0 Prediction for [1, 0, 0, 1, 1, 0, 1, 1]: 0.0 Prediction for [1, 0, 0, 1, 1, 1, 0, 0]: 0.0 Prediction for [1, 0, 0, 1, 1, 1, 0, 1]: 0.9999992029014997 Prediction for [1, 0, 0, 1, 1, 1, 1, 0]: 0.0 Prediction for [1, 0, 0, 1, 1, 1, 1, 1]: 1.710285203015971E-6 Prediction for [1, 0, 1, 0, 0, 0, 0, 0]: 0.0 Prediction for [1, 0, 1, 0, 0, 0, 0, 1]: 0.0 Prediction for [1, 0, 1, 0, 0, 0, 1, 0]: 0.0 Prediction for [1, 0, 1, 0, 0, 0, 1, 1]: 0.9999993501222617 Prediction for [1, 0, 1, 0, 0, 1, 0, 0]: 0.0 Prediction for [1, 0, 1, 0, 0, 1, 0, 1]: 2.224800710992625E-6 Prediction for [1, 0, 1, 0, 0, 1, 1, 0]: 0.0 Prediction for [1, 0, 1, 0, 0, 1, 1, 1]: 0.999998379616095 Prediction for [1, 0, 1, 0, 1, 0, 0, 0]: 0.0 Prediction for [1, 0, 1, 0, 1, 0, 0, 1]: 3.5844525458905707E-7 Prediction for [1, 0, 1, 0, 1, 0, 1, 0]: 0.0 Prediction for [1, 0, 1, 0, 1, 0, 1, 1]: 4.954791028577432E-7 Prediction for [1, 0, 1, 0, 1, 1, 0, 0]: 0.0 Prediction for [1, 0, 1, 0, 1, 1, 0, 1]: 0.999991566260183 Prediction for [1, 0, 1, 0, 1, 1, 1, 0]: 0.0 Prediction for [1, 0, 1, 0, 1, 1, 1, 1]: 8.104980422363184E-7 Prediction for [1, 0, 1, 1, 0, 0, 0, 0]: 0.0 Prediction for [1, 0, 1, 1, 0, 0, 0, 1]: 0.0 Prediction for [1, 0, 1, 1, 0, 0, 1, 0]: 0.0 Prediction for [1, 0, 1, 1, 0, 0, 1, 1]: 0.9999996687028503 Prediction for [1, 0, 1, 1, 0, 1, 0, 0]: 0.0 Prediction for [1, 0, 1, 1, 0, 1, 0, 1]: 0.9999991959922634 Prediction for [1, 0, 1, 1, 0, 1, 1, 0]: 0.0 Prediction for [1, 0, 1, 1, 0, 1, 1, 1]: 2.4911264742133454E-6 Prediction for [1, 0, 1, 1, 1, 0, 0, 0]: 0.0 Prediction for [1, 0, 1, 1, 1, 0, 0, 1]: 0.0 Prediction for [1, 0, 1, 1, 1, 0, 1, 0]: 0.0 Prediction for [1, 0, 1, 1, 1, 0, 1, 1]: 7.170702265302253E-7 Prediction for [1, 0, 1, 1, 1, 1, 0, 0]: 0.0 Prediction for [1, 0, 1, 1, 1, 1, 0, 1]: 7.164493245337411E-7 Prediction for [1, 0, 1, 1, 1, 1, 1, 0]: 0.0 Prediction for [1, 0, 1, 1, 1, 1, 1, 1]: 0.9999818125024408 Prediction for [1, 1, 0, 0, 0, 0, 0, 0]: 0.0 Prediction for [1, 1, 0, 0, 0, 0, 0, 1]: 0.9999997430631502 Prediction for [1, 1, 0, 0, 0, 0, 1, 0]: 0.0 Prediction for [1, 1, 0, 0, 0, 0, 1, 1]: 0.0 Prediction for [1, 1, 0, 0, 0, 1, 0, 0]: 0.0 Prediction for [1, 1, 0, 0, 0, 1, 0, 1]: 0.9999956644098074 Prediction for [1, 1, 0, 0, 0, 1, 1, 0]: 0.0 Prediction for [1, 1, 0, 0, 0, 1, 1, 1]: 0.9999986422881308 Prediction for [1, 1, 0, 0, 1, 0, 0, 0]: 0.0 Prediction for [1, 1, 0, 0, 1, 0, 0, 1]: 0.0 Prediction for [1, 1, 0, 0, 1, 0, 1, 0]: 0.0 Prediction for [1, 1, 0, 0, 1, 0, 1, 1]: 0.0 Prediction for [1, 1, 0, 0, 1, 1, 0, 0]: 0.0 Prediction for [1, 1, 0, 0, 1, 1, 0, 1]: 0.0 Prediction for [1, 1, 0, 0, 1, 1, 1, 0]: 0.0 Prediction for [1, 1, 0, 0, 1, 1, 1, 1]: 0.0 Prediction for [1, 1, 0, 1, 0, 0, 0, 0]: 0.0 Prediction for [1, 1, 0, 1, 0, 0, 0, 1]: 0.0 Prediction for [1, 1, 0, 1, 0, 0, 1, 0]: 0.0 Prediction for [1, 1, 0, 1, 0, 0, 1, 1]: 0.9999960839497368 Prediction for [1, 1, 0, 1, 0, 1, 0, 0]: 0.0 Prediction for [1, 1, 0, 1, 0, 1, 0, 1]: 0.0 Prediction for [1, 1, 0, 1, 0, 1, 1, 0]: 0.0 Prediction for [1, 1, 0, 1, 0, 1, 1, 1]: 0.0 Prediction for [1, 1, 0, 1, 1, 0, 0, 0]: 0.0 Prediction for [1, 1, 0, 1, 1, 0, 0, 1]: 0.0 Prediction for [1, 1, 0, 1, 1, 0, 1, 0]: 0.0 Prediction for [1, 1, 0, 1, 1, 0, 1, 1]: 0.0 Prediction for [1, 1, 0, 1, 1, 1, 0, 0]: 0.0 Prediction for [1, 1, 0, 1, 1, 1, 0, 1]: 0.0 Prediction for [1, 1, 0, 1, 1, 1, 1, 0]: 0.0 Prediction for [1, 1, 0, 1, 1, 1, 1, 1]: 0.9999973334165593 Prediction for [1, 1, 1, 0, 0, 0, 0, 0]: 0.0 Prediction for [1, 1, 1, 0, 0, 0, 0, 1]: 0.0 Prediction for [1, 1, 1, 0, 0, 0, 1, 0]: 0.0 Prediction for [1, 1, 1, 0, 0, 0, 1, 1]: 0.9999982993061676 Prediction for [1, 1, 1, 0, 0, 1, 0, 0]: 0.0 Prediction for [1, 1, 1, 0, 0, 1, 0, 1]: 0.9999975892361321 Prediction for [1, 1, 1, 0, 0, 1, 1, 0]: 0.0 Prediction for [1, 1, 1, 0, 0, 1, 1, 1]: 0.0 Prediction for [1, 1, 1, 0, 1, 0, 0, 0]: 0.0 Prediction for [1, 1, 1, 0, 1, 0, 0, 1]: 0.9999977722867401 Prediction for [1, 1, 1, 0, 1, 0, 1, 0]: 0.0 Prediction for [1, 1, 1, 0, 1, 0, 1, 1]: 0.0 Prediction for [1, 1, 1, 0, 1, 1, 0, 0]: 0.0 Prediction for [1, 1, 1, 0, 1, 1, 0, 1]: 0.0 Prediction for [1, 1, 1, 0, 1, 1, 1, 0]: 0.0 Prediction for [1, 1, 1, 0, 1, 1, 1, 1]: 0.999995227082995 Prediction for [1, 1, 1, 1, 0, 0, 0, 0]: 0.0 Prediction for [1, 1, 1, 1, 0, 0, 0, 1]: 0.9999963174205537 Prediction for [1, 1, 1, 1, 0, 0, 1, 0]: 0.0 Prediction for [1, 1, 1, 1, 0, 0, 1, 1]: 0.0 Prediction for [1, 1, 1, 1, 0, 1, 0, 0]: 0.0 Prediction for [1, 1, 1, 1, 0, 1, 0, 1]: 0.0 Prediction for [1, 1, 1, 1, 0, 1, 1, 0]: 0.0 Prediction for [1, 1, 1, 1, 0, 1, 1, 1]: 0.0 Prediction for [1, 1, 1, 1, 1, 0, 0, 0]: 0.0 Prediction for [1, 1, 1, 1, 1, 0, 0, 1]: 0.0 Prediction for [1, 1, 1, 1, 1, 0, 1, 0]: 0.0 Prediction for [1, 1, 1, 1, 1, 0, 1, 1]: 0.9999972955850365 Prediction for [1, 1, 1, 1, 1, 1, 0, 0]: 0.0 Prediction for [1, 1, 1, 1, 1, 1, 0, 1]: 0.0 Prediction for [1, 1, 1, 1, 1, 1, 1, 0]: 0.0 Prediction for [1, 1, 1, 1, 1, 1, 1, 1]: 2.0156052446873574E-5 BUILD SUCCESSFUL (total time: 52 seconds)
  20. @Mark-XP When training goes only from 0..250, the prime number at 251 is found. So, this is something interesting.. Dietmar Prediction for [1, 1, 1, 0, 1, 1, 1, 0]: 0.0 Prediction for [1, 1, 1, 0, 1, 1, 1, 1]: 0.9999860758802503 Prediction for [1, 1, 1, 1, 0, 0, 0, 0]: 0.0 Prediction for [1, 1, 1, 1, 0, 0, 0, 1]: 0.9998293754254401 Prediction for [1, 1, 1, 1, 0, 0, 1, 0]: 0.0 Prediction for [1, 1, 1, 1, 0, 0, 1, 1]: 4.1298992927707445E-5 Prediction for [1, 1, 1, 1, 0, 1, 0, 0]: 0.0 Prediction for [1, 1, 1, 1, 0, 1, 0, 1]: 0.0 Prediction for [1, 1, 1, 1, 0, 1, 1, 0]: 0.0 Prediction for [1, 1, 1, 1, 0, 1, 1, 1]: 0.0 Prediction for [1, 1, 1, 1, 1, 0, 0, 0]: 0.0 Prediction for [1, 1, 1, 1, 1, 0, 0, 1]: 0.0 Prediction for [1, 1, 1, 1, 1, 0, 1, 0]: 0.0 Prediction for [1, 1, 1, 1, 1, 0, 1, 1]: 0.7571411604482448 Prediction for [1, 1, 1, 1, 1, 1, 0, 0]: 0.0 Prediction for [1, 1, 1, 1, 1, 1, 0, 1]: 0.0 Prediction for [1, 1, 1, 1, 1, 1, 1, 0]: 0.0 Prediction for [1, 1, 1, 1, 1, 1, 1, 1]: 0.0 BUILD SUCCESSFUL (total time: 50 seconds)
  21. @Mark-XP Yes. I see the same for the Multipliers of 3. So, all "Intelligence" is gone for me in any Neural Network. When you count the numbers of Variables, that are in this example with 8 Input Neurons, 26 Neurons in Hidden Layer and 1 Output Neuron, you see, that for 256 numbers you need 26 Neurons. With 25 works, when you have luck, sometimes. When you use less of half of the 256 numbers for training, the result is garbage. When you use more than half of data for training, the result becomes better for not trained number, primes, Dietmar PS: No intelligence at all in any Neural Network. Its behavior is much more like an Taylor Series. But Taylor is not bad. It makes very good predictions near the place of training. It is like a small window in unknown future, unknown numbers, unknown places.
  22. The error is about 10^-30 (!) . I think, when you use more exact varablen typ in Java, the error goes even much more down. So, there is some Magic in the Primes Dietmar public class Multiof3 { private final int numInputNodes = 8; private final int numHiddenNodes = 64; private final int numOutputNodes = 1; private final double learningRate = 0.02; private final int numEpochs = 200000; private final double errorThreshold = 0.00000000000000000000000000000001; run: Epoch 10000. Mean error: 1.9709204800408654E-8 Epoch 20000. Mean error: 1.5248792997769017E-14 Epoch 30000. Mean error: 1.2735893690568209E-20 Epoch 40000. Mean error: 1.0522858627981606E-26 Epoch 50000. Mean error: 9.187230511789512E-30 Epoch 60000. Mean error: 7.319165734434498E-30 Epoch 70000. Mean error: 1.2222598419172091E-29 Epoch 80000. Mean error: 7.106494920325538E-30 Epoch 90000. Mean error: 3.3912526777154975E-30 Epoch 100000. Mean error: 3.003331266463913E-30 Epoch 110000. Mean error: 1.6632731232044737E-29 Epoch 120000. Mean error: 1.446087808935248E-29 Epoch 130000. Mean error: 4.873358084949771E-30 Epoch 140000. Mean error: 3.0600348569984264E-30 Epoch 150000. Mean error: 5.668457197631275E-30 Epoch 160000. Mean error: 6.778117846276438E-30 Epoch 170000. Mean error: 3.4093022524130516E-30 Epoch 180000. Mean error: 1.1896342877327355E-29 Epoch 190000. Mean error: 7.757964798138825E-30 Epoch 200000. Mean error: 7.6522733739095E-30 Prediction for [0, 0, 0, 0, 0, 0, 0, 0]: 0.0 Prediction for [0, 0, 0, 0, 0, 0, 0, 1]: 1.0000000000000027 Prediction for [0, 0, 0, 0, 0, 0, 1, 0]: 0.9999999999999972 Prediction for [0, 0, 0, 0, 0, 0, 1, 1]: 0.9999999999999946 Prediction for [0, 0, 0, 0, 0, 1, 0, 0]: 0.0 Prediction for [0, 0, 0, 0, 0, 1, 0, 1]: 0.9999999999999966 Prediction for [0, 0, 0, 0, 0, 1, 1, 0]: 0.0 Prediction for [0, 0, 0, 0, 0, 1, 1, 1]: 0.9999999999999946 Prediction for [0, 0, 0, 0, 1, 0, 0, 0]: 0.0 Prediction for [0, 0, 0, 0, 1, 0, 0, 1]: 0.0 Prediction for [0, 0, 0, 0, 1, 0, 1, 0]: 0.0 Prediction for [0, 0, 0, 0, 1, 0, 1, 1]: 1.0000000000000013 Prediction for [0, 0, 0, 0, 1, 1, 0, 0]: 0.0 Prediction for [0, 0, 0, 0, 1, 1, 0, 1]: 1.0000000000000049 Prediction for [0, 0, 0, 0, 1, 1, 1, 0]: 0.0 Prediction for [0, 0, 0, 0, 1, 1, 1, 1]: 0.0 Prediction for [0, 0, 0, 1, 0, 0, 0, 0]: 0.0 Prediction for [0, 0, 0, 1, 0, 0, 0, 1]: 1.0000000000000018 Prediction for [0, 0, 0, 1, 0, 0, 1, 0]: 0.0 Prediction for [0, 0, 0, 1, 0, 0, 1, 1]: 0.9999999999999961 Prediction for [0, 0, 0, 1, 0, 1, 0, 0]: 0.0 Prediction for [0, 0, 0, 1, 0, 1, 0, 1]: 0.0 Prediction for [0, 0, 0, 1, 0, 1, 1, 0]: 0.0 Prediction for [0, 0, 0, 1, 0, 1, 1, 1]: 0.9999999999999941 Prediction for [0, 0, 0, 1, 1, 0, 0, 0]: 0.0 Prediction for [0, 0, 0, 1, 1, 0, 0, 1]: 0.0 Prediction for [0, 0, 0, 1, 1, 0, 1, 0]: 0.0 Prediction for [0, 0, 0, 1, 1, 0, 1, 1]: 0.0 Prediction for [0, 0, 0, 1, 1, 1, 0, 0]: 0.0 Prediction for [0, 0, 0, 1, 1, 1, 0, 1]: 1.0000000000000027 Prediction for [0, 0, 0, 1, 1, 1, 1, 0]: 0.0 Prediction for [0, 0, 0, 1, 1, 1, 1, 1]: 0.9999999999999937 Prediction for [0, 0, 1, 0, 0, 0, 0, 0]: 0.0 Prediction for [0, 0, 1, 0, 0, 0, 0, 1]: 0.0 Prediction for [0, 0, 1, 0, 0, 0, 1, 0]: 0.0 Prediction for [0, 0, 1, 0, 0, 0, 1, 1]: 6.994405055138486E-15 Prediction for [0, 0, 1, 0, 0, 1, 0, 0]: 0.0 Prediction for [0, 0, 1, 0, 0, 1, 0, 1]: 1.000000000000003 Prediction for [0, 0, 1, 0, 0, 1, 1, 0]: 0.0 Prediction for [0, 0, 1, 0, 0, 1, 1, 1]: 0.0 Prediction for [0, 0, 1, 0, 1, 0, 0, 0]: 0.0 Prediction for [0, 0, 1, 0, 1, 0, 0, 1]: 0.9999999999999928 Prediction for [0, 0, 1, 0, 1, 0, 1, 0]: 0.0 Prediction for [0, 0, 1, 0, 1, 0, 1, 1]: 1.0000000000000013 Prediction for [0, 0, 1, 0, 1, 1, 0, 0]: 0.0 Prediction for [0, 0, 1, 0, 1, 1, 0, 1]: 0.0 Prediction for [0, 0, 1, 0, 1, 1, 1, 0]: 0.0 Prediction for [0, 0, 1, 0, 1, 1, 1, 1]: 0.9999999999999952 Prediction for [0, 0, 1, 1, 0, 0, 0, 0]: 0.0 Prediction for [0, 0, 1, 1, 0, 0, 0, 1]: 0.0 Prediction for [0, 0, 1, 1, 0, 0, 1, 0]: 0.0 Prediction for [0, 0, 1, 1, 0, 0, 1, 1]: 0.0 Prediction for [0, 0, 1, 1, 0, 1, 0, 0]: 0.0 Prediction for [0, 0, 1, 1, 0, 1, 0, 1]: 1.0000000000000036 Prediction for [0, 0, 1, 1, 0, 1, 1, 0]: 0.0 Prediction for [0, 0, 1, 1, 0, 1, 1, 1]: 0.0 Prediction for [0, 0, 1, 1, 1, 0, 0, 0]: 0.0 Prediction for [0, 0, 1, 1, 1, 0, 0, 1]: 0.0 Prediction for [0, 0, 1, 1, 1, 0, 1, 0]: 0.0 Prediction for [0, 0, 1, 1, 1, 0, 1, 1]: 1.000000000000004 Prediction for [0, 0, 1, 1, 1, 1, 0, 0]: 0.0 Prediction for [0, 0, 1, 1, 1, 1, 0, 1]: 1.0000000000000018 Prediction for [0, 0, 1, 1, 1, 1, 1, 0]: 0.0 Prediction for [0, 0, 1, 1, 1, 1, 1, 1]: 0.0 Prediction for [0, 1, 0, 0, 0, 0, 0, 0]: 0.0 Prediction for [0, 1, 0, 0, 0, 0, 0, 1]: 5.329070518200751E-15 Prediction for [0, 1, 0, 0, 0, 0, 1, 0]: 0.0 Prediction for [0, 1, 0, 0, 0, 0, 1, 1]: 1.0000000000000075 Prediction for [0, 1, 0, 0, 0, 1, 0, 0]: 0.0 Prediction for [0, 1, 0, 0, 0, 1, 0, 1]: 0.0 Prediction for [0, 1, 0, 0, 0, 1, 1, 0]: 0.0 Prediction for [0, 1, 0, 0, 0, 1, 1, 1]: 1.0000000000000098 Prediction for [0, 1, 0, 0, 1, 0, 0, 0]: 0.0 Prediction for [0, 1, 0, 0, 1, 0, 0, 1]: 0.9999999999999948 Prediction for [0, 1, 0, 0, 1, 0, 1, 0]: 0.0 Prediction for [0, 1, 0, 0, 1, 0, 1, 1]: 0.0 Prediction for [0, 1, 0, 0, 1, 1, 0, 0]: 0.0 Prediction for [0, 1, 0, 0, 1, 1, 0, 1]: 0.0 Prediction for [0, 1, 0, 0, 1, 1, 1, 0]: 0.0 Prediction for [0, 1, 0, 0, 1, 1, 1, 1]: 1.0000000000000013 Prediction for [0, 1, 0, 1, 0, 0, 0, 0]: 0.0 Prediction for [0, 1, 0, 1, 0, 0, 0, 1]: 0.0 Prediction for [0, 1, 0, 1, 0, 0, 1, 0]: 0.0 Prediction for [0, 1, 0, 1, 0, 0, 1, 1]: 1.0000000000000036 Prediction for [0, 1, 0, 1, 0, 1, 0, 0]: 0.0 Prediction for [0, 1, 0, 1, 0, 1, 0, 1]: 0.0 Prediction for [0, 1, 0, 1, 0, 1, 1, 0]: 0.0 Prediction for [0, 1, 0, 1, 0, 1, 1, 1]: 0.0 Prediction for [0, 1, 0, 1, 1, 0, 0, 0]: 0.0 Prediction for [0, 1, 0, 1, 1, 0, 0, 1]: 0.9999999999999932 Prediction for [0, 1, 0, 1, 1, 0, 1, 0]: 0.0 Prediction for [0, 1, 0, 1, 1, 0, 1, 1]: 3.858025010572419E-15 Prediction for [0, 1, 0, 1, 1, 1, 0, 0]: 0.0 Prediction for [0, 1, 0, 1, 1, 1, 0, 1]: 0.0 Prediction for [0, 1, 0, 1, 1, 1, 1, 0]: 0.0 Prediction for [0, 1, 0, 1, 1, 1, 1, 1]: 0.0 Prediction for [0, 1, 1, 0, 0, 0, 0, 0]: 0.0 Prediction for [0, 1, 1, 0, 0, 0, 0, 1]: 0.9999999999999983 Prediction for [0, 1, 1, 0, 0, 0, 1, 0]: 0.0 Prediction for [0, 1, 1, 0, 0, 0, 1, 1]: 0.0 Prediction for [0, 1, 1, 0, 0, 1, 0, 0]: 0.0 Prediction for [0, 1, 1, 0, 0, 1, 0, 1]: 0.9999999999999986 Prediction for [0, 1, 1, 0, 0, 1, 1, 0]: 0.0 Prediction for [0, 1, 1, 0, 0, 1, 1, 1]: 0.9999999999999939 Prediction for [0, 1, 1, 0, 1, 0, 0, 0]: 0.0 Prediction for [0, 1, 1, 0, 1, 0, 0, 1]: 0.0 Prediction for [0, 1, 1, 0, 1, 0, 1, 0]: 0.0 Prediction for [0, 1, 1, 0, 1, 0, 1, 1]: 0.9999999999999921 Prediction for [0, 1, 1, 0, 1, 1, 0, 0]: 0.0 Prediction for [0, 1, 1, 0, 1, 1, 0, 1]: 0.9999999999999892 Prediction for [0, 1, 1, 0, 1, 1, 1, 0]: 0.0 Prediction for [0, 1, 1, 0, 1, 1, 1, 1]: 7.771561172376096E-16 Prediction for [0, 1, 1, 1, 0, 0, 0, 0]: 0.0 Prediction for [0, 1, 1, 1, 0, 0, 0, 1]: 1.0000000000000027 Prediction for [0, 1, 1, 1, 0, 0, 1, 0]: 0.0 Prediction for [0, 1, 1, 1, 0, 0, 1, 1]: 0.0 Prediction for [0, 1, 1, 1, 0, 1, 0, 0]: 0.0 Prediction for [0, 1, 1, 1, 0, 1, 0, 1]: 0.0 Prediction for [0, 1, 1, 1, 0, 1, 1, 0]: 0.0 Prediction for [0, 1, 1, 1, 0, 1, 1, 1]: 0.0 Prediction for [0, 1, 1, 1, 1, 0, 0, 0]: 0.0 Prediction for [0, 1, 1, 1, 1, 0, 0, 1]: 5.412337245047638E-15 Prediction for [0, 1, 1, 1, 1, 0, 1, 0]: 0.0 Prediction for [0, 1, 1, 1, 1, 0, 1, 1]: 0.0 Prediction for [0, 1, 1, 1, 1, 1, 0, 0]: 0.0 Prediction for [0, 1, 1, 1, 1, 1, 0, 1]: 9.43689570931383E-16 Prediction for [0, 1, 1, 1, 1, 1, 1, 0]: 0.0 Prediction for [0, 1, 1, 1, 1, 1, 1, 1]: 0.9999999999999954 Prediction for [1, 0, 0, 0, 0, 0, 0, 0]: 0.0 Prediction for [1, 0, 0, 0, 0, 0, 0, 1]: 0.0 Prediction for [1, 0, 0, 0, 0, 0, 1, 0]: 0.0 Prediction for [1, 0, 0, 0, 0, 0, 1, 1]: 0.9999999999999972 Prediction for [1, 0, 0, 0, 0, 1, 0, 0]: 0.0 Prediction for [1, 0, 0, 0, 0, 1, 0, 1]: 0.0 Prediction for [1, 0, 0, 0, 0, 1, 1, 0]: 0.0 Prediction for [1, 0, 0, 0, 0, 1, 1, 1]: 0.0 Prediction for [1, 0, 0, 0, 1, 0, 0, 0]: 0.0 Prediction for [1, 0, 0, 0, 1, 0, 0, 1]: 0.999999999999997 Prediction for [1, 0, 0, 0, 1, 0, 1, 0]: 0.0 Prediction for [1, 0, 0, 0, 1, 0, 1, 1]: 1.0000000000000027 Prediction for [1, 0, 0, 0, 1, 1, 0, 0]: 0.0 Prediction for [1, 0, 0, 0, 1, 1, 0, 1]: 0.0 Prediction for [1, 0, 0, 0, 1, 1, 1, 0]: 0.0 Prediction for [1, 0, 0, 0, 1, 1, 1, 1]: 0.0 Prediction for [1, 0, 0, 1, 0, 0, 0, 0]: 0.0 Prediction for [1, 0, 0, 1, 0, 0, 0, 1]: 0.0 Prediction for [1, 0, 0, 1, 0, 0, 1, 0]: 0.0 Prediction for [1, 0, 0, 1, 0, 0, 1, 1]: 0.0 Prediction for [1, 0, 0, 1, 0, 1, 0, 0]: 0.0 Prediction for [1, 0, 0, 1, 0, 1, 0, 1]: 0.9999999999999972 Prediction for [1, 0, 0, 1, 0, 1, 1, 0]: 0.0 Prediction for [1, 0, 0, 1, 0, 1, 1, 1]: 1.0000000000000067 Prediction for [1, 0, 0, 1, 1, 0, 0, 0]: 0.0 Prediction for [1, 0, 0, 1, 1, 0, 0, 1]: 0.0 Prediction for [1, 0, 0, 1, 1, 0, 1, 0]: 0.0 Prediction for [1, 0, 0, 1, 1, 0, 1, 1]: 0.0 Prediction for [1, 0, 0, 1, 1, 1, 0, 0]: 0.0 Prediction for [1, 0, 0, 1, 1, 1, 0, 1]: 0.9999999999999957 Prediction for [1, 0, 0, 1, 1, 1, 1, 0]: 0.0 Prediction for [1, 0, 0, 1, 1, 1, 1, 1]: 0.0 Prediction for [1, 0, 1, 0, 0, 0, 0, 0]: 0.0 Prediction for [1, 0, 1, 0, 0, 0, 0, 1]: 0.0 Prediction for [1, 0, 1, 0, 0, 0, 1, 0]: 0.0 Prediction for [1, 0, 1, 0, 0, 0, 1, 1]: 1.0000000000000009 Prediction for [1, 0, 1, 0, 0, 1, 0, 0]: 0.0 Prediction for [1, 0, 1, 0, 0, 1, 0, 1]: 0.0 Prediction for [1, 0, 1, 0, 0, 1, 1, 0]: 0.0 Prediction for [1, 0, 1, 0, 0, 1, 1, 1]: 0.999999999999993 Prediction for [1, 0, 1, 0, 1, 0, 0, 0]: 0.0 Prediction for [1, 0, 1, 0, 1, 0, 0, 1]: 0.0 Prediction for [1, 0, 1, 0, 1, 0, 1, 0]: 0.0 Prediction for [1, 0, 1, 0, 1, 0, 1, 1]: 0.0 Prediction for [1, 0, 1, 0, 1, 1, 0, 0]: 0.0 Prediction for [1, 0, 1, 0, 1, 1, 0, 1]: 1.0000000000000049 Prediction for [1, 0, 1, 0, 1, 1, 1, 0]: 0.0 Prediction for [1, 0, 1, 0, 1, 1, 1, 1]: 6.772360450213455E-15 Prediction for [1, 0, 1, 1, 0, 0, 0, 0]: 0.0 Prediction for [1, 0, 1, 1, 0, 0, 0, 1]: 0.0 Prediction for [1, 0, 1, 1, 0, 0, 1, 0]: 0.0 Prediction for [1, 0, 1, 1, 0, 0, 1, 1]: 0.999999999999995 Prediction for [1, 0, 1, 1, 0, 1, 0, 0]: 0.0 Prediction for [1, 0, 1, 1, 0, 1, 0, 1]: 0.999999999999995 Prediction for [1, 0, 1, 1, 0, 1, 1, 0]: 0.0 Prediction for [1, 0, 1, 1, 0, 1, 1, 1]: 0.0 Prediction for [1, 0, 1, 1, 1, 0, 0, 0]: 0.0 Prediction for [1, 0, 1, 1, 1, 0, 0, 1]: 0.0 Prediction for [1, 0, 1, 1, 1, 0, 1, 0]: 0.0 Prediction for [1, 0, 1, 1, 1, 0, 1, 1]: 0.0 Prediction for [1, 0, 1, 1, 1, 1, 0, 0]: 0.0 Prediction for [1, 0, 1, 1, 1, 1, 0, 1]: 0.0 Prediction for [1, 0, 1, 1, 1, 1, 1, 0]: 0.0 Prediction for [1, 0, 1, 1, 1, 1, 1, 1]: 1.000000000000003 Prediction for [1, 1, 0, 0, 0, 0, 0, 0]: 0.0 Prediction for [1, 1, 0, 0, 0, 0, 0, 1]: 0.9999999999999932 Prediction for [1, 1, 0, 0, 0, 0, 1, 0]: 0.0 Prediction for [1, 1, 0, 0, 0, 0, 1, 1]: 0.0 Prediction for [1, 1, 0, 0, 0, 1, 0, 0]: 0.0 Prediction for [1, 1, 0, 0, 0, 1, 0, 1]: 1.0000000000000062 Prediction for [1, 1, 0, 0, 0, 1, 1, 0]: 0.0 Prediction for [1, 1, 0, 0, 0, 1, 1, 1]: 0.9999999999999994 Prediction for [1, 1, 0, 0, 1, 0, 0, 0]: 0.0 Prediction for [1, 1, 0, 0, 1, 0, 0, 1]: 4.829470157119431E-15 Prediction for [1, 1, 0, 0, 1, 0, 1, 0]: 0.0 Prediction for [1, 1, 0, 0, 1, 0, 1, 1]: 0.0 Prediction for [1, 1, 0, 0, 1, 1, 0, 0]: 0.0 Prediction for [1, 1, 0, 0, 1, 1, 0, 1]: 0.0 Prediction for [1, 1, 0, 0, 1, 1, 1, 0]: 0.0 Prediction for [1, 1, 0, 0, 1, 1, 1, 1]: 0.0 Prediction for [1, 1, 0, 1, 0, 0, 0, 0]: 0.0 Prediction for [1, 1, 0, 1, 0, 0, 0, 1]: 0.0 Prediction for [1, 1, 0, 1, 0, 0, 1, 0]: 0.0 Prediction for [1, 1, 0, 1, 0, 0, 1, 1]: 0.9999999999999941 Prediction for [1, 1, 0, 1, 0, 1, 0, 0]: 0.0 Prediction for [1, 1, 0, 1, 0, 1, 0, 1]: 0.0 Prediction for [1, 1, 0, 1, 0, 1, 1, 0]: 0.0 Prediction for [1, 1, 0, 1, 0, 1, 1, 1]: 0.0 Prediction for [1, 1, 0, 1, 1, 0, 0, 0]: 0.0 Prediction for [1, 1, 0, 1, 1, 0, 0, 1]: 2.248201624865942E-15 Prediction for [1, 1, 0, 1, 1, 0, 1, 0]: 0.0 Prediction for [1, 1, 0, 1, 1, 0, 1, 1]: 2.9976021664879227E-15 Prediction for [1, 1, 0, 1, 1, 1, 0, 0]: 0.0 Prediction for [1, 1, 0, 1, 1, 1, 0, 1]: 0.0 Prediction for [1, 1, 0, 1, 1, 1, 1, 0]: 0.0 Prediction for [1, 1, 0, 1, 1, 1, 1, 1]: 0.9999999999999986 Prediction for [1, 1, 1, 0, 0, 0, 0, 0]: 0.0 Prediction for [1, 1, 1, 0, 0, 0, 0, 1]: 7.965850201685498E-15 Prediction for [1, 1, 1, 0, 0, 0, 1, 0]: 0.0 Prediction for [1, 1, 1, 0, 0, 0, 1, 1]: 0.9999999999999954 Prediction for [1, 1, 1, 0, 0, 1, 0, 0]: 0.0 Prediction for [1, 1, 1, 0, 0, 1, 0, 1]: 0.9999999999999977 Prediction for [1, 1, 1, 0, 0, 1, 1, 0]: 0.0 Prediction for [1, 1, 1, 0, 0, 1, 1, 1]: 0.0 Prediction for [1, 1, 1, 0, 1, 0, 0, 0]: 0.0 Prediction for [1, 1, 1, 0, 1, 0, 0, 1]: 1.0000000000000013 Prediction for [1, 1, 1, 0, 1, 0, 1, 0]: 0.0 Prediction for [1, 1, 1, 0, 1, 0, 1, 1]: 0.0 Prediction for [1, 1, 1, 0, 1, 1, 0, 0]: 0.0 Prediction for [1, 1, 1, 0, 1, 1, 0, 1]: 3.83026943495679E-15 Prediction for [1, 1, 1, 0, 1, 1, 1, 0]: 0.0 Prediction for [1, 1, 1, 0, 1, 1, 1, 1]: 0.9999999999999963 Prediction for [1, 1, 1, 1, 0, 0, 0, 0]: 0.0 Prediction for [1, 1, 1, 1, 0, 0, 0, 1]: 0.9999999999999915 Prediction for [1, 1, 1, 1, 0, 0, 1, 0]: 0.0 Prediction for [1, 1, 1, 1, 0, 0, 1, 1]: 1.887379141862766E-15 Prediction for [1, 1, 1, 1, 0, 1, 0, 0]: 0.0 Prediction for [1, 1, 1, 1, 0, 1, 0, 1]: 0.0 Prediction for [1, 1, 1, 1, 0, 1, 1, 0]: 0.0 Prediction for [1, 1, 1, 1, 0, 1, 1, 1]: 4.3298697960381105E-15 Prediction for [1, 1, 1, 1, 1, 0, 0, 0]: 0.0 Prediction for [1, 1, 1, 1, 1, 0, 0, 1]: 0.0 Prediction for [1, 1, 1, 1, 1, 0, 1, 0]: 0.0 Prediction for [1, 1, 1, 1, 1, 0, 1, 1]: 0.9999999999999981 Prediction for [1, 1, 1, 1, 1, 1, 0, 0]: 0.0 Prediction for [1, 1, 1, 1, 1, 1, 0, 1]: 0.0 Prediction for [1, 1, 1, 1, 1, 1, 1, 0]: 0.0 Prediction for [1, 1, 1, 1, 1, 1, 1, 1]: 0.0 BUILD SUCCESSFUL (total time: 1 minute 42 seconds)
  23. @Mark-XP And this one is for the primes, waaaoooohhhh Dietmar package multiof3; import java.util.Arrays; import java.util.Random; public class Multiof3 { private final int numInputNodes = 8; private final int numHiddenNodes = 26; private final int numOutputNodes = 1; private final double learningRate = 0.03; private final int numEpochs = 200000; private final double errorThreshold = 0.00000000000000000000000000000001; private double[][] inputToHiddenWeights; private double[][] hiddenToOutputWeights; private double[] hiddenBiases; private double[] outputBiases; public Multiof3() { Random random = new Random(); inputToHiddenWeights = new double[numInputNodes][numHiddenNodes]; hiddenToOutputWeights = new double[numHiddenNodes][numOutputNodes]; hiddenBiases = new double[numHiddenNodes]; outputBiases = new double[numOutputNodes]; for (int i = 0; i < numInputNodes; i++) { for (int j = 0; j < numHiddenNodes; j++) { inputToHiddenWeights[i][j] = random.nextDouble() - 0.5; } } for (int i = 0; i < numHiddenNodes; i++) { for (int j = 0; j < numOutputNodes; j++) { hiddenToOutputWeights[i][j] = random.nextDouble() - 0.5; } hiddenBiases[i] = random.nextDouble() - 0.5; } for (int i = 0; i < numOutputNodes; i++) { outputBiases[i] = random.nextDouble() - 0.5; } } public double relu(double x) { return Math.max(0, x); } public double reluDerivative(double x) { return x > 0 ? 1 : 0; } public void train(double[][] trainingInputs, double[] trainingTargets) { for (int epoch = 1; epoch <= numEpochs; epoch++) { double totalError = 0.0; for (int i = 0; i < trainingInputs.length; i++) { double[] input = trainingInputs[i]; double target = trainingTargets[i]; // Forward propagation double[] hiddenOutputs = new double[numHiddenNodes]; for (int j = 0; j < numHiddenNodes; j++) { double weightedSum = 0.0; for (int k = 0; k < numInputNodes; k++) { weightedSum += inputToHiddenWeights[k][j] * input[k]; } hiddenOutputs[j] = relu(weightedSum + hiddenBiases[j]); } double output = 0.0; for (int j = 0; j < numOutputNodes; j++) { double weightedSum = 0.0; for (int k = 0; k < numHiddenNodes; k++) { weightedSum += hiddenToOutputWeights[k][j] * hiddenOutputs[k]; } output = relu(weightedSum + outputBiases[j]); } // Backward propagation double outputErrorGradient = (output - target) * reluDerivative(output); for (int j = 0; j < numHiddenNodes; j++) { double hiddenErrorGradient = outputErrorGradient * hiddenToOutputWeights[j][0] * reluDerivative(hiddenOutputs[j]); for (int k = 0; k < numInputNodes; k++) { inputToHiddenWeights[k][j] -= learningRate * input[k] * hiddenErrorGradient; } hiddenBiases[j] -= learningRate * hiddenErrorGradient; } hiddenToOutputWeights[0][0] -= learningRate * hiddenOutputs[0] * outputErrorGradient; outputBiases[0] -= learningRate * outputErrorGradient; // Update total error totalError += Math.pow(output - target, 2); } // Calculate mean error and check for convergence double meanError = totalError / trainingInputs.length; if (meanError < errorThreshold) { System.out.println("Training complete. Mean error: " + meanError); break; } else if (epoch % 10000 == 0) { System.out.println("Epoch " + epoch + ". Mean error: " + meanError); } } } public double predict(double[] input) { double[] hiddenOutputs = new double[numHiddenNodes]; for (int j = 0; j < numHiddenNodes; j++) { double weightedSum = 0.0; for (int k = 0; k < numInputNodes; k++) { weightedSum += inputToHiddenWeights[k][j] * input[k]; } hiddenOutputs[j] = relu(weightedSum + hiddenBiases[j]); } double output = 0.0; for (int j = 0; j < numOutputNodes; j++) { double weightedSum = 0.0; for (int k = 0; k < numHiddenNodes; k++) { weightedSum += hiddenToOutputWeights[k][j] * hiddenOutputs[k]; } output = relu(weightedSum + outputBiases[j]); } return output; } public static void main(String[] args) { // Example usage of the neural network double[][] trainingInputs = {{0, 0, 0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0, 0, 1}, {0, 0, 0, 0, 0, 0, 1, 0}, {0, 0, 0, 0, 0, 0, 1, 1}, {0, 0, 0, 0, 0, 1, 0, 0}, {0, 0, 0, 0, 0, 1, 0, 1}, {0, 0, 0, 0, 0, 1, 1, 0}, {0, 0, 0, 0, 0, 1, 1, 1}, {0, 0, 0, 0, 1, 0, 0, 0}, {0, 0, 0, 0, 1, 0, 0, 1}, {0, 0, 0, 0, 1, 0, 1, 0}, {0, 0, 0, 0, 1, 0, 1, 1}, {0, 0, 0, 0, 1, 1, 0, 0}, {0, 0, 0, 0, 1, 1, 0, 1}, {0, 0, 0, 0, 1, 1, 1, 0}, {0, 0, 0, 0, 1, 1, 1, 1}, {0, 0, 0, 1, 0, 0, 0, 0}, {0, 0, 0, 1, 0, 0, 0, 1}, {0, 0, 0, 1, 0, 0, 1, 0}, {0, 0, 0, 1, 0, 0, 1, 1}, {0, 0, 0, 1, 0, 1, 0, 0}, {0, 0, 0, 1,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, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0 }; Multiof3 nn = new Multiof3(); nn.train(trainingInputs, trainingTargets); System.out.println("Prediction for [0, 0, 0, 0, 0, 0, 0, 0]: " + nn.predict(new double[]{0, 0, 0, 0, 0, 0, 0, 0})); System.out.println("Prediction for [0, 0, 0, 0, 0, 0, 0, 1]: " + nn.predict(new double[]{0, 0, 0, 0, 0, 0, 0, 1})); System.out.println("Prediction for [0, 0, 0, 0, 0, 0, 1, 0]: " + nn.predict(new double[]{0, 0, 0, 0, 0, 0, 1, 0})); System.out.println("Prediction for [0, 0, 0, 0, 0, 0, 1, 1]: " + nn.predict(new double[]{0, 0, 0, 0, 0, 0, 1, 1})); System.out.println("Prediction for [0, 0, 0, 0, 0, 1, 0, 0]: " + nn.predict(new double[]{0, 0, 0, 0, 0, 1, 0, 0})); System.out.println("Prediction for [0, 0, 0, 0, 0, 1, 0, 1]: " + nn.predict(new double[]{0, 0, 0, 0, 0, 1, 0, 1})); System.out.println("Prediction for [0, 0, 0, 0, 0, 1, 1, 0]: " + nn.predict(new double[]{0, 0, 0, 0, 0, 1, 1, 0})); System.out.println("Prediction for [0, 0, 0, 0, 0, 1, 1, 1]: " + nn.predict(new double[]{0, 0, 0, 0, 0, 1, 1, 1})); System.out.println("Prediction for [0, 0, 0, 0, 1, 0, 0, 0]: " + nn.predict(new double[]{0, 0, 0, 0, 1, 0, 0, 0})); System.out.println("Prediction for [0, 0, 0, 0, 1, 0, 0, 1]: " + nn.predict(new double[]{0, 0, 0, 0, 1, 0, 0, 1})); System.out.println("Prediction for [0, 0, 0, 0, 1, 0, 1, 0]: " + nn.predict(new double[]{0, 0, 0, 0, 1, 0, 1, 0})); System.out.println("Prediction for [0, 0, 0, 0, 1, 0, 1, 1]: " + nn.predict(new double[]{0, 0, 0, 0, 1, 0, 1, 1})); System.out.println("Prediction for [0, 0, 0, 0, 1, 1, 0, 0]: " + nn.predict(new double[]{0, 0, 0, 0, 1, 1, 0, 0})); System.out.println("Prediction for [0, 0, 0, 0, 1, 1, 0, 1]: " + nn.predict(new double[]{0, 0, 0, 0, 1, 1, 0, 1})); System.out.println("Prediction for [0, 0, 0, 0, 1, 1, 1, 0]: " + nn.predict(new double[]{0, 0, 0, 0, 1, 1, 1, 0})); System.out.println("Prediction for [0, 0, 0, 0, 1, 1, 1, 1]: " + nn.predict(new double[]{0, 0, 0, 0, 1, 1, 1, 1})); System.out.println("Prediction for [0, 0, 0, 1, 0, 0, 0, 0]: " + nn.predict(new double[]{0, 0, 0, 1, 0, 0, 0, 0})); System.out.println("Prediction for [0, 0, 0, 1, 0, 0, 0, 1]: " + nn.predict(new double[]{0, 0, 0, 1, 0, 0, 0, 1})); System.out.println("Prediction for [0, 0, 0, 1, 0, 0, 1, 0]: " + nn.predict(new double[]{0, 0, 0, 1, 0, 0, 1, 0})); System.out.println("Prediction for [0, 0, 0, 1, 0, 0, 1, 1]: " + nn.predict(new double[]{0, 0, 0, 1, 0, 0, 1, 1})); System.out.println("Prediction for [0, 0, 0, 1, 0, 1, 0, 0]: " + nn.predict(new double[]{0, 0, 0, 1, 0, 1, 0, 0})); System.out.println("Prediction for [0, 0, 0, 1, 0, 1, 0, 1]: " + nn.predict(new double[]{0, 0, 0, 1, 0, 1, 0, 1})); System.out.println("Prediction for [0, 0, 0, 1, 0, 1, 1, 0]: " + nn.predict(new double[]{0, 0, 0, 1, 0, 1, 1, 0})); System.out.println("Prediction for [0, 0, 0, 1, 0, 1, 1, 1]: " + nn.predict(new double[]{0, 0, 0, 1, 0, 1, 1, 1})); System.out.println("Prediction for [0, 0, 0, 1, 1, 0, 0, 0]: " + nn.predict(new double[]{0, 0, 0, 1, 1, 0, 0, 0})); System.out.println("Prediction for [0, 0, 0, 1, 1, 0, 0, 1]: " + nn.predict(new double[]{0, 0, 0, 1, 1, 0, 0, 1})); System.out.println("Prediction for [0, 0, 0, 1, 1, 0, 1, 0]: " + nn.predict(new double[]{0, 0, 0, 1, 1, 0, 1, 0})); System.out.println("Prediction for [0, 0, 0, 1, 1, 0, 1, 1]: " + nn.predict(new double[]{0, 0, 0, 1, 1, 0, 1, 1})); System.out.println("Prediction for [0, 0, 0, 1, 1, 1, 0, 0]: " + nn.predict(new double[]{0, 0, 0, 1, 1, 1, 0, 0})); System.out.println("Prediction for [0, 0, 0, 1, 1, 1, 0, 1]: " + nn.predict(new double[]{0, 0, 0, 1, 1, 1, 0, 1})); System.out.println("Prediction for [0, 0, 0, 1, 1, 1, 1, 0]: " + nn.predict(new double[]{0, 0, 0, 1, 1, 1, 1, 0})); System.out.println("Prediction for [0, 0, 0, 1, 1, 1, 1, 1]: " + nn.predict(new double[]{0, 0, 0, 1, 1, 1, 1, 1})); System.out.println("Prediction for [0, 0, 1, 0, 0, 0, 0, 0]: " + nn.predict(new double[]{0, 0, 1, 0, 0, 0, 0, 0})); System.out.println("Prediction for [0, 0, 1, 0, 0, 0, 0, 1]: " + nn.predict(new double[]{0, 0, 1, 0, 0, 0, 0, 1})); System.out.println("Prediction for [0, 0, 1, 0, 0, 0, 1, 0]: " + nn.predict(new double[]{0, 0, 1, 0, 0, 0, 1, 0})); System.out.println("Prediction for [0, 0, 1, 0, 0, 0, 1, 1]: " + nn.predict(new double[]{0, 0, 1, 0, 0, 0, 1, 1})); System.out.println("Prediction for [0, 0, 1, 0, 0, 1, 0, 0]: " + nn.predict(new double[]{0, 0, 1, 0, 0, 1, 0, 0})); System.out.println("Prediction for [0, 0, 1, 0, 0, 1, 0, 1]: " + nn.predict(new double[]{0, 0, 1, 0, 0, 1, 0, 1})); System.out.println("Prediction for [0, 0, 1, 0, 0, 1, 1, 0]: " + nn.predict(new double[]{0, 0, 1, 0, 0, 1, 1, 0})); System.out.println("Prediction for [0, 0, 1, 0, 0, 1, 1, 1]: " + nn.predict(new double[]{0, 0, 1, 0, 0, 1, 1, 1})); System.out.println("Prediction for [0, 0, 1, 0, 1, 0, 0, 0]: " + nn.predict(new double[]{0, 0, 1, 0, 1, 0, 0, 0})); System.out.println("Prediction for [0, 0, 1, 0, 1, 0, 0, 1]: " + nn.predict(new double[]{0, 0, 1, 0, 1, 0, 0, 1})); System.out.println("Prediction for [0, 0, 1, 0, 1, 0, 1, 0]: " + nn.predict(new double[]{0, 0, 1, 0, 1, 0, 1, 0})); System.out.println("Prediction for [0, 0, 1, 0, 1, 0, 1, 1]: " + nn.predict(new double[]{0, 0, 1, 0, 1, 0, 1, 1})); System.out.println("Prediction for [0, 0, 1, 0, 1, 1, 0, 0]: " + nn.predict(new double[]{0, 0, 1, 0, 1, 1, 0, 0})); System.out.println("Prediction for [0, 0, 1, 0, 1, 1, 0, 1]: " + nn.predict(new double[]{0, 0, 1, 0, 1, 1, 0, 1})); System.out.println("Prediction for [0, 0, 1, 0, 1, 1, 1, 0]: " + nn.predict(new double[]{0, 0, 1, 0, 1, 1, 1, 0})); System.out.println("Prediction for [0, 0, 1, 0, 1, 1, 1, 1]: " + nn.predict(new double[]{0, 0, 1, 0, 1, 1, 1, 1})); System.out.println("Prediction for [0, 0, 1, 1, 0, 0, 0, 0]: " + nn.predict(new double[]{0, 0, 1, 1, 0, 0, 0, 0})); System.out.println("Prediction for [0, 0, 1, 1, 0, 0, 0, 1]: " + nn.predict(new double[]{0, 0, 1, 1, 0, 0, 0, 1})); System.out.println("Prediction for [0, 0, 1, 1, 0, 0, 1, 0]: " + nn.predict(new double[]{0, 0, 1, 1, 0, 0, 1, 0})); System.out.println("Prediction for [0, 0, 1, 1, 0, 0, 1, 1]: " + nn.predict(new double[]{0, 0, 1, 1, 0, 0, 1, 1})); System.out.println("Prediction for [0, 0, 1, 1, 0, 1, 0, 0]: " + nn.predict(new double[]{0, 0, 1, 1, 0, 1, 0, 0})); System.out.println("Prediction for [0, 0, 1, 1, 0, 1, 0, 1]: " + nn.predict(new double[]{0, 0, 1, 1, 0, 1, 0, 1})); System.out.println("Prediction for [0, 0, 1, 1, 0, 1, 1, 0]: " + nn.predict(new double[]{0, 0, 1, 1, 0, 1, 1, 0})); System.out.println("Prediction for [0, 0, 1, 1, 0, 1, 1, 1]: " + nn.predict(new double[]{0, 0, 1, 1, 0, 1, 1, 1})); System.out.println("Prediction for [0, 0, 1, 1, 1, 0, 0, 0]: " + nn.predict(new double[]{0, 0, 1, 1, 1, 0, 0, 0})); System.out.println("Prediction for [0, 0, 1, 1, 1, 0, 0, 1]: " + nn.predict(new double[]{0, 0, 1, 1, 1, 0, 0, 1})); System.out.println("Prediction for [0, 0, 1, 1, 1, 0, 1, 0]: " + nn.predict(new double[]{0, 0, 1, 1, 1, 0, 1, 0})); System.out.println("Prediction for [0, 0, 1, 1, 1, 0, 1, 1]: " + nn.predict(new double[]{0, 0, 1, 1, 1, 0, 1, 1})); System.out.println("Prediction for [0, 0, 1, 1, 1, 1, 0, 0]: " + nn.predict(new double[]{0, 0, 1, 1, 1, 1, 0, 0})); System.out.println("Prediction for [0, 0, 1, 1, 1, 1, 0, 1]: " + nn.predict(new double[]{0, 0, 1, 1, 1, 1, 0, 1})); System.out.println("Prediction for [0, 0, 1, 1, 1, 1, 1, 0]: " + nn.predict(new double[]{0, 0, 1, 1, 1, 1, 1, 0})); System.out.println("Prediction for [0, 0, 1, 1, 1, 1, 1, 1]: " + nn.predict(new double[]{0, 0, 1, 1, 1, 1, 1, 1})); System.out.println("Prediction for [0, 1, 0, 0, 0, 0, 0, 0]: " + nn.predict(new double[]{0, 1, 0, 0, 0, 0, 0, 0})); System.out.println("Prediction for [0, 1, 0, 0, 0, 0, 0, 1]: " + nn.predict(new double[]{0, 1, 0, 0, 0, 0, 0, 1})); System.out.println("Prediction for [0, 1, 0, 0, 0, 0, 1, 0]: " + nn.predict(new double[]{0, 1, 0, 0, 0, 0, 1, 0})); System.out.println("Prediction for [0, 1, 0, 0, 0, 0, 1, 1]: " + nn.predict(new double[]{0, 1, 0, 0, 0, 0, 1, 1})); System.out.println("Prediction for [0, 1, 0, 0, 0, 1, 0, 0]: " + nn.predict(new double[]{0, 1, 0, 0, 0, 1, 0, 0})); System.out.println("Prediction for [0, 1, 0, 0, 0, 1, 0, 1]: " + nn.predict(new double[]{0, 1, 0, 0, 0, 1, 0, 1})); System.out.println("Prediction for [0, 1, 0, 0, 0, 1, 1, 0]: " + nn.predict(new double[]{0, 1, 0, 0, 0, 1, 1, 0})); System.out.println("Prediction for [0, 1, 0, 0, 0, 1, 1, 1]: " + nn.predict(new double[]{0, 1, 0, 0, 0, 1, 1, 1})); System.out.println("Prediction for [0, 1, 0, 0, 1, 0, 0, 0]: " + nn.predict(new double[]{0, 1, 0, 0, 1, 0, 0, 0})); System.out.println("Prediction for [0, 1, 0, 0, 1, 0, 0, 1]: " + nn.predict(new double[]{0, 1, 0, 0, 1, 0, 0, 1})); System.out.println("Prediction for [0, 1, 0, 0, 1, 0, 1, 0]: " + nn.predict(new double[]{0, 1, 0, 0, 1, 0, 1, 0})); System.out.println("Prediction for [0, 1, 0, 0, 1, 0, 1, 1]: " + nn.predict(new double[]{0, 1, 0, 0, 1, 0, 1, 1})); System.out.println("Prediction for [0, 1, 0, 0, 1, 1, 0, 0]: " + nn.predict(new double[]{0, 1, 0, 0, 1, 1, 0, 0})); System.out.println("Prediction for [0, 1, 0, 0, 1, 1, 0, 1]: " + nn.predict(new double[]{0, 1, 0, 0, 1, 1, 0, 1})); System.out.println("Prediction for [0, 1, 0, 0, 1, 1, 1, 0]: " + nn.predict(new double[]{0, 1, 0, 0, 1, 1, 1, 0})); System.out.println("Prediction for [0, 1, 0, 0, 1, 1, 1, 1]: " + nn.predict(new double[]{0, 1, 0, 0, 1, 1, 1, 1})); System.out.println("Prediction for [0, 1, 0, 1, 0, 0, 0, 0]: " + nn.predict(new double[]{0, 1, 0, 1, 0, 0, 0, 0})); System.out.println("Prediction for [0, 1, 0, 1, 0, 0, 0, 1]: " + nn.predict(new double[]{0, 1, 0, 1, 0, 0, 0, 1})); System.out.println("Prediction for [0, 1, 0, 1, 0, 0, 1, 0]: " + nn.predict(new double[]{0, 1, 0, 1, 0, 0, 1, 0})); System.out.println("Prediction for [0, 1, 0, 1, 0, 0, 1, 1]: " + nn.predict(new double[]{0, 1, 0, 1, 0, 0, 1, 1})); System.out.println("Prediction for [0, 1, 0, 1, 0, 1, 0, 0]: " + nn.predict(new double[]{0, 1, 0, 1, 0, 1, 0, 0})); System.out.println("Prediction for [0, 1, 0, 1, 0, 1, 0, 1]: " + nn.predict(new double[]{0, 1, 0, 1, 0, 1, 0, 1})); System.out.println("Prediction for [0, 1, 0, 1, 0, 1, 1, 0]: " + nn.predict(new double[]{0, 1, 0, 1, 0, 1, 1, 0})); System.out.println("Prediction for [0, 1, 0, 1, 0, 1, 1, 1]: " + nn.predict(new double[]{0, 1, 0, 1, 0, 1, 1, 1})); System.out.println("Prediction for [0, 1, 0, 1, 1, 0, 0, 0]: " + nn.predict(new double[]{0, 1, 0, 1, 1, 0, 0, 0})); System.out.println("Prediction for [0, 1, 0, 1, 1, 0, 0, 1]: " + nn.predict(new double[]{0, 1, 0, 1, 1, 0, 0, 1})); System.out.println("Prediction for [0, 1, 0, 1, 1, 0, 1, 0]: " + nn.predict(new double[]{0, 1, 0, 1, 1, 0, 1, 0})); System.out.println("Prediction for [0, 1, 0, 1, 1, 0, 1, 1]: " + nn.predict(new double[]{0, 1, 0, 1, 1, 0, 1, 1})); System.out.println("Prediction for [0, 1, 0, 1, 1, 1, 0, 0]: " + nn.predict(new double[]{0, 1, 0, 1, 1, 1, 0, 0})); System.out.println("Prediction for [0, 1, 0, 1, 1, 1, 0, 1]: " + nn.predict(new double[]{0, 1, 0, 1, 1, 1, 0, 1})); System.out.println("Prediction for [0, 1, 0, 1, 1, 1, 1, 0]: " + nn.predict(new double[]{0, 1, 0, 1, 1, 1, 1, 0})); System.out.println("Prediction for [0, 1, 0, 1, 1, 1, 1, 1]: " + nn.predict(new double[]{0, 1, 0, 1, 1, 1, 1, 1})); System.out.println("Prediction for [0, 1, 1, 0, 0, 0, 0, 0]: " + nn.predict(new double[]{0, 1, 1, 0, 0, 0, 0, 0})); System.out.println("Prediction for [0, 1, 1, 0, 0, 0, 0, 1]: " + nn.predict(new double[]{0, 1, 1, 0, 0, 0, 0, 1})); System.out.println("Prediction for [0, 1, 1, 0, 0, 0, 1, 0]: " + nn.predict(new double[]{0, 1, 1, 0, 0, 0, 1, 0})); System.out.println("Prediction for [0, 1, 1, 0, 0, 0, 1, 1]: " + nn.predict(new double[]{0, 1, 1, 0, 0, 0, 1, 1})); System.out.println("Prediction for [0, 1, 1, 0, 0, 1, 0, 0]: " + nn.predict(new double[]{0, 1, 1, 0, 0, 1, 0, 0})); System.out.println("Prediction for [0, 1, 1, 0, 0, 1, 0, 1]: " + nn.predict(new double[]{0, 1, 1, 0, 0, 1, 0, 1})); System.out.println("Prediction for [0, 1, 1, 0, 0, 1, 1, 0]: " + nn.predict(new double[]{0, 1, 1, 0, 0, 1, 1, 0})); System.out.println("Prediction for [0, 1, 1, 0, 0, 1, 1, 1]: " + nn.predict(new double[]{0, 1, 1, 0, 0, 1, 1, 1})); System.out.println("Prediction for [0, 1, 1, 0, 1, 0, 0, 0]: " + nn.predict(new double[]{0, 1, 1, 0, 1, 0, 0, 0})); System.out.println("Prediction for [0, 1, 1, 0, 1, 0, 0, 1]: " + nn.predict(new double[]{0, 1, 1, 0, 1, 0, 0, 1})); System.out.println("Prediction for [0, 1, 1, 0, 1, 0, 1, 0]: " + nn.predict(new double[]{0, 1, 1, 0, 1, 0, 1, 0})); System.out.println("Prediction for [0, 1, 1, 0, 1, 0, 1, 1]: " + nn.predict(new double[]{0, 1, 1, 0, 1, 0, 1, 1})); System.out.println("Prediction for [0, 1, 1, 0, 1, 1, 0, 0]: " + nn.predict(new double[]{0, 1, 1, 0, 1, 1, 0, 0})); System.out.println("Prediction for [0, 1, 1, 0, 1, 1, 0, 1]: " + nn.predict(new double[]{0, 1, 1, 0, 1, 1, 0, 1})); System.out.println("Prediction for [0, 1, 1, 0, 1, 1, 1, 0]: " + nn.predict(new double[]{0, 1, 1, 0, 1, 1, 1, 0})); System.out.println("Prediction for [0, 1, 1, 0, 1, 1, 1, 1]: " + nn.predict(new double[]{0, 1, 1, 0, 1, 1, 1, 1})); System.out.println("Prediction for [0, 1, 1, 1, 0, 0, 0, 0]: " + nn.predict(new double[]{0, 1, 1, 1, 0, 0, 0, 0})); System.out.println("Prediction for [0, 1, 1, 1, 0, 0, 0, 1]: " + nn.predict(new double[]{0, 1, 1, 1, 0, 0, 0, 1})); System.out.println("Prediction for [0, 1, 1, 1, 0, 0, 1, 0]: " + nn.predict(new double[]{0, 1, 1, 1, 0, 0, 1, 0})); System.out.println("Prediction for [0, 1, 1, 1, 0, 0, 1, 1]: " + nn.predict(new double[]{0, 1, 1, 1, 0, 0, 1, 1})); System.out.println("Prediction for [0, 1, 1, 1, 0, 1, 0, 0]: " + nn.predict(new double[]{0, 1, 1, 1, 0, 1, 0, 0})); System.out.println("Prediction for [0, 1, 1, 1, 0, 1, 0, 1]: " + nn.predict(new double[]{0, 1, 1, 1, 0, 1, 0, 1})); System.out.println("Prediction for [0, 1, 1, 1, 0, 1, 1, 0]: " + nn.predict(new double[]{0, 1, 1, 1, 0, 1, 1, 0})); System.out.println("Prediction for [0, 1, 1, 1, 0, 1, 1, 1]: " + nn.predict(new double[]{0, 1, 1, 1, 0, 1, 1, 1})); System.out.println("Prediction for [0, 1, 1, 1, 1, 0, 0, 0]: " + nn.predict(new double[]{0, 1, 1, 1, 1, 0, 0, 0})); System.out.println("Prediction for [0, 1, 1, 1, 1, 0, 0, 1]: " + nn.predict(new double[]{0, 1, 1, 1, 1, 0, 0, 1})); System.out.println("Prediction for [0, 1, 1, 1, 1, 0, 1, 0]: " + nn.predict(new double[]{0, 1, 1, 1, 1, 0, 1, 0})); System.out.println("Prediction for [0, 1, 1, 1, 1, 0, 1, 1]: " + nn.predict(new double[]{0, 1, 1, 1, 1, 0, 1, 1})); System.out.println("Prediction for [0, 1, 1, 1, 1, 1, 0, 0]: " + nn.predict(new double[]{0, 1, 1, 1, 1, 1, 0, 0})); System.out.println("Prediction for [0, 1, 1, 1, 1, 1, 0, 1]: " + nn.predict(new double[]{0, 1, 1, 1, 1, 1, 0, 1})); System.out.println("Prediction for [0, 1, 1, 1, 1, 1, 1, 0]: " + nn.predict(new double[]{0, 1, 1, 1, 1, 1, 1, 0})); System.out.println("Prediction for [0, 1, 1, 1, 1, 1, 1, 1]: " + nn.predict(new double[]{0, 1, 1, 1, 1, 1, 1, 1})); System.out.println("Prediction for [1, 0, 0, 0, 0, 0, 0, 0]: " + nn.predict(new double[]{1, 0, 0, 0, 0, 0, 0, 0})); System.out.println("Prediction for [1, 0, 0, 0, 0, 0, 0, 1]: " + nn.predict(new double[]{1, 0, 0, 0, 0, 0, 0, 1})); System.out.println("Prediction for [1, 0, 0, 0, 0, 0, 1, 0]: " + nn.predict(new double[]{1, 0, 0, 0, 0, 0, 1, 0})); System.out.println("Prediction for [1, 0, 0, 0, 0, 0, 1, 1]: " + nn.predict(new double[]{1, 0, 0, 0, 0, 0, 1, 1})); System.out.println("Prediction for [1, 0, 0, 0, 0, 1, 0, 0]: " + nn.predict(new double[]{1, 0, 0, 0, 0, 1, 0, 0})); System.out.println("Prediction for [1, 0, 0, 0, 0, 1, 0, 1]: " + nn.predict(new double[]{1, 0, 0, 0, 0, 1, 0, 1})); System.out.println("Prediction for [1, 0, 0, 0, 0, 1, 1, 0]: " + nn.predict(new double[]{1, 0, 0, 0, 0, 1, 1, 0})); System.out.println("Prediction for [1, 0, 0, 0, 0, 1, 1, 1]: " + nn.predict(new double[]{1, 0, 0, 0, 0, 1, 1, 1})); System.out.println("Prediction for [1, 0, 0, 0, 1, 0, 0, 0]: " + nn.predict(new double[]{1, 0, 0, 0, 1, 0, 0, 0})); System.out.println("Prediction for [1, 0, 0, 0, 1, 0, 0, 1]: " + nn.predict(new double[]{1, 0, 0, 0, 1, 0, 0, 1})); System.out.println("Prediction for [1, 0, 0, 0, 1, 0, 1, 0]: " + nn.predict(new double[]{1, 0, 0, 0, 1, 0, 1, 0})); System.out.println("Prediction for [1, 0, 0, 0, 1, 0, 1, 1]: " + nn.predict(new double[]{1, 0, 0, 0, 1, 0, 1, 1})); System.out.println("Prediction for [1, 0, 0, 0, 1, 1, 0, 0]: " + nn.predict(new double[]{1, 0, 0, 0, 1, 1, 0, 0})); System.out.println("Prediction for [1, 0, 0, 0, 1, 1, 0, 1]: " + nn.predict(new double[]{1, 0, 0, 0, 1, 1, 0, 1})); System.out.println("Prediction for [1, 0, 0, 0, 1, 1, 1, 0]: " + nn.predict(new double[]{1, 0, 0, 0, 1, 1, 1, 0})); System.out.println("Prediction for [1, 0, 0, 0, 1, 1, 1, 1]: " + nn.predict(new double[]{1, 0, 0, 0, 1, 1, 1, 1})); System.out.println("Prediction for [1, 0, 0, 1, 0, 0, 0, 0]: " + nn.predict(new double[]{1, 0, 0, 1, 0, 0, 0, 0})); System.out.println("Prediction for [1, 0, 0, 1, 0, 0, 0, 1]: " + nn.predict(new double[]{1, 0, 0, 1, 0, 0, 0, 1})); System.out.println("Prediction for [1, 0, 0, 1, 0, 0, 1, 0]: " + nn.predict(new double[]{1, 0, 0, 1, 0, 0, 1, 0})); System.out.println("Prediction for [1, 0, 0, 1, 0, 0, 1, 1]: " + nn.predict(new double[]{1, 0, 0, 1, 0, 0, 1, 1})); System.out.println("Prediction for [1, 0, 0, 1, 0, 1, 0, 0]: " + nn.predict(new double[]{1, 0, 0, 1, 0, 1, 0, 0})); System.out.println("Prediction for [1, 0, 0, 1, 0, 1, 0, 1]: " + nn.predict(new double[]{1, 0, 0, 1, 0, 1, 0, 1})); System.out.println("Prediction for [1, 0, 0, 1, 0, 1, 1, 0]: " + nn.predict(new double[]{1, 0, 0, 1, 0, 1, 1, 0})); System.out.println("Prediction for [1, 0, 0, 1, 0, 1, 1, 1]: " + nn.predict(new double[]{1, 0, 0, 1, 0, 1, 1, 1})); System.out.println("Prediction for [1, 0, 0, 1, 1, 0, 0, 0]: " + nn.predict(new double[]{1, 0, 0, 1, 1, 0, 0, 0})); System.out.println("Prediction for [1, 0, 0, 1, 1, 0, 0, 1]: " + nn.predict(new double[]{1, 0, 0, 1, 1, 0, 0, 1})); System.out.println("Prediction for [1, 0, 0, 1, 1, 0, 1, 0]: " + nn.predict(new double[]{1, 0, 0, 1, 1, 0, 1, 0})); System.out.println("Prediction for [1, 0, 0, 1, 1, 0, 1, 1]: " + nn.predict(new double[]{1, 0, 0, 1, 1, 0, 1, 1})); System.out.println("Prediction for [1, 0, 0, 1, 1, 1, 0, 0]: " + nn.predict(new double[]{1, 0, 0, 1, 1, 1, 0, 0})); System.out.println("Prediction for [1, 0, 0, 1, 1, 1, 0, 1]: " + nn.predict(new double[]{1, 0, 0, 1, 1, 1, 0, 1})); System.out.println("Prediction for [1, 0, 0, 1, 1, 1, 1, 0]: " + nn.predict(new double[]{1, 0, 0, 1, 1, 1, 1, 0})); System.out.println("Prediction for [1, 0, 0, 1, 1, 1, 1, 1]: " + nn.predict(new double[]{1, 0, 0, 1, 1, 1, 1, 1})); System.out.println("Prediction for [1, 0, 1, 0, 0, 0, 0, 0]: " + nn.predict(new double[]{1, 0, 1, 0, 0, 0, 0, 0})); System.out.println("Prediction for [1, 0, 1, 0, 0, 0, 0, 1]: " + nn.predict(new double[]{1, 0, 1, 0, 0, 0, 0, 1})); System.out.println("Prediction for [1, 0, 1, 0, 0, 0, 1, 0]: " + nn.predict(new double[]{1, 0, 1, 0, 0, 0, 1, 0})); System.out.println("Prediction for [1, 0, 1, 0, 0, 0, 1, 1]: " + nn.predict(new double[]{1, 0, 1, 0, 0, 0, 1, 1})); System.out.println("Prediction for [1, 0, 1, 0, 0, 1, 0, 0]: " + nn.predict(new double[]{1, 0, 1, 0, 0, 1, 0, 0})); System.out.println("Prediction for [1, 0, 1, 0, 0, 1, 0, 1]: " + nn.predict(new double[]{1, 0, 1, 0, 0, 1, 0, 1})); System.out.println("Prediction for [1, 0, 1, 0, 0, 1, 1, 0]: " + nn.predict(new double[]{1, 0, 1, 0, 0, 1, 1, 0})); System.out.println("Prediction for [1, 0, 1, 0, 0, 1, 1, 1]: " + nn.predict(new double[]{1, 0, 1, 0, 0, 1, 1, 1})); System.out.println("Prediction for [1, 0, 1, 0, 1, 0, 0, 0]: " + nn.predict(new double[]{1, 0, 1, 0, 1, 0, 0, 0})); System.out.println("Prediction for [1, 0, 1, 0, 1, 0, 0, 1]: " + nn.predict(new double[]{1, 0, 1, 0, 1, 0, 0, 1})); System.out.println("Prediction for [1, 0, 1, 0, 1, 0, 1, 0]: " + nn.predict(new double[]{1, 0, 1, 0, 1, 0, 1, 0})); System.out.println("Prediction for [1, 0, 1, 0, 1, 0, 1, 1]: " + nn.predict(new double[]{1, 0, 1, 0, 1, 0, 1, 1})); System.out.println("Prediction for [1, 0, 1, 0, 1, 1, 0, 0]: " + nn.predict(new double[]{1, 0, 1, 0, 1, 1, 0, 0})); System.out.println("Prediction for [1, 0, 1, 0, 1, 1, 0, 1]: " + nn.predict(new double[]{1, 0, 1, 0, 1, 1, 0, 1})); System.out.println("Prediction for [1, 0, 1, 0, 1, 1, 1, 0]: " + nn.predict(new double[]{1, 0, 1, 0, 1, 1, 1, 0})); System.out.println("Prediction for [1, 0, 1, 0, 1, 1, 1, 1]: " + nn.predict(new double[]{1, 0, 1, 0, 1, 1, 1, 1})); System.out.println("Prediction for [1, 0, 1, 1, 0, 0, 0, 0]: " + nn.predict(new double[]{1, 0, 1, 1, 0, 0, 0, 0})); System.out.println("Prediction for [1, 0, 1, 1, 0, 0, 0, 1]: " + nn.predict(new double[]{1, 0, 1, 1, 0, 0, 0, 1})); System.out.println("Prediction for [1, 0, 1, 1, 0, 0, 1, 0]: " + nn.predict(new double[]{1, 0, 1, 1, 0, 0, 1, 0})); System.out.println("Prediction for [1, 0, 1, 1, 0, 0, 1, 1]: " + nn.predict(new double[]{1, 0, 1, 1, 0, 0, 1, 1})); System.out.println("Prediction for [1, 0, 1, 1, 0, 1, 0, 0]: " + nn.predict(new double[]{1, 0, 1, 1, 0, 1, 0, 0})); System.out.println("Prediction for [1, 0, 1, 1, 0, 1, 0, 1]: " + nn.predict(new double[]{1, 0, 1, 1, 0, 1, 0, 1})); System.out.println("Prediction for [1, 0, 1, 1, 0, 1, 1, 0]: " + nn.predict(new double[]{1, 0, 1, 1, 0, 1, 1, 0})); System.out.println("Prediction for [1, 0, 1, 1, 0, 1, 1, 1]: " + nn.predict(new double[]{1, 0, 1, 1, 0, 1, 1, 1})); System.out.println("Prediction for [1, 0, 1, 1, 1, 0, 0, 0]: " + nn.predict(new double[]{1, 0, 1, 1, 1, 0, 0, 0})); System.out.println("Prediction for [1, 0, 1, 1, 1, 0, 0, 1]: " + nn.predict(new double[]{1, 0, 1, 1, 1, 0, 0, 1})); System.out.println("Prediction for [1, 0, 1, 1, 1, 0, 1, 0]: " + nn.predict(new double[]{1, 0, 1, 1, 1, 0, 1, 0})); System.out.println("Prediction for [1, 0, 1, 1, 1, 0, 1, 1]: " + nn.predict(new double[]{1, 0, 1, 1, 1, 0, 1, 1})); System.out.println("Prediction for [1, 0, 1, 1, 1, 1, 0, 0]: " + nn.predict(new double[]{1, 0, 1, 1, 1, 1, 0, 0})); System.out.println("Prediction for [1, 0, 1, 1, 1, 1, 0, 1]: " + nn.predict(new double[]{1, 0, 1, 1, 1, 1, 0, 1})); System.out.println("Prediction for [1, 0, 1, 1, 1, 1, 1, 0]: " + nn.predict(new double[]{1, 0, 1, 1, 1, 1, 1, 0})); System.out.println("Prediction for [1, 0, 1, 1, 1, 1, 1, 1]: " + nn.predict(new double[]{1, 0, 1, 1, 1, 1, 1, 1})); System.out.println("Prediction for [1, 1, 0, 0, 0, 0, 0, 0]: " + nn.predict(new double[]{1, 1, 0, 0, 0, 0, 0, 0})); System.out.println("Prediction for [1, 1, 0, 0, 0, 0, 0, 1]: " + nn.predict(new double[]{1, 1, 0, 0, 0, 0, 0, 1})); System.out.println("Prediction for [1, 1, 0, 0, 0, 0, 1, 0]: " + nn.predict(new double[]{1, 1, 0, 0, 0, 0, 1, 0})); System.out.println("Prediction for [1, 1, 0, 0, 0, 0, 1, 1]: " + nn.predict(new double[]{1, 1, 0, 0, 0, 0, 1, 1})); System.out.println("Prediction for [1, 1, 0, 0, 0, 1, 0, 0]: " + nn.predict(new double[]{1, 1, 0, 0, 0, 1, 0, 0})); System.out.println("Prediction for [1, 1, 0, 0, 0, 1, 0, 1]: " + nn.predict(new double[]{1, 1, 0, 0, 0, 1, 0, 1})); System.out.println("Prediction for [1, 1, 0, 0, 0, 1, 1, 0]: " + nn.predict(new double[]{1, 1, 0, 0, 0, 1, 1, 0})); System.out.println("Prediction for [1, 1, 0, 0, 0, 1, 1, 1]: " + nn.predict(new double[]{1, 1, 0, 0, 0, 1, 1, 1})); System.out.println("Prediction for [1, 1, 0, 0, 1, 0, 0, 0]: " + nn.predict(new double[]{1, 1, 0, 0, 1, 0, 0, 0})); System.out.println("Prediction for [1, 1, 0, 0, 1, 0, 0, 1]: " + nn.predict(new double[]{1, 1, 0, 0, 1, 0, 0, 1})); System.out.println("Prediction for [1, 1, 0, 0, 1, 0, 1, 0]: " + nn.predict(new double[]{1, 1, 0, 0, 1, 0, 1, 0})); System.out.println("Prediction for [1, 1, 0, 0, 1, 0, 1, 1]: " + nn.predict(new double[]{1, 1, 0, 0, 1, 0, 1, 1})); System.out.println("Prediction for [1, 1, 0, 0, 1, 1, 0, 0]: " + nn.predict(new double[]{1, 1, 0, 0, 1, 1, 0, 0})); System.out.println("Prediction for [1, 1, 0, 0, 1, 1, 0, 1]: " + nn.predict(new double[]{1, 1, 0, 0, 1, 1, 0, 1})); System.out.println("Prediction for [1, 1, 0, 0, 1, 1, 1, 0]: " + nn.predict(new double[]{1, 1, 0, 0, 1, 1, 1, 0})); System.out.println("Prediction for [1, 1, 0, 0, 1, 1, 1, 1]: " + nn.predict(new double[]{1, 1, 0, 0, 1, 1, 1, 1})); System.out.println("Prediction for [1, 1, 0, 1, 0, 0, 0, 0]: " + nn.predict(new double[]{1, 1, 0, 1, 0, 0, 0, 0})); System.out.println("Prediction for [1, 1, 0, 1, 0, 0, 0, 1]: " + nn.predict(new double[]{1, 1, 0, 1, 0, 0, 0, 1})); System.out.println("Prediction for [1, 1, 0, 1, 0, 0, 1, 0]: " + nn.predict(new double[]{1, 1, 0, 1, 0, 0, 1, 0})); System.out.println("Prediction for [1, 1, 0, 1, 0, 0, 1, 1]: " + nn.predict(new double[]{1, 1, 0, 1, 0, 0, 1, 1})); System.out.println("Prediction for [1, 1, 0, 1, 0, 1, 0, 0]: " + nn.predict(new double[]{1, 1, 0, 1, 0, 1, 0, 0})); System.out.println("Prediction for [1, 1, 0, 1, 0, 1, 0, 1]: " + nn.predict(new double[]{1, 1, 0, 1, 0, 1, 0, 1})); System.out.println("Prediction for [1, 1, 0, 1, 0, 1, 1, 0]: " + nn.predict(new double[]{1, 1, 0, 1, 0, 1, 1, 0})); System.out.println("Prediction for [1, 1, 0, 1, 0, 1, 1, 1]: " + nn.predict(new double[]{1, 1, 0, 1, 0, 1, 1, 1})); System.out.println("Prediction for [1, 1, 0, 1, 1, 0, 0, 0]: " + nn.predict(new double[]{1, 1, 0, 1, 1, 0, 0, 0})); System.out.println("Prediction for [1, 1, 0, 1, 1, 0, 0, 1]: " + nn.predict(new double[]{1, 1, 0, 1, 1, 0, 0, 1})); System.out.println("Prediction for [1, 1, 0, 1, 1, 0, 1, 0]: " + nn.predict(new double[]{1, 1, 0, 1, 1, 0, 1, 0})); System.out.println("Prediction for [1, 1, 0, 1, 1, 0, 1, 1]: " + nn.predict(new double[]{1, 1, 0, 1, 1, 0, 1, 1})); System.out.println("Prediction for [1, 1, 0, 1, 1, 1, 0, 0]: " + nn.predict(new double[]{1, 1, 0, 1, 1, 1, 0, 0})); System.out.println("Prediction for [1, 1, 0, 1, 1, 1, 0, 1]: " + nn.predict(new double[]{1, 1, 0, 1, 1, 1, 0, 1})); System.out.println("Prediction for [1, 1, 0, 1, 1, 1, 1, 0]: " + nn.predict(new double[]{1, 1, 0, 1, 1, 1, 1, 0})); System.out.println("Prediction for [1, 1, 0, 1, 1, 1, 1, 1]: " + nn.predict(new double[]{1, 1, 0, 1, 1, 1, 1, 1})); System.out.println("Prediction for [1, 1, 1, 0, 0, 0, 0, 0]: " + nn.predict(new double[]{1, 1, 1, 0, 0, 0, 0, 0})); System.out.println("Prediction for [1, 1, 1, 0, 0, 0, 0, 1]: " + nn.predict(new double[]{1, 1, 1, 0, 0, 0, 0, 1})); System.out.println("Prediction for [1, 1, 1, 0, 0, 0, 1, 0]: " + nn.predict(new double[]{1, 1, 1, 0, 0, 0, 1, 0})); System.out.println("Prediction for [1, 1, 1, 0, 0, 0, 1, 1]: " + nn.predict(new double[]{1, 1, 1, 0, 0, 0, 1, 1})); System.out.println("Prediction for [1, 1, 1, 0, 0, 1, 0, 0]: " + nn.predict(new double[]{1, 1, 1, 0, 0, 1, 0, 0})); System.out.println("Prediction for [1, 1, 1, 0, 0, 1, 0, 1]: " + nn.predict(new double[]{1, 1, 1, 0, 0, 1, 0, 1})); System.out.println("Prediction for [1, 1, 1, 0, 0, 1, 1, 0]: " + nn.predict(new double[]{1, 1, 1, 0, 0, 1, 1, 0})); System.out.println("Prediction for [1, 1, 1, 0, 0, 1, 1, 1]: " + nn.predict(new double[]{1, 1, 1, 0, 0, 1, 1, 1})); System.out.println("Prediction for [1, 1, 1, 0, 1, 0, 0, 0]: " + nn.predict(new double[]{1, 1, 1, 0, 1, 0, 0, 0})); System.out.println("Prediction for [1, 1, 1, 0, 1, 0, 0, 1]: " + nn.predict(new double[]{1, 1, 1, 0, 1, 0, 0, 1})); System.out.println("Prediction for [1, 1, 1, 0, 1, 0, 1, 0]: " + nn.predict(new double[]{1, 1, 1, 0, 1, 0, 1, 0})); System.out.println("Prediction for [1, 1, 1, 0, 1, 0, 1, 1]: " + nn.predict(new double[]{1, 1, 1, 0, 1, 0, 1, 1})); System.out.println("Prediction for [1, 1, 1, 0, 1, 1, 0, 0]: " + nn.predict(new double[]{1, 1, 1, 0, 1, 1, 0, 0})); System.out.println("Prediction for [1, 1, 1, 0, 1, 1, 0, 1]: " + nn.predict(new double[]{1, 1, 1, 0, 1, 1, 0, 1})); System.out.println("Prediction for [1, 1, 1, 0, 1, 1, 1, 0]: " + nn.predict(new double[]{1, 1, 1, 0, 1, 1, 1, 0})); System.out.println("Prediction for [1, 1, 1, 0, 1, 1, 1, 1]: " + nn.predict(new double[]{1, 1, 1, 0, 1, 1, 1, 1})); System.out.println("Prediction for [1, 1, 1, 1, 0, 0, 0, 0]: " + nn.predict(new double[]{1, 1, 1, 1, 0, 0, 0, 0})); System.out.println("Prediction for [1, 1, 1, 1, 0, 0, 0, 1]: " + nn.predict(new double[]{1, 1, 1, 1, 0, 0, 0, 1})); System.out.println("Prediction for [1, 1, 1, 1, 0, 0, 1, 0]: " + nn.predict(new double[]{1, 1, 1, 1, 0, 0, 1, 0})); System.out.println("Prediction for [1, 1, 1, 1, 0, 0, 1, 1]: " + nn.predict(new double[]{1, 1, 1, 1, 0, 0, 1, 1})); System.out.println("Prediction for [1, 1, 1, 1, 0, 1, 0, 0]: " + nn.predict(new double[]{1, 1, 1, 1, 0, 1, 0, 0})); System.out.println("Prediction for [1, 1, 1, 1, 0, 1, 0, 1]: " + nn.predict(new double[]{1, 1, 1, 1, 0, 1, 0, 1})); System.out.println("Prediction for [1, 1, 1, 1, 0, 1, 1, 0]: " + nn.predict(new double[]{1, 1, 1, 1, 0, 1, 1, 0})); System.out.println("Prediction for [1, 1, 1, 1, 0, 1, 1, 1]: " + nn.predict(new double[]{1, 1, 1, 1, 0, 1, 1, 1})); System.out.println("Prediction for [1, 1, 1, 1, 1, 0, 0, 0]: " + nn.predict(new double[]{1, 1, 1, 1, 1, 0, 0, 0})); System.out.println("Prediction for [1, 1, 1, 1, 1, 0, 0, 1]: " + nn.predict(new double[]{1, 1, 1, 1, 1, 0, 0, 1})); System.out.println("Prediction for [1, 1, 1, 1, 1, 0, 1, 0]: " + nn.predict(new double[]{1, 1, 1, 1, 1, 0, 1, 0})); System.out.println("Prediction for [1, 1, 1, 1, 1, 0, 1, 1]: " + nn.predict(new double[]{1, 1, 1, 1, 1, 0, 1, 1})); System.out.println("Prediction for [1, 1, 1, 1, 1, 1, 0, 0]: " + nn.predict(new double[]{1, 1, 1, 1, 1, 1, 0, 0})); System.out.println("Prediction for [1, 1, 1, 1, 1, 1, 0, 1]: " + nn.predict(new double[]{1, 1, 1, 1, 1, 1, 0, 1})); System.out.println("Prediction for [1, 1, 1, 1, 1, 1, 1, 0]: " + nn.predict(new double[]{1, 1, 1, 1, 1, 1, 1, 0})); System.out.println("Prediction for [1, 1, 1, 1, 1, 1, 1, 1]: " + nn.predict(new double[]{1, 1, 1, 1, 1, 1, 1, 1})); } } run: Epoch 10000. Mean error: 0.02287697440085921 Epoch 20000. Mean error: 0.014166625707716164 Epoch 30000. Mean error: 0.009129459849268452 Epoch 40000. Mean error: 0.006841828176043919 Epoch 50000. Mean error: 0.00567235761602261 Epoch 60000. Mean error: 0.004962131900172744 Epoch 70000. Mean error: 0.004497326734313791 Epoch 80000. Mean error: 0.004275845259380384 Epoch 90000. Mean error: 0.0041453052883488085 Epoch 100000. Mean error: 0.004062262123553563 Epoch 110000. Mean error: 0.004009026698502614 Epoch 120000. Mean error: 0.003968548498876892 Epoch 130000. Mean error: 0.003945200641862105 Epoch 140000. Mean error: 0.003930767972347983 Epoch 150000. Mean error: 0.00392177340097129 Epoch 160000. Mean error: 0.003916138888637087 Epoch 170000. Mean error: 0.003912588636981584 Epoch 180000. Mean error: 0.003910307713603723 Epoch 190000. Mean error: 0.003908885306420438 Epoch 200000. Mean error: 0.003907975041400942 Prediction for [0, 0, 0, 0, 0, 0, 0, 0]: 0.0 Prediction for [0, 0, 0, 0, 0, 0, 0, 1]: 1.0002396760102368 Prediction for [0, 0, 0, 0, 0, 0, 1, 0]: 0.0 Prediction for [0, 0, 0, 0, 0, 0, 1, 1]: 1.000073549804653 Prediction for [0, 0, 0, 0, 0, 1, 0, 0]: 0.0 Prediction for [0, 0, 0, 0, 0, 1, 0, 1]: 1.0001648629047235 Prediction for [0, 0, 0, 0, 0, 1, 1, 0]: 0.0 Prediction for [0, 0, 0, 0, 0, 1, 1, 1]: 0.9999256290123881 Prediction for [0, 0, 0, 0, 1, 0, 0, 0]: 0.0 Prediction for [0, 0, 0, 0, 1, 0, 0, 1]: 0.0 Prediction for [0, 0, 0, 0, 1, 0, 1, 0]: 0.0 Prediction for [0, 0, 0, 0, 1, 0, 1, 1]: 1.0001481342838092 Prediction for [0, 0, 0, 0, 1, 1, 0, 0]: 0.0 Prediction for [0, 0, 0, 0, 1, 1, 0, 1]: 0.9999877850696732 Prediction for [0, 0, 0, 0, 1, 1, 1, 0]: 0.0 Prediction for [0, 0, 0, 0, 1, 1, 1, 1]: 0.0 Prediction for [0, 0, 0, 1, 0, 0, 0, 0]: 0.0 Prediction for [0, 0, 0, 1, 0, 0, 0, 1]: 1.0000288093042053 Prediction for [0, 0, 0, 1, 0, 0, 1, 0]: 0.0 Prediction for [0, 0, 0, 1, 0, 0, 1, 1]: 0.9997639084790277 Prediction for [0, 0, 0, 1, 0, 1, 0, 0]: 0.0 Prediction for [0, 0, 0, 1, 0, 1, 0, 1]: 0.0 Prediction for [0, 0, 0, 1, 0, 1, 1, 0]: 0.0 Prediction for [0, 0, 0, 1, 0, 1, 1, 1]: 1.0001190831863198 Prediction for [0, 0, 0, 1, 1, 0, 0, 0]: 0.0 Prediction for [0, 0, 0, 1, 1, 0, 0, 1]: 0.0 Prediction for [0, 0, 0, 1, 1, 0, 1, 0]: 0.0 Prediction for [0, 0, 0, 1, 1, 0, 1, 1]: 0.0 Prediction for [0, 0, 0, 1, 1, 1, 0, 0]: 0.0 Prediction for [0, 0, 0, 1, 1, 1, 0, 1]: 0.9999319677714649 Prediction for [0, 0, 0, 1, 1, 1, 1, 0]: 0.0 Prediction for [0, 0, 0, 1, 1, 1, 1, 1]: 1.0003404389083057 Prediction for [0, 0, 1, 0, 0, 0, 0, 0]: 0.0 Prediction for [0, 0, 1, 0, 0, 0, 0, 1]: 0.0 Prediction for [0, 0, 1, 0, 0, 0, 1, 0]: 0.0 Prediction for [0, 0, 1, 0, 0, 0, 1, 1]: 0.0 Prediction for [0, 0, 1, 0, 0, 1, 0, 0]: 0.0 Prediction for [0, 0, 1, 0, 0, 1, 0, 1]: 1.0000475454581501 Prediction for [0, 0, 1, 0, 0, 1, 1, 0]: 0.0 Prediction for [0, 0, 1, 0, 0, 1, 1, 1]: 0.0 Prediction for [0, 0, 1, 0, 1, 0, 0, 0]: 0.0 Prediction for [0, 0, 1, 0, 1, 0, 0, 1]: 0.9996586371051661 Prediction for [0, 0, 1, 0, 1, 0, 1, 0]: 0.0 Prediction for [0, 0, 1, 0, 1, 0, 1, 1]: 1.0000028179007723 Prediction for [0, 0, 1, 0, 1, 1, 0, 0]: 0.0 Prediction for [0, 0, 1, 0, 1, 1, 0, 1]: 0.0 Prediction for [0, 0, 1, 0, 1, 1, 1, 0]: 0.0 Prediction for [0, 0, 1, 0, 1, 1, 1, 1]: 0.9995298039153093 Prediction for [0, 0, 1, 1, 0, 0, 0, 0]: 0.0 Prediction for [0, 0, 1, 1, 0, 0, 0, 1]: 0.0 Prediction for [0, 0, 1, 1, 0, 0, 1, 0]: 0.0 Prediction for [0, 0, 1, 1, 0, 0, 1, 1]: 0.0 Prediction for [0, 0, 1, 1, 0, 1, 0, 0]: 0.0 Prediction for [0, 0, 1, 1, 0, 1, 0, 1]: 1.000053063623958 Prediction for [0, 0, 1, 1, 0, 1, 1, 0]: 0.0 Prediction for [0, 0, 1, 1, 0, 1, 1, 1]: 0.0 Prediction for [0, 0, 1, 1, 1, 0, 0, 0]: 0.0 Prediction for [0, 0, 1, 1, 1, 0, 0, 1]: 0.0 Prediction for [0, 0, 1, 1, 1, 0, 1, 0]: 0.0 Prediction for [0, 0, 1, 1, 1, 0, 1, 1]: 0.9994418900661293 Prediction for [0, 0, 1, 1, 1, 1, 0, 0]: 0.0 Prediction for [0, 0, 1, 1, 1, 1, 0, 1]: 0.9985201195558622 Prediction for [0, 0, 1, 1, 1, 1, 1, 0]: 0.0 Prediction for [0, 0, 1, 1, 1, 1, 1, 1]: 8.29103443267698E-4 Prediction for [0, 1, 0, 0, 0, 0, 0, 0]: 0.0 Prediction for [0, 1, 0, 0, 0, 0, 0, 1]: 0.0 Prediction for [0, 1, 0, 0, 0, 0, 1, 0]: 0.0 Prediction for [0, 1, 0, 0, 0, 0, 1, 1]: 0.9999782810841431 Prediction for [0, 1, 0, 0, 0, 1, 0, 0]: 0.0 Prediction for [0, 1, 0, 0, 0, 1, 0, 1]: 0.0 Prediction for [0, 1, 0, 0, 0, 1, 1, 0]: 0.0 Prediction for [0, 1, 0, 0, 0, 1, 1, 1]: 0.9999056375664708 Prediction for [0, 1, 0, 0, 1, 0, 0, 0]: 0.0 Prediction for [0, 1, 0, 0, 1, 0, 0, 1]: 0.9998720318399794 Prediction for [0, 1, 0, 0, 1, 0, 1, 0]: 0.0 Prediction for [0, 1, 0, 0, 1, 0, 1, 1]: 0.0 Prediction for [0, 1, 0, 0, 1, 1, 0, 0]: 0.0 Prediction for [0, 1, 0, 0, 1, 1, 0, 1]: 0.0 Prediction for [0, 1, 0, 0, 1, 1, 1, 0]: 0.0 Prediction for [0, 1, 0, 0, 1, 1, 1, 1]: 0.9985244522237924 Prediction for [0, 1, 0, 1, 0, 0, 0, 0]: 0.0 Prediction for [0, 1, 0, 1, 0, 0, 0, 1]: 0.0 Prediction for [0, 1, 0, 1, 0, 0, 1, 0]: 0.0 Prediction for [0, 1, 0, 1, 0, 0, 1, 1]: 0.999698882074032 Prediction for [0, 1, 0, 1, 0, 1, 0, 0]: 0.0 Prediction for [0, 1, 0, 1, 0, 1, 0, 1]: 0.0 Prediction for [0, 1, 0, 1, 0, 1, 1, 0]: 0.0 Prediction for [0, 1, 0, 1, 0, 1, 1, 1]: 0.0 Prediction for [0, 1, 0, 1, 1, 0, 0, 0]: 0.0 Prediction for [0, 1, 0, 1, 1, 0, 0, 1]: 0.9997755881672816 Prediction for [0, 1, 0, 1, 1, 0, 1, 0]: 0.0 Prediction for [0, 1, 0, 1, 1, 0, 1, 1]: 0.0 Prediction for [0, 1, 0, 1, 1, 1, 0, 0]: 0.0 Prediction for [0, 1, 0, 1, 1, 1, 0, 1]: 0.0 Prediction for [0, 1, 0, 1, 1, 1, 1, 0]: 0.0 Prediction for [0, 1, 0, 1, 1, 1, 1, 1]: 0.0 Prediction for [0, 1, 1, 0, 0, 0, 0, 0]: 0.0 Prediction for [0, 1, 1, 0, 0, 0, 0, 1]: 0.9991710505573721 Prediction for [0, 1, 1, 0, 0, 0, 1, 0]: 0.0 Prediction for [0, 1, 1, 0, 0, 0, 1, 1]: 0.0 Prediction for [0, 1, 1, 0, 0, 1, 0, 0]: 0.0 Prediction for [0, 1, 1, 0, 0, 1, 0, 1]: 1.0000549707847384 Prediction for [0, 1, 1, 0, 0, 1, 1, 0]: 0.0 Prediction for [0, 1, 1, 0, 0, 1, 1, 1]: 0.9912238113591538 Prediction for [0, 1, 1, 0, 1, 0, 0, 0]: 0.0 Prediction for [0, 1, 1, 0, 1, 0, 0, 1]: 8.873951351509035E-4 Prediction for [0, 1, 1, 0, 1, 0, 1, 0]: 0.0 Prediction for [0, 1, 1, 0, 1, 0, 1, 1]: 0.9989553071131994 Prediction for [0, 1, 1, 0, 1, 1, 0, 0]: 0.0 Prediction for [0, 1, 1, 0, 1, 1, 0, 1]: 0.9987057794724432 Prediction for [0, 1, 1, 0, 1, 1, 1, 0]: 0.0 Prediction for [0, 1, 1, 0, 1, 1, 1, 1]: 0.007308804190367724 Prediction for [0, 1, 1, 1, 0, 0, 0, 0]: 0.0 Prediction for [0, 1, 1, 1, 0, 0, 0, 1]: 0.999810972353874 Prediction for [0, 1, 1, 1, 0, 0, 1, 0]: 0.0 Prediction for [0, 1, 1, 1, 0, 0, 1, 1]: 0.0 Prediction for [0, 1, 1, 1, 0, 1, 0, 0]: 0.0 Prediction for [0, 1, 1, 1, 0, 1, 0, 1]: 0.0 Prediction for [0, 1, 1, 1, 0, 1, 1, 0]: 0.0 Prediction for [0, 1, 1, 1, 0, 1, 1, 1]: 0.0 Prediction for [0, 1, 1, 1, 1, 0, 0, 0]: 0.0 Prediction for [0, 1, 1, 1, 1, 0, 0, 1]: 0.0 Prediction for [0, 1, 1, 1, 1, 0, 1, 0]: 0.0 Prediction for [0, 1, 1, 1, 1, 0, 1, 1]: 0.0011432086006193387 Prediction for [0, 1, 1, 1, 1, 1, 0, 0]: 0.0 Prediction for [0, 1, 1, 1, 1, 1, 0, 1]: 0.0 Prediction for [0, 1, 1, 1, 1, 1, 1, 0]: 0.0 Prediction for [0, 1, 1, 1, 1, 1, 1, 1]: 0.9998262392016439 Prediction for [1, 0, 0, 0, 0, 0, 0, 0]: 0.0 Prediction for [1, 0, 0, 0, 0, 0, 0, 1]: 0.0 Prediction for [1, 0, 0, 0, 0, 0, 1, 0]: 0.0 Prediction for [1, 0, 0, 0, 0, 0, 1, 1]: 1.0002643177127801 Prediction for [1, 0, 0, 0, 0, 1, 0, 0]: 0.0 Prediction for [1, 0, 0, 0, 0, 1, 0, 1]: 0.0 Prediction for [1, 0, 0, 0, 0, 1, 1, 0]: 0.0 Prediction for [1, 0, 0, 0, 0, 1, 1, 1]: 2.9922117926517444E-5 Prediction for [1, 0, 0, 0, 1, 0, 0, 0]: 0.0 Prediction for [1, 0, 0, 0, 1, 0, 0, 1]: 1.0000109097269831 Prediction for [1, 0, 0, 0, 1, 0, 1, 0]: 0.0 Prediction for [1, 0, 0, 0, 1, 0, 1, 1]: 1.000053838844293 Prediction for [1, 0, 0, 0, 1, 1, 0, 0]: 0.0 Prediction for [1, 0, 0, 0, 1, 1, 0, 1]: 0.0 Prediction for [1, 0, 0, 0, 1, 1, 1, 0]: 0.0 Prediction for [1, 0, 0, 0, 1, 1, 1, 1]: 0.0 Prediction for [1, 0, 0, 1, 0, 0, 0, 0]: 0.0 Prediction for [1, 0, 0, 1, 0, 0, 0, 1]: 5.5847984548051954E-5 Prediction for [1, 0, 0, 1, 0, 0, 1, 0]: 0.0 Prediction for [1, 0, 0, 1, 0, 0, 1, 1]: 0.0 Prediction for [1, 0, 0, 1, 0, 1, 0, 0]: 0.0 Prediction for [1, 0, 0, 1, 0, 1, 0, 1]: 0.9998508359008422 Prediction for [1, 0, 0, 1, 0, 1, 1, 0]: 0.0 Prediction for [1, 0, 0, 1, 0, 1, 1, 1]: 0.999589947501633 Prediction for [1, 0, 0, 1, 1, 0, 0, 0]: 0.0 Prediction for [1, 0, 0, 1, 1, 0, 0, 1]: 0.0 Prediction for [1, 0, 0, 1, 1, 0, 1, 0]: 0.0 Prediction for [1, 0, 0, 1, 1, 0, 1, 1]: 2.807210240041158E-4 Prediction for [1, 0, 0, 1, 1, 1, 0, 0]: 0.0 Prediction for [1, 0, 0, 1, 1, 1, 0, 1]: 1.0001931269944295 Prediction for [1, 0, 0, 1, 1, 1, 1, 0]: 0.0 Prediction for [1, 0, 0, 1, 1, 1, 1, 1]: 0.0 Prediction for [1, 0, 1, 0, 0, 0, 0, 0]: 0.0 Prediction for [1, 0, 1, 0, 0, 0, 0, 1]: 2.3369076458656934E-4 Prediction for [1, 0, 1, 0, 0, 0, 1, 0]: 0.0 Prediction for [1, 0, 1, 0, 0, 0, 1, 1]: 1.0000530463166948 Prediction for [1, 0, 1, 0, 0, 1, 0, 0]: 0.0 Prediction for [1, 0, 1, 0, 0, 1, 0, 1]: 0.0 Prediction for [1, 0, 1, 0, 0, 1, 1, 0]: 0.0 Prediction for [1, 0, 1, 0, 0, 1, 1, 1]: 0.9984847704618565 Prediction for [1, 0, 1, 0, 1, 0, 0, 0]: 0.0 Prediction for [1, 0, 1, 0, 1, 0, 0, 1]: 0.0 Prediction for [1, 0, 1, 0, 1, 0, 1, 0]: 0.0 Prediction for [1, 0, 1, 0, 1, 0, 1, 1]: 0.0012304104588602982 Prediction for [1, 0, 1, 0, 1, 1, 0, 0]: 0.0 Prediction for [1, 0, 1, 0, 1, 1, 0, 1]: 0.9988902305503888 Prediction for [1, 0, 1, 0, 1, 1, 1, 0]: 0.0 Prediction for [1, 0, 1, 0, 1, 1, 1, 1]: 0.0013929410989526048 Prediction for [1, 0, 1, 1, 0, 0, 0, 0]: 0.0 Prediction for [1, 0, 1, 1, 0, 0, 0, 1]: 0.0 Prediction for [1, 0, 1, 1, 0, 0, 1, 0]: 0.0 Prediction for [1, 0, 1, 1, 0, 0, 1, 1]: 1.0002552991372369 Prediction for [1, 0, 1, 1, 0, 1, 0, 0]: 0.0 Prediction for [1, 0, 1, 1, 0, 1, 0, 1]: 1.0002735125659727 Prediction for [1, 0, 1, 1, 0, 1, 1, 0]: 0.0 Prediction for [1, 0, 1, 1, 0, 1, 1, 1]: 0.0 Prediction for [1, 0, 1, 1, 1, 0, 0, 0]: 0.0 Prediction for [1, 0, 1, 1, 1, 0, 0, 1]: 0.0 Prediction for [1, 0, 1, 1, 1, 0, 1, 0]: 0.0 Prediction for [1, 0, 1, 1, 1, 0, 1, 1]: 0.0 Prediction for [1, 0, 1, 1, 1, 1, 0, 0]: 0.0 Prediction for [1, 0, 1, 1, 1, 1, 0, 1]: 0.0016007416738244018 Prediction for [1, 0, 1, 1, 1, 1, 1, 0]: 0.0 Prediction for [1, 0, 1, 1, 1, 1, 1, 1]: 0.9992947996206096 Prediction for [1, 1, 0, 0, 0, 0, 0, 0]: 0.0 Prediction for [1, 1, 0, 0, 0, 0, 0, 1]: 1.0001053458187812 Prediction for [1, 1, 0, 0, 0, 0, 1, 0]: 0.0 Prediction for [1, 1, 0, 0, 0, 0, 1, 1]: 0.0 Prediction for [1, 1, 0, 0, 0, 1, 0, 0]: 0.0 Prediction for [1, 1, 0, 0, 0, 1, 0, 1]: 0.9995775815180679 Prediction for [1, 1, 0, 0, 0, 1, 1, 0]: 0.0 Prediction for [1, 1, 0, 0, 0, 1, 1, 1]: 1.0008752175214708 Prediction for [1, 1, 0, 0, 1, 0, 0, 0]: 0.0 Prediction for [1, 1, 0, 0, 1, 0, 0, 1]: 0.0 Prediction for [1, 1, 0, 0, 1, 0, 1, 0]: 0.0 Prediction for [1, 1, 0, 0, 1, 0, 1, 1]: 0.0 Prediction for [1, 1, 0, 0, 1, 1, 0, 0]: 0.0 Prediction for [1, 1, 0, 0, 1, 1, 0, 1]: 7.62632073844749E-4 Prediction for [1, 1, 0, 0, 1, 1, 1, 0]: 0.0 Prediction for [1, 1, 0, 0, 1, 1, 1, 1]: 6.25783094595711E-4 Prediction for [1, 1, 0, 1, 0, 0, 0, 0]: 0.0 Prediction for [1, 1, 0, 1, 0, 0, 0, 1]: 0.0 Prediction for [1, 1, 0, 1, 0, 0, 1, 0]: 0.0 Prediction for [1, 1, 0, 1, 0, 0, 1, 1]: 1.0001554066923442 Prediction for [1, 1, 0, 1, 0, 1, 0, 0]: 0.0 Prediction for [1, 1, 0, 1, 0, 1, 0, 1]: 0.0 Prediction for [1, 1, 0, 1, 0, 1, 1, 0]: 0.0 Prediction for [1, 1, 0, 1, 0, 1, 1, 1]: 3.4988672418911904E-4 Prediction for [1, 1, 0, 1, 1, 0, 0, 0]: 0.0 Prediction for [1, 1, 0, 1, 1, 0, 0, 1]: 0.0 Prediction for [1, 1, 0, 1, 1, 0, 1, 0]: 0.0 Prediction for [1, 1, 0, 1, 1, 0, 1, 1]: 0.0 Prediction for [1, 1, 0, 1, 1, 1, 0, 0]: 0.0 Prediction for [1, 1, 0, 1, 1, 1, 0, 1]: 7.196000341442854E-4 Prediction for [1, 1, 0, 1, 1, 1, 1, 0]: 0.0 Prediction for [1, 1, 0, 1, 1, 1, 1, 1]: 0.9997377076301417 Prediction for [1, 1, 1, 0, 0, 0, 0, 0]: 0.0 Prediction for [1, 1, 1, 0, 0, 0, 0, 1]: 0.005120553154234209 Prediction for [1, 1, 1, 0, 0, 0, 1, 0]: 0.0 Prediction for [1, 1, 1, 0, 0, 0, 1, 1]: 0.9993977119139466 Prediction for [1, 1, 1, 0, 0, 1, 0, 0]: 0.0 Prediction for [1, 1, 1, 0, 0, 1, 0, 1]: 0.9967633518764378 Prediction for [1, 1, 1, 0, 0, 1, 1, 0]: 0.0 Prediction for [1, 1, 1, 0, 0, 1, 1, 1]: 0.009537857931912974 Prediction for [1, 1, 1, 0, 1, 0, 0, 0]: 0.0 Prediction for [1, 1, 1, 0, 1, 0, 0, 1]: 0.996080472054107 Prediction for [1, 1, 1, 0, 1, 0, 1, 0]: 0.0 Prediction for [1, 1, 1, 0, 1, 0, 1, 1]: 8.731463822684304E-4 Prediction for [1, 1, 1, 0, 1, 1, 0, 0]: 0.0 Prediction for [1, 1, 1, 0, 1, 1, 0, 1]: 0.005090637076019533 Prediction for [1, 1, 1, 0, 1, 1, 1, 0]: 0.0 Prediction for [1, 1, 1, 0, 1, 1, 1, 1]: 0.9924698020086469 Prediction for [1, 1, 1, 1, 0, 0, 0, 0]: 0.0 Prediction for [1, 1, 1, 1, 0, 0, 0, 1]: 0.9992275293460162 Prediction for [1, 1, 1, 1, 0, 0, 1, 0]: 0.0 Prediction for [1, 1, 1, 1, 0, 0, 1, 1]: 0.0 Prediction for [1, 1, 1, 1, 0, 1, 0, 0]: 0.0 Prediction for [1, 1, 1, 1, 0, 1, 0, 1]: 0.0 Prediction for [1, 1, 1, 1, 0, 1, 1, 0]: 0.0 Prediction for [1, 1, 1, 1, 0, 1, 1, 1]: 7.154212054905074E-4 Prediction for [1, 1, 1, 1, 1, 0, 0, 0]: 0.0 Prediction for [1, 1, 1, 1, 1, 0, 0, 1]: 0.0 Prediction for [1, 1, 1, 1, 1, 0, 1, 0]: 0.0 Prediction for [1, 1, 1, 1, 1, 0, 1, 1]: 0.9991975677567666 Prediction for [1, 1, 1, 1, 1, 1, 0, 0]: 0.0 Prediction for [1, 1, 1, 1, 1, 1, 0, 1]: 0.0 Prediction for [1, 1, 1, 1, 1, 1, 1, 0]: 0.0 Prediction for [1, 1, 1, 1, 1, 1, 1, 1]: 3.634046610150321E-4 BUILD SUCCESSFUL (total time: 40 seconds)
  24. @Mark-XP No, I make a mistake in the listing, I just correct. And you have to choose at least 5 runs Dietmar
  25. Hi, here is a new program, for to learn the multipliers of 3. This program uses ReLu everywhere. It learns the Multipliers from 3 from 0..255 numbers converted to Binary form. Now I understand, how Neural Network learns and make some "predictions" Dietmar package multiof3; import java.util.Arrays; import java.util.Random; public class Multiof3 { private final int numInputNodes = 8; private final int numHiddenNodes = 26; private final int numOutputNodes = 1; private final double learningRate = 0.01; private final int numEpochs = 100000; private final double errorThreshold = 0.001; private double[][] inputToHiddenWeights; private double[][] hiddenToOutputWeights; private double[] hiddenBiases; private double[] outputBiases; public Multiof3() { Random random = new Random(); inputToHiddenWeights = new double[numInputNodes][numHiddenNodes]; hiddenToOutputWeights = new double[numHiddenNodes][numOutputNodes]; hiddenBiases = new double[numHiddenNodes]; outputBiases = new double[numOutputNodes]; for (int i = 0; i < numInputNodes; i++) { for (int j = 0; j < numHiddenNodes; j++) { inputToHiddenWeights[i][j] = random.nextDouble() - 0.5; } } for (int i = 0; i < numHiddenNodes; i++) { for (int j = 0; j < numOutputNodes; j++) { hiddenToOutputWeights[i][j] = random.nextDouble() - 0.5; } hiddenBiases[i] = random.nextDouble() - 0.5; } for (int i = 0; i < numOutputNodes; i++) { outputBiases[i] = random.nextDouble() - 0.5; } } public double relu(double x) { return Math.max(0, x); } public double reluDerivative(double x) { return x > 0 ? 1 : 0; } public void train(double[][] trainingInputs, double[] trainingTargets) { for (int epoch = 1; epoch <= numEpochs; epoch++) { double totalError = 0.0; for (int i = 0; i < trainingInputs.length; i++) { double[] input = trainingInputs[i]; double target = trainingTargets[i]; // Forward propagation double[] hiddenOutputs = new double[numHiddenNodes]; for (int j = 0; j < numHiddenNodes; j++) { double weightedSum = 0.0; for (int k = 0; k < numInputNodes; k++) { weightedSum += inputToHiddenWeights[k][j] * input[k]; } hiddenOutputs[j] = relu(weightedSum + hiddenBiases[j]); } double output = 0.0; for (int j = 0; j < numOutputNodes; j++) { double weightedSum = 0.0; for (int k = 0; k < numHiddenNodes; k++) { weightedSum += hiddenToOutputWeights[k][j] * hiddenOutputs[k]; } output = relu(weightedSum + outputBiases[j]); } // Backward propagation double outputErrorGradient = (output - target) * reluDerivative(output); for (int j = 0; j < numHiddenNodes; j++) { double hiddenErrorGradient = outputErrorGradient * hiddenToOutputWeights[j][0] * reluDerivative(hiddenOutputs[j]); for (int k = 0; k < numInputNodes; k++) { inputToHiddenWeights[k][j] -= learningRate * input[k] * hiddenErrorGradient; } hiddenBiases[j] -= learningRate * hiddenErrorGradient; } hiddenToOutputWeights[0][0] -= learningRate * hiddenOutputs[0] * outputErrorGradient; outputBiases[0] -= learningRate * outputErrorGradient; // Update total error totalError += Math.pow(output - target, 2); } // Calculate mean error and check for convergence double meanError = totalError / trainingInputs.length; if (meanError < errorThreshold) { System.out.println("Training complete. Mean error: " + meanError); break; } else if (epoch % 10000 == 0) { System.out.println("Epoch " + epoch + ". Mean error: " + meanError); } } } public double predict(double[] input) { double[] hiddenOutputs = new double[numHiddenNodes]; for (int j = 0; j < numHiddenNodes; j++) { double weightedSum = 0.0; for (int k = 0; k < numInputNodes; k++) { weightedSum += inputToHiddenWeights[k][j] * input[k]; } hiddenOutputs[j] = relu(weightedSum + hiddenBiases[j]); } double output = 0.0; for (int j = 0; j < numOutputNodes; j++) { double weightedSum = 0.0; for (int k = 0; k < numHiddenNodes; k++) { weightedSum += hiddenToOutputWeights[k][j] * hiddenOutputs[k]; } output = relu(weightedSum + outputBiases[j]); } return output; } public static void main(String[] args) { // Example usage of the neural network double[][] trainingInputs = {{0, 0, 0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0, 0, 1}, {0, 0, 0, 0, 0, 0, 1, 0}, {0, 0, 0, 0, 0, 0, 1, 1}, {0, 0, 0, 0, 0, 1, 0, 0}, {0, 0, 0, 0, 0, 1, 0, 1}, {0, 0, 0, 0, 0, 1, 1, 0}, {0, 0, 0, 0, 0, 1, 1, 1}, {0, 0, 0, 0, 1, 0, 0, 0}, {0, 0, 0, 0, 1, 0, 0, 1}, {0, 0, 0, 0, 1, 0, 1, 0}, {0, 0, 0, 0, 1, 0, 1, 1}, {0, 0, 0, 0, 1, 1, 0, 0}, {0, 0, 0, 0, 1, 1, 0, 1}, {0, 0, 0, 0, 1, 1, 1, 0}, {0, 0, 0, 0, 1, 1, 1, 1}, {0, 0, 0, 1, 0, 0, 0, 0}, {0, 0, 0, 1, 0, 0, 0, 1}, {0, 0, 0, 1, 0, 0, 1, 0}, {0, 0, 0, 1, 0, 0, 1, 1}, {0, 0, 0, 1, 0, 1, 0, 0}, {0, 0, 0, 1, 0, 1, 0, 1}, {0, 0, 0, 1, 0, 1, 1, 0}, {0, 0, 0, 1, 0, 1, 1, 1}, {0, 0, 0, 1, 1, 0, 0, 0}, {0, 0, 0, 1, 1, 0, 0, 1}, {0, 0, 0, 1, 1, 0, 1, 0}, {0, 0, 0, 1, 1, 0, 1, 1}, {0, 0, 0, 1, 1, 1, 0, 0}, {0, 0, 0, 1, 1, 1, 0, 1}, {0, 0, 0, 1, 1, 1, 1, 0}, {0, 0, 0, 1, 1, 1, 1, 1}, {0, 0, 1, 0, 0, 0, 0, 0}, {0, 0, 1, 0, 0, 0, 0, 1},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 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1 }; Multiof3 nn = new Multiof3(); nn.train(trainingInputs, trainingTargets); System.out.println("Prediction for [0, 0, 0, 0, 0, 0, 0, 0]: " + nn.predict(new double[]{0, 0, 0, 0, 0, 0, 0, 0})); System.out.println("Prediction for [0, 0, 0, 0, 0, 0, 0, 1]: " + nn.predict(new double[]{0, 0, 0, 0, 0, 0, 0, 1})); System.out.println("Prediction for [0, 0, 0, 0, 0, 0, 1, 0]: " + nn.predict(new double[]{0, 0, 0, 0, 0, 0, 1, 0})); System.out.println("Prediction for [0, 0, 0, 0, 0, 0, 1, 1]: " + nn.predict(new double[]{0, 0, 0, 0, 0, 0, 1, 1})); System.out.println("Prediction for [0, 0, 0, 0, 0, 1, 0, 0]: " + nn.predict(new double[]{0, 0, 0, 0, 0, 1, 0, 0})); System.out.println("Prediction for [0, 0, 0, 0, 0, 1, 0, 1]: " + nn.predict(new double[]{0, 0, 0, 0, 0, 1, 0, 1})); System.out.println("Prediction for [0, 0, 0, 0, 0, 1, 1, 0]: " + nn.predict(new double[]{0, 0, 0, 0, 0, 1, 1, 0})); System.out.println("Prediction for [0, 0, 0, 0, 0, 1, 1, 1]: " + nn.predict(new double[]{0, 0, 0, 0, 0, 1, 1, 1})); System.out.println("Prediction for [0, 0, 0, 0, 1, 0, 0, 0]: " + nn.predict(new double[]{0, 0, 0, 0, 1, 0, 0, 0})); System.out.println("Prediction for [0, 0, 0, 0, 1, 0, 0, 1]: " + nn.predict(new double[]{0, 0, 0, 0, 1, 0, 0, 1})); System.out.println("Prediction for [0, 0, 0, 0, 1, 0, 1, 0]: " + nn.predict(new double[]{0, 0, 0, 0, 1, 0, 1, 0})); System.out.println("Prediction for [0, 0, 0, 0, 1, 0, 1, 1]: " + nn.predict(new double[]{0, 0, 0, 0, 1, 0, 1, 1})); System.out.println("Prediction for [0, 0, 0, 0, 1, 1, 0, 0]: " + nn.predict(new double[]{0, 0, 0, 0, 1, 1, 0, 0})); System.out.println("Prediction for [0, 0, 0, 0, 1, 1, 0, 1]: " + nn.predict(new double[]{0, 0, 0, 0, 1, 1, 0, 1})); System.out.println("Prediction for [0, 0, 0, 0, 1, 1, 1, 0]: " + nn.predict(new double[]{0, 0, 0, 0, 1, 1, 1, 0})); System.out.println("Prediction for [0, 0, 0, 0, 1, 1, 1, 1]: " + nn.predict(new double[]{0, 0, 0, 0, 1, 1, 1, 1})); System.out.println("Prediction for [0, 0, 0, 1, 0, 0, 0, 0]: " + nn.predict(new double[]{0, 0, 0, 1, 0, 0, 0, 0})); System.out.println("Prediction for [0, 0, 0, 1, 0, 0, 0, 1]: " + nn.predict(new double[]{0, 0, 0, 1, 0, 0, 0, 1})); System.out.println("Prediction for [0, 0, 0, 1, 0, 0, 1, 0]: " + nn.predict(new double[]{0, 0, 0, 1, 0, 0, 1, 0})); System.out.println("Prediction for [0, 0, 0, 1, 0, 0, 1, 1]: " + nn.predict(new double[]{0, 0, 0, 1, 0, 0, 1, 1})); System.out.println("Prediction for [0, 0, 0, 1, 0, 1, 0, 0]: " + nn.predict(new double[]{0, 0, 0, 1, 0, 1, 0, 0})); System.out.println("Prediction for [0, 0, 0, 1, 0, 1, 0, 1]: " + nn.predict(new double[]{0, 0, 0, 1, 0, 1, 0, 1})); System.out.println("Prediction for [0, 0, 0, 1, 0, 1, 1, 0]: " + nn.predict(new double[]{0, 0, 0, 1, 0, 1, 1, 0})); System.out.println("Prediction for [0, 0, 0, 1, 0, 1, 1, 1]: " + nn.predict(new double[]{0, 0, 0, 1, 0, 1, 1, 1})); System.out.println("Prediction for [0, 0, 0, 1, 1, 0, 0, 0]: " + nn.predict(new double[]{0, 0, 0, 1, 1, 0, 0, 0})); System.out.println("Prediction for [0, 0, 0, 1, 1, 0, 0, 1]: " + nn.predict(new double[]{0, 0, 0, 1, 1, 0, 0, 1})); System.out.println("Prediction for [0, 0, 0, 1, 1, 0, 1, 0]: " + nn.predict(new double[]{0, 0, 0, 1, 1, 0, 1, 0})); System.out.println("Prediction for [0, 0, 0, 1, 1, 0, 1, 1]: " + nn.predict(new double[]{0, 0, 0, 1, 1, 0, 1, 1})); System.out.println("Prediction for [0, 0, 0, 1, 1, 1, 0, 0]: " + nn.predict(new double[]{0, 0, 0, 1, 1, 1, 0, 0})); System.out.println("Prediction for [0, 0, 0, 1, 1, 1, 0, 1]: " + nn.predict(new double[]{0, 0, 0, 1, 1, 1, 0, 1})); System.out.println("Prediction for [0, 0, 0, 1, 1, 1, 1, 0]: " + nn.predict(new double[]{0, 0, 0, 1, 1, 1, 1, 0})); System.out.println("Prediction for [0, 0, 0, 1, 1, 1, 1, 1]: " + nn.predict(new double[]{0, 0, 0, 1, 1, 1, 1, 1})); System.out.println("Prediction for [0, 0, 1, 0, 0, 0, 0, 0]: " + nn.predict(new double[]{0, 0, 1, 0, 0, 0, 0, 0})); System.out.println("Prediction for [0, 0, 1, 0, 0, 0, 0, 1]: " + nn.predict(new double[]{0, 0, 1, 0, 0, 0, 0, 1})); System.out.println("Prediction for [0, 0, 1, 0, 0, 0, 1, 0]: " + nn.predict(new double[]{0, 0, 1, 0, 0, 0, 1, 0})); System.out.println("Prediction for [0, 0, 1, 0, 0, 0, 1, 1]: " + nn.predict(new double[]{0, 0, 1, 0, 0, 0, 1, 1})); System.out.println("Prediction for [0, 0, 1, 0, 0, 1, 0, 0]: " + nn.predict(new double[]{0, 0, 1, 0, 0, 1, 0, 0})); System.out.println("Prediction for [0, 0, 1, 0, 0, 1, 0, 1]: " + nn.predict(new double[]{0, 0, 1, 0, 0, 1, 0, 1})); System.out.println("Prediction for [0, 0, 1, 0, 0, 1, 1, 0]: " + nn.predict(new double[]{0, 0, 1, 0, 0, 1, 1, 0})); System.out.println("Prediction for [0, 0, 1, 0, 0, 1, 1, 1]: " + nn.predict(new double[]{0, 0, 1, 0, 0, 1, 1, 1})); System.out.println("Prediction for [0, 0, 1, 0, 1, 0, 0, 0]: " + nn.predict(new double[]{0, 0, 1, 0, 1, 0, 0, 0})); System.out.println("Prediction for [0, 0, 1, 0, 1, 0, 0, 1]: " + nn.predict(new double[]{0, 0, 1, 0, 1, 0, 0, 1})); System.out.println("Prediction for [0, 0, 1, 0, 1, 0, 1, 0]: " + nn.predict(new double[]{0, 0, 1, 0, 1, 0, 1, 0})); System.out.println("Prediction for [0, 0, 1, 0, 1, 0, 1, 1]: " + nn.predict(new double[]{0, 0, 1, 0, 1, 0, 1, 1})); System.out.println("Prediction for [0, 0, 1, 0, 1, 1, 0, 0]: " + nn.predict(new double[]{0, 0, 1, 0, 1, 1, 0, 0})); System.out.println("Prediction for [0, 0, 1, 0, 1, 1, 0, 1]: " + nn.predict(new double[]{0, 0, 1, 0, 1, 1, 0, 1})); System.out.println("Prediction for [0, 0, 1, 0, 1, 1, 1, 0]: " + nn.predict(new double[]{0, 0, 1, 0, 1, 1, 1, 0})); System.out.println("Prediction for [0, 0, 1, 0, 1, 1, 1, 1]: " + nn.predict(new double[]{0, 0, 1, 0, 1, 1, 1, 1})); System.out.println("Prediction for [0, 0, 1, 1, 0, 0, 0, 0]: " + nn.predict(new double[]{0, 0, 1, 1, 0, 0, 0, 0})); System.out.println("Prediction for [0, 0, 1, 1, 0, 0, 0, 1]: " + nn.predict(new double[]{0, 0, 1, 1, 0, 0, 0, 1})); System.out.println("Prediction for [0, 0, 1, 1, 0, 0, 1, 0]: " + nn.predict(new double[]{0, 0, 1, 1, 0, 0, 1, 0})); System.out.println("Prediction for [0, 0, 1, 1, 0, 0, 1, 1]: " + nn.predict(new double[]{0, 0, 1, 1, 0, 0, 1, 1})); System.out.println("Prediction for [0, 0, 1, 1, 0, 1, 0, 0]: " + nn.predict(new double[]{0, 0, 1, 1, 0, 1, 0, 0})); System.out.println("Prediction for [0, 0, 1, 1, 0, 1, 0, 1]: " + nn.predict(new double[]{0, 0, 1, 1, 0, 1, 0, 1})); System.out.println("Prediction for [0, 0, 1, 1, 0, 1, 1, 0]: " + nn.predict(new double[]{0, 0, 1, 1, 0, 1, 1, 0})); System.out.println("Prediction for [0, 0, 1, 1, 0, 1, 1, 1]: " + nn.predict(new double[]{0, 0, 1, 1, 0, 1, 1, 1})); System.out.println("Prediction for [0, 0, 1, 1, 1, 0, 0, 0]: " + nn.predict(new double[]{0, 0, 1, 1, 1, 0, 0, 0})); System.out.println("Prediction for [0, 0, 1, 1, 1, 0, 0, 1]: " + nn.predict(new double[]{0, 0, 1, 1, 1, 0, 0, 1})); System.out.println("Prediction for [0, 0, 1, 1, 1, 0, 1, 0]: " + nn.predict(new double[]{0, 0, 1, 1, 1, 0, 1, 0})); System.out.println("Prediction for [0, 0, 1, 1, 1, 0, 1, 1]: " + nn.predict(new double[]{0, 0, 1, 1, 1, 0, 1, 1})); System.out.println("Prediction for [0, 0, 1, 1, 1, 1, 0, 0]: " + nn.predict(new double[]{0, 0, 1, 1, 1, 1, 0, 0})); System.out.println("Prediction for [0, 0, 1, 1, 1, 1, 0, 1]: " + nn.predict(new double[]{0, 0, 1, 1, 1, 1, 0, 1})); System.out.println("Prediction for [0, 0, 1, 1, 1, 1, 1, 0]: " + nn.predict(new double[]{0, 0, 1, 1, 1, 1, 1, 0})); System.out.println("Prediction for [0, 0, 1, 1, 1, 1, 1, 1]: " + nn.predict(new double[]{0, 0, 1, 1, 1, 1, 1, 1})); System.out.println("Prediction for [0, 1, 0, 0, 0, 0, 0, 0]: " + nn.predict(new double[]{0, 1, 0, 0, 0, 0, 0, 0})); System.out.println("Prediction for [0, 1, 0, 0, 0, 0, 0, 1]: " + nn.predict(new double[]{0, 1, 0, 0, 0, 0, 0, 1})); System.out.println("Prediction for [0, 1, 0, 0, 0, 0, 1, 0]: " + nn.predict(new double[]{0, 1, 0, 0, 0, 0, 1, 0})); System.out.println("Prediction for [0, 1, 0, 0, 0, 0, 1, 1]: " + nn.predict(new double[]{0, 1, 0, 0, 0, 0, 1, 1})); System.out.println("Prediction for [0, 1, 0, 0, 0, 1, 0, 0]: " + nn.predict(new double[]{0, 1, 0, 0, 0, 1, 0, 0})); System.out.println("Prediction for [0, 1, 0, 0, 0, 1, 0, 1]: " + nn.predict(new double[]{0, 1, 0, 0, 0, 1, 0, 1})); System.out.println("Prediction for [0, 1, 0, 0, 0, 1, 1, 0]: " + nn.predict(new double[]{0, 1, 0, 0, 0, 1, 1, 0})); System.out.println("Prediction for [0, 1, 0, 0, 0, 1, 1, 1]: " + nn.predict(new double[]{0, 1, 0, 0, 0, 1, 1, 1})); System.out.println("Prediction for [0, 1, 0, 0, 1, 0, 0, 0]: " + nn.predict(new double[]{0, 1, 0, 0, 1, 0, 0, 0})); System.out.println("Prediction for [0, 1, 0, 0, 1, 0, 0, 1]: " + nn.predict(new double[]{0, 1, 0, 0, 1, 0, 0, 1})); System.out.println("Prediction for [0, 1, 0, 0, 1, 0, 1, 0]: " + nn.predict(new double[]{0, 1, 0, 0, 1, 0, 1, 0})); System.out.println("Prediction for [0, 1, 0, 0, 1, 0, 1, 1]: " + nn.predict(new double[]{0, 1, 0, 0, 1, 0, 1, 1})); System.out.println("Prediction for [0, 1, 0, 0, 1, 1, 0, 0]: " + nn.predict(new double[]{0, 1, 0, 0, 1, 1, 0, 0})); System.out.println("Prediction for [0, 1, 0, 0, 1, 1, 0, 1]: " + nn.predict(new double[]{0, 1, 0, 0, 1, 1, 0, 1})); System.out.println("Prediction for [0, 1, 0, 0, 1, 1, 1, 0]: " + nn.predict(new double[]{0, 1, 0, 0, 1, 1, 1, 0})); System.out.println("Prediction for [0, 1, 0, 0, 1, 1, 1, 1]: " + nn.predict(new double[]{0, 1, 0, 0, 1, 1, 1, 1})); System.out.println("Prediction for [0, 1, 0, 1, 0, 0, 0, 0]: " + nn.predict(new double[]{0, 1, 0, 1, 0, 0, 0, 0})); System.out.println("Prediction for [0, 1, 0, 1, 0, 0, 0, 1]: " + nn.predict(new double[]{0, 1, 0, 1, 0, 0, 0, 1})); System.out.println("Prediction for [0, 1, 0, 1, 0, 0, 1, 0]: " + nn.predict(new double[]{0, 1, 0, 1, 0, 0, 1, 0})); System.out.println("Prediction for [0, 1, 0, 1, 0, 0, 1, 1]: " + nn.predict(new double[]{0, 1, 0, 1, 0, 0, 1, 1})); System.out.println("Prediction for [0, 1, 0, 1, 0, 1, 0, 0]: " + nn.predict(new double[]{0, 1, 0, 1, 0, 1, 0, 0})); System.out.println("Prediction for [0, 1, 0, 1, 0, 1, 0, 1]: " + nn.predict(new double[]{0, 1, 0, 1, 0, 1, 0, 1})); System.out.println("Prediction for [0, 1, 0, 1, 0, 1, 1, 0]: " + nn.predict(new double[]{0, 1, 0, 1, 0, 1, 1, 0})); System.out.println("Prediction for [0, 1, 0, 1, 0, 1, 1, 1]: " + nn.predict(new double[]{0, 1, 0, 1, 0, 1, 1, 1})); System.out.println("Prediction for [0, 1, 0, 1, 1, 0, 0, 0]: " + nn.predict(new double[]{0, 1, 0, 1, 1, 0, 0, 0})); System.out.println("Prediction for [0, 1, 0, 1, 1, 0, 0, 1]: " + nn.predict(new double[]{0, 1, 0, 1, 1, 0, 0, 1})); System.out.println("Prediction for [0, 1, 0, 1, 1, 0, 1, 0]: " + nn.predict(new double[]{0, 1, 0, 1, 1, 0, 1, 0})); System.out.println("Prediction for [0, 1, 0, 1, 1, 0, 1, 1]: " + nn.predict(new double[]{0, 1, 0, 1, 1, 0, 1, 1})); System.out.println("Prediction for [0, 1, 0, 1, 1, 1, 0, 0]: " + nn.predict(new double[]{0, 1, 0, 1, 1, 1, 0, 0})); System.out.println("Prediction for [0, 1, 0, 1, 1, 1, 0, 1]: " + nn.predict(new double[]{0, 1, 0, 1, 1, 1, 0, 1})); System.out.println("Prediction for [0, 1, 0, 1, 1, 1, 1, 0]: " + nn.predict(new double[]{0, 1, 0, 1, 1, 1, 1, 0})); System.out.println("Prediction for [0, 1, 0, 1, 1, 1, 1, 1]: " + nn.predict(new double[]{0, 1, 0, 1, 1, 1, 1, 1})); System.out.println("Prediction for [0, 1, 1, 0, 0, 0, 0, 0]: " + nn.predict(new double[]{0, 1, 1, 0, 0, 0, 0, 0})); System.out.println("Prediction for [0, 1, 1, 0, 0, 0, 0, 1]: " + nn.predict(new double[]{0, 1, 1, 0, 0, 0, 0, 1})); System.out.println("Prediction for [0, 1, 1, 0, 0, 0, 1, 0]: " + nn.predict(new double[]{0, 1, 1, 0, 0, 0, 1, 0})); System.out.println("Prediction for [0, 1, 1, 0, 0, 0, 1, 1]: " + nn.predict(new double[]{0, 1, 1, 0, 0, 0, 1, 1})); System.out.println("Prediction for [0, 1, 1, 0, 0, 1, 0, 0]: " + nn.predict(new double[]{0, 1, 1, 0, 0, 1, 0, 0})); System.out.println("Prediction for [0, 1, 1, 0, 0, 1, 0, 1]: " + nn.predict(new double[]{0, 1, 1, 0, 0, 1, 0, 1})); System.out.println("Prediction for [0, 1, 1, 0, 0, 1, 1, 0]: " + nn.predict(new double[]{0, 1, 1, 0, 0, 1, 1, 0})); System.out.println("Prediction for [0, 1, 1, 0, 0, 1, 1, 1]: " + nn.predict(new double[]{0, 1, 1, 0, 0, 1, 1, 1})); System.out.println("Prediction for [0, 1, 1, 0, 1, 0, 0, 0]: " + nn.predict(new double[]{0, 1, 1, 0, 1, 0, 0, 0})); System.out.println("Prediction for [0, 1, 1, 0, 1, 0, 0, 1]: " + nn.predict(new double[]{0, 1, 1, 0, 1, 0, 0, 1})); System.out.println("Prediction for [0, 1, 1, 0, 1, 0, 1, 0]: " + nn.predict(new double[]{0, 1, 1, 0, 1, 0, 1, 0})); System.out.println("Prediction for [0, 1, 1, 0, 1, 0, 1, 1]: " + nn.predict(new double[]{0, 1, 1, 0, 1, 0, 1, 1})); System.out.println("Prediction for [0, 1, 1, 0, 1, 1, 0, 0]: " + nn.predict(new double[]{0, 1, 1, 0, 1, 1, 0, 0})); System.out.println("Prediction for [0, 1, 1, 0, 1, 1, 0, 1]: " + nn.predict(new double[]{0, 1, 1, 0, 1, 1, 0, 1})); System.out.println("Prediction for [0, 1, 1, 0, 1, 1, 1, 0]: " + nn.predict(new double[]{0, 1, 1, 0, 1, 1, 1, 0})); System.out.println("Prediction for [0, 1, 1, 0, 1, 1, 1, 1]: " + nn.predict(new double[]{0, 1, 1, 0, 1, 1, 1, 1})); System.out.println("Prediction for [0, 1, 1, 1, 0, 0, 0, 0]: " + nn.predict(new double[]{0, 1, 1, 1, 0, 0, 0, 0})); System.out.println("Prediction for [0, 1, 1, 1, 0, 0, 0, 1]: " + nn.predict(new double[]{0, 1, 1, 1, 0, 0, 0, 1})); System.out.println("Prediction for [0, 1, 1, 1, 0, 0, 1, 0]: " + nn.predict(new double[]{0, 1, 1, 1, 0, 0, 1, 0})); System.out.println("Prediction for [0, 1, 1, 1, 0, 0, 1, 1]: " + nn.predict(new double[]{0, 1, 1, 1, 0, 0, 1, 1})); System.out.println("Prediction for [0, 1, 1, 1, 0, 1, 0, 0]: " + nn.predict(new double[]{0, 1, 1, 1, 0, 1, 0, 0})); System.out.println("Prediction for [0, 1, 1, 1, 0, 1, 0, 1]: " + nn.predict(new double[]{0, 1, 1, 1, 0, 1, 0, 1})); System.out.println("Prediction for [0, 1, 1, 1, 0, 1, 1, 0]: " + nn.predict(new double[]{0, 1, 1, 1, 0, 1, 1, 0})); System.out.println("Prediction for [0, 1, 1, 1, 0, 1, 1, 1]: " + nn.predict(new double[]{0, 1, 1, 1, 0, 1, 1, 1})); System.out.println("Prediction for [0, 1, 1, 1, 1, 0, 0, 0]: " + nn.predict(new double[]{0, 1, 1, 1, 1, 0, 0, 0})); System.out.println("Prediction for [0, 1, 1, 1, 1, 0, 0, 1]: " + nn.predict(new double[]{0, 1, 1, 1, 1, 0, 0, 1})); System.out.println("Prediction for [0, 1, 1, 1, 1, 0, 1, 0]: " + nn.predict(new double[]{0, 1, 1, 1, 1, 0, 1, 0})); System.out.println("Prediction for [0, 1, 1, 1, 1, 0, 1, 1]: " + nn.predict(new double[]{0, 1, 1, 1, 1, 0, 1, 1})); System.out.println("Prediction for [0, 1, 1, 1, 1, 1, 0, 0]: " + nn.predict(new double[]{0, 1, 1, 1, 1, 1, 0, 0})); System.out.println("Prediction for [0, 1, 1, 1, 1, 1, 0, 1]: " + nn.predict(new double[]{0, 1, 1, 1, 1, 1, 0, 1})); System.out.println("Prediction for [0, 1, 1, 1, 1, 1, 1, 0]: " + nn.predict(new double[]{0, 1, 1, 1, 1, 1, 1, 0})); System.out.println("Prediction for [0, 1, 1, 1, 1, 1, 1, 1]: " + nn.predict(new double[]{0, 1, 1, 1, 1, 1, 1, 1})); System.out.println("Prediction for [1, 0, 0, 0, 0, 0, 0, 0]: " + nn.predict(new double[]{1, 0, 0, 0, 0, 0, 0, 0})); System.out.println("Prediction for [1, 0, 0, 0, 0, 0, 0, 1]: " + nn.predict(new double[]{1, 0, 0, 0, 0, 0, 0, 1})); System.out.println("Prediction for [1, 0, 0, 0, 0, 0, 1, 0]: " + nn.predict(new double[]{1, 0, 0, 0, 0, 0, 1, 0})); System.out.println("Prediction for [1, 0, 0, 0, 0, 0, 1, 1]: " + nn.predict(new double[]{1, 0, 0, 0, 0, 0, 1, 1})); System.out.println("Prediction for [1, 0, 0, 0, 0, 1, 0, 0]: " + nn.predict(new double[]{1, 0, 0, 0, 0, 1, 0, 0})); System.out.println("Prediction for [1, 0, 0, 0, 0, 1, 0, 1]: " + nn.predict(new double[]{1, 0, 0, 0, 0, 1, 0, 1})); System.out.println("Prediction for [1, 0, 0, 0, 0, 1, 1, 0]: " + nn.predict(new double[]{1, 0, 0, 0, 0, 1, 1, 0})); System.out.println("Prediction for [1, 0, 0, 0, 0, 1, 1, 1]: " + nn.predict(new double[]{1, 0, 0, 0, 0, 1, 1, 1})); System.out.println("Prediction for [1, 0, 0, 0, 1, 0, 0, 0]: " + nn.predict(new double[]{1, 0, 0, 0, 1, 0, 0, 0})); System.out.println("Prediction for [1, 0, 0, 0, 1, 0, 0, 1]: " + nn.predict(new double[]{1, 0, 0, 0, 1, 0, 0, 1})); System.out.println("Prediction for [1, 0, 0, 0, 1, 0, 1, 0]: " + nn.predict(new double[]{1, 0, 0, 0, 1, 0, 1, 0})); System.out.println("Prediction for [1, 0, 0, 0, 1, 0, 1, 1]: " + nn.predict(new double[]{1, 0, 0, 0, 1, 0, 1, 1})); System.out.println("Prediction for [1, 0, 0, 0, 1, 1, 0, 0]: " + nn.predict(new double[]{1, 0, 0, 0, 1, 1, 0, 0})); System.out.println("Prediction for [1, 0, 0, 0, 1, 1, 0, 1]: " + nn.predict(new double[]{1, 0, 0, 0, 1, 1, 0, 1})); System.out.println("Prediction for [1, 0, 0, 0, 1, 1, 1, 0]: " + nn.predict(new double[]{1, 0, 0, 0, 1, 1, 1, 0})); System.out.println("Prediction for [1, 0, 0, 0, 1, 1, 1, 1]: " + nn.predict(new double[]{1, 0, 0, 0, 1, 1, 1, 1})); System.out.println("Prediction for [1, 0, 0, 1, 0, 0, 0, 0]: " + nn.predict(new double[]{1, 0, 0, 1, 0, 0, 0, 0})); System.out.println("Prediction for [1, 0, 0, 1, 0, 0, 0, 1]: " + nn.predict(new double[]{1, 0, 0, 1, 0, 0, 0, 1})); System.out.println("Prediction for [1, 0, 0, 1, 0, 0, 1, 0]: " + nn.predict(new double[]{1, 0, 0, 1, 0, 0, 1, 0})); System.out.println("Prediction for [1, 0, 0, 1, 0, 0, 1, 1]: " + nn.predict(new double[]{1, 0, 0, 1, 0, 0, 1, 1})); System.out.println("Prediction for [1, 0, 0, 1, 0, 1, 0, 0]: " + nn.predict(new double[]{1, 0, 0, 1, 0, 1, 0, 0})); System.out.println("Prediction for [1, 0, 0, 1, 0, 1, 0, 1]: " + nn.predict(new double[]{1, 0, 0, 1, 0, 1, 0, 1})); System.out.println("Prediction for [1, 0, 0, 1, 0, 1, 1, 0]: " + nn.predict(new double[]{1, 0, 0, 1, 0, 1, 1, 0})); System.out.println("Prediction for [1, 0, 0, 1, 0, 1, 1, 1]: " + nn.predict(new double[]{1, 0, 0, 1, 0, 1, 1, 1})); System.out.println("Prediction for [1, 0, 0, 1, 1, 0, 0, 0]: " + nn.predict(new double[]{1, 0, 0, 1, 1, 0, 0, 0})); System.out.println("Prediction for [1, 0, 0, 1, 1, 0, 0, 1]: " + nn.predict(new double[]{1, 0, 0, 1, 1, 0, 0, 1})); System.out.println("Prediction for [1, 0, 0, 1, 1, 0, 1, 0]: " + nn.predict(new double[]{1, 0, 0, 1, 1, 0, 1, 0})); System.out.println("Prediction for [1, 0, 0, 1, 1, 0, 1, 1]: " + nn.predict(new double[]{1, 0, 0, 1, 1, 0, 1, 1})); System.out.println("Prediction for [1, 0, 0, 1, 1, 1, 0, 0]: " + nn.predict(new double[]{1, 0, 0, 1, 1, 1, 0, 0})); System.out.println("Prediction for [1, 0, 0, 1, 1, 1, 0, 1]: " + nn.predict(new double[]{1, 0, 0, 1, 1, 1, 0, 1})); System.out.println("Prediction for [1, 0, 0, 1, 1, 1, 1, 0]: " + nn.predict(new double[]{1, 0, 0, 1, 1, 1, 1, 0})); System.out.println("Prediction for [1, 0, 0, 1, 1, 1, 1, 1]: " + nn.predict(new double[]{1, 0, 0, 1, 1, 1, 1, 1})); System.out.println("Prediction for [1, 0, 1, 0, 0, 0, 0, 0]: " + nn.predict(new double[]{1, 0, 1, 0, 0, 0, 0, 0})); System.out.println("Prediction for [1, 0, 1, 0, 0, 0, 0, 1]: " + nn.predict(new double[]{1, 0, 1, 0, 0, 0, 0, 1})); System.out.println("Prediction for [1, 0, 1, 0, 0, 0, 1, 0]: " + nn.predict(new double[]{1, 0, 1, 0, 0, 0, 1, 0})); System.out.println("Prediction for [1, 0, 1, 0, 0, 0, 1, 1]: " + nn.predict(new double[]{1, 0, 1, 0, 0, 0, 1, 1})); System.out.println("Prediction for [1, 0, 1, 0, 0, 1, 0, 0]: " + nn.predict(new double[]{1, 0, 1, 0, 0, 1, 0, 0})); System.out.println("Prediction for [1, 0, 1, 0, 0, 1, 0, 1]: " + nn.predict(new double[]{1, 0, 1, 0, 0, 1, 0, 1})); System.out.println("Prediction for [1, 0, 1, 0, 0, 1, 1, 0]: " + nn.predict(new double[]{1, 0, 1, 0, 0, 1, 1, 0})); System.out.println("Prediction for [1, 0, 1, 0, 0, 1, 1, 1]: " + nn.predict(new double[]{1, 0, 1, 0, 0, 1, 1, 1})); System.out.println("Prediction for [1, 0, 1, 0, 1, 0, 0, 0]: " + nn.predict(new double[]{1, 0, 1, 0, 1, 0, 0, 0})); System.out.println("Prediction for [1, 0, 1, 0, 1, 0, 0, 1]: " + nn.predict(new double[]{1, 0, 1, 0, 1, 0, 0, 1})); System.out.println("Prediction for [1, 0, 1, 0, 1, 0, 1, 0]: " + nn.predict(new double[]{1, 0, 1, 0, 1, 0, 1, 0})); System.out.println("Prediction for [1, 0, 1, 0, 1, 0, 1, 1]: " + nn.predict(new double[]{1, 0, 1, 0, 1, 0, 1, 1})); System.out.println("Prediction for [1, 0, 1, 0, 1, 1, 0, 0]: " + nn.predict(new double[]{1, 0, 1, 0, 1, 1, 0, 0})); System.out.println("Prediction for [1, 0, 1, 0, 1, 1, 0, 1]: " + nn.predict(new double[]{1, 0, 1, 0, 1, 1, 0, 1})); System.out.println("Prediction for [1, 0, 1, 0, 1, 1, 1, 0]: " + nn.predict(new double[]{1, 0, 1, 0, 1, 1, 1, 0})); System.out.println("Prediction for [1, 0, 1, 0, 1, 1, 1, 1]: " + nn.predict(new double[]{1, 0, 1, 0, 1, 1, 1, 1})); System.out.println("Prediction for [1, 0, 1, 1, 0, 0, 0, 0]: " + nn.predict(new double[]{1, 0, 1, 1, 0, 0, 0, 0})); System.out.println("Prediction for [1, 0, 1, 1, 0, 0, 0, 1]: " + nn.predict(new double[]{1, 0, 1, 1, 0, 0, 0, 1})); System.out.println("Prediction for [1, 0, 1, 1, 0, 0, 1, 0]: " + nn.predict(new double[]{1, 0, 1, 1, 0, 0, 1, 0})); System.out.println("Prediction for [1, 0, 1, 1, 0, 0, 1, 1]: " + nn.predict(new double[]{1, 0, 1, 1, 0, 0, 1, 1})); System.out.println("Prediction for [1, 0, 1, 1, 0, 1, 0, 0]: " + nn.predict(new double[]{1, 0, 1, 1, 0, 1, 0, 0})); System.out.println("Prediction for [1, 0, 1, 1, 0, 1, 0, 1]: " + nn.predict(new double[]{1, 0, 1, 1, 0, 1, 0, 1})); System.out.println("Prediction for [1, 0, 1, 1, 0, 1, 1, 0]: " + nn.predict(new double[]{1, 0, 1, 1, 0, 1, 1, 0})); System.out.println("Prediction for [1, 0, 1, 1, 0, 1, 1, 1]: " + nn.predict(new double[]{1, 0, 1, 1, 0, 1, 1, 1})); System.out.println("Prediction for [1, 0, 1, 1, 1, 0, 0, 0]: " + nn.predict(new double[]{1, 0, 1, 1, 1, 0, 0, 0})); System.out.println("Prediction for [1, 0, 1, 1, 1, 0, 0, 1]: " + nn.predict(new double[]{1, 0, 1, 1, 1, 0, 0, 1})); System.out.println("Prediction for [1, 0, 1, 1, 1, 0, 1, 0]: " + nn.predict(new double[]{1, 0, 1, 1, 1, 0, 1, 0})); System.out.println("Prediction for [1, 0, 1, 1, 1, 0, 1, 1]: " + nn.predict(new double[]{1, 0, 1, 1, 1, 0, 1, 1})); System.out.println("Prediction for [1, 0, 1, 1, 1, 1, 0, 0]: " + nn.predict(new double[]{1, 0, 1, 1, 1, 1, 0, 0})); System.out.println("Prediction for [1, 0, 1, 1, 1, 1, 0, 1]: " + nn.predict(new double[]{1, 0, 1, 1, 1, 1, 0, 1})); System.out.println("Prediction for [1, 0, 1, 1, 1, 1, 1, 0]: " + nn.predict(new double[]{1, 0, 1, 1, 1, 1, 1, 0})); System.out.println("Prediction for [1, 0, 1, 1, 1, 1, 1, 1]: " + nn.predict(new double[]{1, 0, 1, 1, 1, 1, 1, 1})); System.out.println("Prediction for [1, 1, 0, 0, 0, 0, 0, 0]: " + nn.predict(new double[]{1, 1, 0, 0, 0, 0, 0, 0})); System.out.println("Prediction for [1, 1, 0, 0, 0, 0, 0, 1]: " + nn.predict(new double[]{1, 1, 0, 0, 0, 0, 0, 1})); System.out.println("Prediction for [1, 1, 0, 0, 0, 0, 1, 0]: " + nn.predict(new double[]{1, 1, 0, 0, 0, 0, 1, 0})); System.out.println("Prediction for [1, 1, 0, 0, 0, 0, 1, 1]: " + nn.predict(new double[]{1, 1, 0, 0, 0, 0, 1, 1})); System.out.println("Prediction for [1, 1, 0, 0, 0, 1, 0, 0]: " + nn.predict(new double[]{1, 1, 0, 0, 0, 1, 0, 0})); System.out.println("Prediction for [1, 1, 0, 0, 0, 1, 0, 1]: " + nn.predict(new double[]{1, 1, 0, 0, 0, 1, 0, 1})); System.out.println("Prediction for [1, 1, 0, 0, 0, 1, 1, 0]: " + nn.predict(new double[]{1, 1, 0, 0, 0, 1, 1, 0})); System.out.println("Prediction for [1, 1, 0, 0, 0, 1, 1, 1]: " + nn.predict(new double[]{1, 1, 0, 0, 0, 1, 1, 1})); System.out.println("Prediction for [1, 1, 0, 0, 1, 0, 0, 0]: " + nn.predict(new double[]{1, 1, 0, 0, 1, 0, 0, 0})); System.out.println("Prediction for [1, 1, 0, 0, 1, 0, 0, 1]: " + nn.predict(new double[]{1, 1, 0, 0, 1, 0, 0, 1})); System.out.println("Prediction for [1, 1, 0, 0, 1, 0, 1, 0]: " + nn.predict(new double[]{1, 1, 0, 0, 1, 0, 1, 0})); System.out.println("Prediction for [1, 1, 0, 0, 1, 0, 1, 1]: " + nn.predict(new double[]{1, 1, 0, 0, 1, 0, 1, 1})); System.out.println("Prediction for [1, 1, 0, 0, 1, 1, 0, 0]: " + nn.predict(new double[]{1, 1, 0, 0, 1, 1, 0, 0})); System.out.println("Prediction for [1, 1, 0, 0, 1, 1, 0, 1]: " + nn.predict(new double[]{1, 1, 0, 0, 1, 1, 0, 1})); System.out.println("Prediction for [1, 1, 0, 0, 1, 1, 1, 0]: " + nn.predict(new double[]{1, 1, 0, 0, 1, 1, 1, 0})); System.out.println("Prediction for [1, 1, 0, 0, 1, 1, 1, 1]: " + nn.predict(new double[]{1, 1, 0, 0, 1, 1, 1, 1})); System.out.println("Prediction for [1, 1, 0, 1, 0, 0, 0, 0]: " + nn.predict(new double[]{1, 1, 0, 1, 0, 0, 0, 0})); System.out.println("Prediction for [1, 1, 0, 1, 0, 0, 0, 1]: " + nn.predict(new double[]{1, 1, 0, 1, 0, 0, 0, 1})); System.out.println("Prediction for [1, 1, 0, 1, 0, 0, 1, 0]: " + nn.predict(new double[]{1, 1, 0, 1, 0, 0, 1, 0})); System.out.println("Prediction for [1, 1, 0, 1, 0, 0, 1, 1]: " + nn.predict(new double[]{1, 1, 0, 1, 0, 0, 1, 1})); System.out.println("Prediction for [1, 1, 0, 1, 0, 1, 0, 0]: " + nn.predict(new double[]{1, 1, 0, 1, 0, 1, 0, 0})); System.out.println("Prediction for [1, 1, 0, 1, 0, 1, 0, 1]: " + nn.predict(new double[]{1, 1, 0, 1, 0, 1, 0, 1})); System.out.println("Prediction for [1, 1, 0, 1, 0, 1, 1, 0]: " + nn.predict(new double[]{1, 1, 0, 1, 0, 1, 1, 0})); System.out.println("Prediction for [1, 1, 0, 1, 0, 1, 1, 1]: " + nn.predict(new double[]{1, 1, 0, 1, 0, 1, 1, 1})); System.out.println("Prediction for [1, 1, 0, 1, 1, 0, 0, 0]: " + nn.predict(new double[]{1, 1, 0, 1, 1, 0, 0, 0})); System.out.println("Prediction for [1, 1, 0, 1, 1, 0, 0, 1]: " + nn.predict(new double[]{1, 1, 0, 1, 1, 0, 0, 1})); System.out.println("Prediction for [1, 1, 0, 1, 1, 0, 1, 0]: " + nn.predict(new double[]{1, 1, 0, 1, 1, 0, 1, 0})); System.out.println("Prediction for [1, 1, 0, 1, 1, 0, 1, 1]: " + nn.predict(new double[]{1, 1, 0, 1, 1, 0, 1, 1})); System.out.println("Prediction for [1, 1, 0, 1, 1, 1, 0, 0]: " + nn.predict(new double[]{1, 1, 0, 1, 1, 1, 0, 0})); System.out.println("Prediction for [1, 1, 0, 1, 1, 1, 0, 1]: " + nn.predict(new double[]{1, 1, 0, 1, 1, 1, 0, 1})); System.out.println("Prediction for [1, 1, 0, 1, 1, 1, 1, 0]: " + nn.predict(new double[]{1, 1, 0, 1, 1, 1, 1, 0})); System.out.println("Prediction for [1, 1, 0, 1, 1, 1, 1, 1]: " + nn.predict(new double[]{1, 1, 0, 1, 1, 1, 1, 1})); System.out.println("Prediction for [1, 1, 1, 0, 0, 0, 0, 0]: " + nn.predict(new double[]{1, 1, 1, 0, 0, 0, 0, 0})); System.out.println("Prediction for [1, 1, 1, 0, 0, 0, 0, 1]: " + nn.predict(new double[]{1, 1, 1, 0, 0, 0, 0, 1})); System.out.println("Prediction for [1, 1, 1, 0, 0, 0, 1, 0]: " + nn.predict(new double[]{1, 1, 1, 0, 0, 0, 1, 0})); System.out.println("Prediction for [1, 1, 1, 0, 0, 0, 1, 1]: " + nn.predict(new double[]{1, 1, 1, 0, 0, 0, 1, 1})); System.out.println("Prediction for [1, 1, 1, 0, 0, 1, 0, 0]: " + nn.predict(new double[]{1, 1, 1, 0, 0, 1, 0, 0})); System.out.println("Prediction for [1, 1, 1, 0, 0, 1, 0, 1]: " + nn.predict(new double[]{1, 1, 1, 0, 0, 1, 0, 1})); System.out.println("Prediction for [1, 1, 1, 0, 0, 1, 1, 0]: " + nn.predict(new double[]{1, 1, 1, 0, 0, 1, 1, 0})); System.out.println("Prediction for [1, 1, 1, 0, 0, 1, 1, 1]: " + nn.predict(new double[]{1, 1, 1, 0, 0, 1, 1, 1})); System.out.println("Prediction for [1, 1, 1, 0, 1, 0, 0, 0]: " + nn.predict(new double[]{1, 1, 1, 0, 1, 0, 0, 0})); System.out.println("Prediction for [1, 1, 1, 0, 1, 0, 0, 1]: " + nn.predict(new double[]{1, 1, 1, 0, 1, 0, 0, 1})); System.out.println("Prediction for [1, 1, 1, 0, 1, 0, 1, 0]: " + nn.predict(new double[]{1, 1, 1, 0, 1, 0, 1, 0})); System.out.println("Prediction for [1, 1, 1, 0, 1, 0, 1, 1]: " + nn.predict(new double[]{1, 1, 1, 0, 1, 0, 1, 1})); System.out.println("Prediction for [1, 1, 1, 0, 1, 1, 0, 0]: " + nn.predict(new double[]{1, 1, 1, 0, 1, 1, 0, 0})); System.out.println("Prediction for [1, 1, 1, 0, 1, 1, 0, 1]: " + nn.predict(new double[]{1, 1, 1, 0, 1, 1, 0, 1})); System.out.println("Prediction for [1, 1, 1, 0, 1, 1, 1, 0]: " + nn.predict(new double[]{1, 1, 1, 0, 1, 1, 1, 0})); System.out.println("Prediction for [1, 1, 1, 0, 1, 1, 1, 1]: " + nn.predict(new double[]{1, 1, 1, 0, 1, 1, 1, 1})); System.out.println("Prediction for [1, 1, 1, 1, 0, 0, 0, 0]: " + nn.predict(new double[]{1, 1, 1, 1, 0, 0, 0, 0})); System.out.println("Prediction for [1, 1, 1, 1, 0, 0, 0, 1]: " + nn.predict(new double[]{1, 1, 1, 1, 0, 0, 0, 1})); System.out.println("Prediction for [1, 1, 1, 1, 0, 0, 1, 0]: " + nn.predict(new double[]{1, 1, 1, 1, 0, 0, 1, 0})); System.out.println("Prediction for [1, 1, 1, 1, 0, 0, 1, 1]: " + nn.predict(new double[]{1, 1, 1, 1, 0, 0, 1, 1})); System.out.println("Prediction for [1, 1, 1, 1, 0, 1, 0, 0]: " + nn.predict(new double[]{1, 1, 1, 1, 0, 1, 0, 0})); System.out.println("Prediction for [1, 1, 1, 1, 0, 1, 0, 1]: " + nn.predict(new double[]{1, 1, 1, 1, 0, 1, 0, 1})); System.out.println("Prediction for [1, 1, 1, 1, 0, 1, 1, 0]: " + nn.predict(new double[]{1, 1, 1, 1, 0, 1, 1, 0})); System.out.println("Prediction for [1, 1, 1, 1, 0, 1, 1, 1]: " + nn.predict(new double[]{1, 1, 1, 1, 0, 1, 1, 1})); System.out.println("Prediction for [1, 1, 1, 1, 1, 0, 0, 0]: " + nn.predict(new double[]{1, 1, 1, 1, 1, 0, 0, 0})); System.out.println("Prediction for [1, 1, 1, 1, 1, 0, 0, 1]: " + nn.predict(new double[]{1, 1, 1, 1, 1, 0, 0, 1})); System.out.println("Prediction for [1, 1, 1, 1, 1, 0, 1, 0]: " + nn.predict(new double[]{1, 1, 1, 1, 1, 0, 1, 0})); System.out.println("Prediction for [1, 1, 1, 1, 1, 0, 1, 1]: " + nn.predict(new double[]{1, 1, 1, 1, 1, 0, 1, 1})); System.out.println("Prediction for [1, 1, 1, 1, 1, 1, 0, 0]: " + nn.predict(new double[]{1, 1, 1, 1, 1, 1, 0, 0})); System.out.println("Prediction for [1, 1, 1, 1, 1, 1, 0, 1]: " + nn.predict(new double[]{1, 1, 1, 1, 1, 1, 0, 1})); System.out.println("Prediction for [1, 1, 1, 1, 1, 1, 1, 0]: " + nn.predict(new double[]{1, 1, 1, 1, 1, 1, 1, 0})); System.out.println("Prediction for [1, 1, 1, 1, 1, 1, 1, 1]: " + nn.predict(new double[]{1, 1, 1, 1, 1, 1, 1, 1})); } } } } run: Epoch 10000. Mean error: 0.03320182397344079 Epoch 20000. Mean error: 0.015664910563958027 Epoch 30000. Mean error: 0.010995680121444898 Epoch 40000. Mean error: 0.007215736479517636 Epoch 50000. Mean error: 0.004671420467816973 Epoch 60000. Mean error: 0.0033333409994070725 Epoch 70000. Mean error: 0.002438821540547091 Epoch 80000. Mean error: 0.001797394851011058 Epoch 90000. Mean error: 0.0014285088523369675 Epoch 100000. Mean error: 0.0011159668898050722 Prediction for [0, 0, 0, 0, 0, 0, 0, 0]: 1.002249807094342 Prediction for [0, 0, 0, 0, 0, 0, 0, 1]: 0.0 Prediction for [0, 0, 0, 0, 0, 0, 1, 0]: 0.0 Prediction for [0, 0, 0, 0, 0, 0, 1, 1]: 1.005775312107044 Prediction for [0, 0, 0, 0, 0, 1, 0, 0]: 0.0 Prediction for [0, 0, 0, 0, 0, 1, 0, 1]: 0.0 Prediction for [0, 0, 0, 0, 0, 1, 1, 0]: 1.0034494127090006 Prediction for [0, 0, 0, 0, 0, 1, 1, 1]: 0.0 Prediction for [0, 0, 0, 0, 1, 0, 0, 0]: 0.0 Prediction for [0, 0, 0, 0, 1, 0, 0, 1]: 0.9975595819738396 Prediction for [0, 0, 0, 0, 1, 0, 1, 0]: 0.0 Prediction for [0, 0, 0, 0, 1, 0, 1, 1]: 0.0 Prediction for [0, 0, 0, 0, 1, 1, 0, 0]: 1.0002228674093439 Prediction for [0, 0, 0, 0, 1, 1, 0, 1]: 0.0 Prediction for [0, 0, 0, 0, 1, 1, 1, 0]: 0.0 Prediction for [0, 0, 0, 0, 1, 1, 1, 1]: 0.9902095019746442 Prediction for [0, 0, 0, 1, 0, 0, 0, 0]: 0.0 Prediction for [0, 0, 0, 1, 0, 0, 0, 1]: 0.0 Prediction for [0, 0, 0, 1, 0, 0, 1, 0]: 1.0042265172554652 Prediction for [0, 0, 0, 1, 0, 0, 1, 1]: 0.0 Prediction for [0, 0, 0, 1, 0, 1, 0, 0]: 0.0 Prediction for [0, 0, 0, 1, 0, 1, 0, 1]: 1.0003704405106806 Prediction for [0, 0, 0, 1, 0, 1, 1, 0]: 0.0 Prediction for [0, 0, 0, 1, 0, 1, 1, 1]: 0.0 Prediction for [0, 0, 0, 1, 1, 0, 0, 0]: 0.9751408395568495 Prediction for [0, 0, 0, 1, 1, 0, 0, 1]: 0.0 Prediction for [0, 0, 0, 1, 1, 0, 1, 0]: 0.01649011799176181 Prediction for [0, 0, 0, 1, 1, 0, 1, 1]: 1.0099744674039748 Prediction for [0, 0, 0, 1, 1, 1, 0, 0]: 0.0 Prediction for [0, 0, 0, 1, 1, 1, 0, 1]: 0.0 Prediction for [0, 0, 0, 1, 1, 1, 1, 0]: 0.9863943579630314 Prediction for [0, 0, 0, 1, 1, 1, 1, 1]: 0.0 Prediction for [0, 0, 1, 0, 0, 0, 0, 0]: 0.21004743488120203 Prediction for [0, 0, 1, 0, 0, 0, 0, 1]: 0.9871866923531987 Prediction for [0, 0, 1, 0, 0, 0, 1, 0]: 0.0 Prediction for [0, 0, 1, 0, 0, 0, 1, 1]: 0.0 Prediction for [0, 0, 1, 0, 0, 1, 0, 0]: 1.0055183578932958 Prediction for [0, 0, 1, 0, 0, 1, 0, 1]: 0.0 Prediction for [0, 0, 1, 0, 0, 1, 1, 0]: 0.007120716120785353 Prediction for [0, 0, 1, 0, 0, 1, 1, 1]: 1.00379851918703 Prediction for [0, 0, 1, 0, 1, 0, 0, 0]: 0.0 Prediction for [0, 0, 1, 0, 1, 0, 0, 1]: 0.0 Prediction for [0, 0, 1, 0, 1, 0, 1, 0]: 0.7938630246637777 Prediction for [0, 0, 1, 0, 1, 0, 1, 1]: 0.0 Prediction for [0, 0, 1, 0, 1, 1, 0, 0]: 0.0 Prediction for [0, 0, 1, 0, 1, 1, 0, 1]: 0.9993393098917904 Prediction for [0, 0, 1, 0, 1, 1, 1, 0]: 0.0 Prediction for [0, 0, 1, 0, 1, 1, 1, 1]: 0.0 Prediction for [0, 0, 1, 1, 0, 0, 0, 0]: 0.7572283242298994 Prediction for [0, 0, 1, 1, 0, 0, 0, 1]: 0.0 Prediction for [0, 0, 1, 1, 0, 0, 1, 0]: 0.0 Prediction for [0, 0, 1, 1, 0, 0, 1, 1]: 0.9812761572917124 Prediction for [0, 0, 1, 1, 0, 1, 0, 0]: 0.0 Prediction for [0, 0, 1, 1, 0, 1, 0, 1]: 0.0 Prediction for [0, 0, 1, 1, 0, 1, 1, 0]: 0.9440805364880465 Prediction for [0, 0, 1, 1, 0, 1, 1, 1]: 0.0 Prediction for [0, 0, 1, 1, 1, 0, 0, 0]: 0.20689955481321753 Prediction for [0, 0, 1, 1, 1, 0, 0, 1]: 0.9468425725710206 Prediction for [0, 0, 1, 1, 1, 0, 1, 0]: 0.14114103381935905 Prediction for [0, 0, 1, 1, 1, 0, 1, 1]: 0.0643811102070515 Prediction for [0, 0, 1, 1, 1, 1, 0, 0]: 0.9906340356689181 Prediction for [0, 0, 1, 1, 1, 1, 0, 1]: 0.0 Prediction for [0, 0, 1, 1, 1, 1, 1, 0]: 0.03353389575501842 Prediction for [0, 0, 1, 1, 1, 1, 1, 1]: 1.0193903184820603 Prediction for [0, 1, 0, 0, 0, 0, 0, 0]: 0.0 Prediction for [0, 1, 0, 0, 0, 0, 0, 1]: 0.0 Prediction for [0, 1, 0, 0, 0, 0, 1, 0]: 1.0035794665731315 Prediction for [0, 1, 0, 0, 0, 0, 1, 1]: 0.0 Prediction for [0, 1, 0, 0, 0, 1, 0, 0]: 0.0 Prediction for [0, 1, 0, 0, 0, 1, 0, 1]: 0.994112527256279 Prediction for [0, 1, 0, 0, 0, 1, 1, 0]: 0.0 Prediction for [0, 1, 0, 0, 0, 1, 1, 1]: 0.0 Prediction for [0, 1, 0, 0, 1, 0, 0, 0]: 1.0118613803981313 Prediction for [0, 1, 0, 0, 1, 0, 0, 1]: 0.0 Prediction for [0, 1, 0, 0, 1, 0, 1, 0]: 0.0 Prediction for [0, 1, 0, 0, 1, 0, 1, 1]: 0.9847468032479805 Prediction for [0, 1, 0, 0, 1, 1, 0, 0]: 0.0 Prediction for [0, 1, 0, 0, 1, 1, 0, 1]: 0.0 Prediction for [0, 1, 0, 0, 1, 1, 1, 0]: 1.0151860264890478 Prediction for [0, 1, 0, 0, 1, 1, 1, 1]: 0.024533106135900873 Prediction for [0, 1, 0, 1, 0, 0, 0, 0]: 0.0 Prediction for [0, 1, 0, 1, 0, 0, 0, 1]: 1.0080674607462212 Prediction for [0, 1, 0, 1, 0, 0, 1, 0]: 0.0024421401257046504 Prediction for [0, 1, 0, 1, 0, 0, 1, 1]: 0.0 Prediction for [0, 1, 0, 1, 0, 1, 0, 0]: 1.014429925095659 Prediction for [0, 1, 0, 1, 0, 1, 0, 1]: 0.012388465701141271 Prediction for [0, 1, 0, 1, 0, 1, 1, 0]: 0.0 Prediction for [0, 1, 0, 1, 0, 1, 1, 1]: 1.0015320893551833 Prediction for [0, 1, 0, 1, 1, 0, 0, 0]: 0.0 Prediction for [0, 1, 0, 1, 1, 0, 0, 1]: 0.008986893723130773 Prediction for [0, 1, 0, 1, 1, 0, 1, 0]: 0.988894984198776 Prediction for [0, 1, 0, 1, 1, 0, 1, 1]: 0.0 Prediction for [0, 1, 0, 1, 1, 1, 0, 0]: 0.0 Prediction for [0, 1, 0, 1, 1, 1, 0, 1]: 0.9895108627880509 Prediction for [0, 1, 0, 1, 1, 1, 1, 0]: 0.0 Prediction for [0, 1, 0, 1, 1, 1, 1, 1]: 0.0 Prediction for [0, 1, 1, 0, 0, 0, 0, 0]: 1.009825663213511 Prediction for [0, 1, 1, 0, 0, 0, 0, 1]: 0.0 Prediction for [0, 1, 1, 0, 0, 0, 1, 0]: 0.0 Prediction for [0, 1, 1, 0, 0, 0, 1, 1]: 0.9969831815053549 Prediction for [0, 1, 1, 0, 0, 1, 0, 0]: 0.0 Prediction for [0, 1, 1, 0, 0, 1, 0, 1]: 0.0 Prediction for [0, 1, 1, 0, 0, 1, 1, 0]: 1.0109661178659124 Prediction for [0, 1, 1, 0, 0, 1, 1, 1]: 0.0 Prediction for [0, 1, 1, 0, 1, 0, 0, 0]: 3.412585478788088E-4 Prediction for [0, 1, 1, 0, 1, 0, 0, 1]: 1.0048969950754518 Prediction for [0, 1, 1, 0, 1, 0, 1, 0]: 0.0 Prediction for [0, 1, 1, 0, 1, 0, 1, 1]: 0.0 Prediction for [0, 1, 1, 0, 1, 1, 0, 0]: 1.0021185883167973 Prediction for [0, 1, 1, 0, 1, 1, 0, 1]: 0.0 Prediction for [0, 1, 1, 0, 1, 1, 1, 0]: 0.0 Prediction for [0, 1, 1, 0, 1, 1, 1, 1]: 0.9933752855728635 Prediction for [0, 1, 1, 1, 0, 0, 0, 0]: 0.0 Prediction for [0, 1, 1, 1, 0, 0, 0, 1]: 0.0 Prediction for [0, 1, 1, 1, 0, 0, 1, 0]: 1.0282356842581613 Prediction for [0, 1, 1, 1, 0, 0, 1, 1]: 0.0 Prediction for [0, 1, 1, 1, 0, 1, 0, 0]: 0.005941201595739631 Prediction for [0, 1, 1, 1, 0, 1, 0, 1]: 0.99620809778544 Prediction for [0, 1, 1, 1, 0, 1, 1, 0]: 0.0 Prediction for [0, 1, 1, 1, 0, 1, 1, 1]: 0.0 Prediction for [0, 1, 1, 1, 1, 0, 0, 0]: 0.8931867967531621 Prediction for [0, 1, 1, 1, 1, 0, 0, 1]: 0.0 Prediction for [0, 1, 1, 1, 1, 0, 1, 0]: 0.0 Prediction for [0, 1, 1, 1, 1, 0, 1, 1]: 1.0150169212393112 Prediction for [0, 1, 1, 1, 1, 1, 0, 0]: 0.0 Prediction for [0, 1, 1, 1, 1, 1, 0, 1]: 0.0 Prediction for [0, 1, 1, 1, 1, 1, 1, 0]: 0.9625024391184702 Prediction for [0, 1, 1, 1, 1, 1, 1, 1]: 0.0 Prediction for [1, 0, 0, 0, 0, 0, 0, 0]: 0.001812562085037328 Prediction for [1, 0, 0, 0, 0, 0, 0, 1]: 1.0075820389166497 Prediction for [1, 0, 0, 0, 0, 0, 1, 0]: 0.0 Prediction for [1, 0, 0, 0, 0, 0, 1, 1]: 0.0021364805521089103 Prediction for [1, 0, 0, 0, 0, 1, 0, 0]: 1.0029599045528612 Prediction for [1, 0, 0, 0, 0, 1, 0, 1]: 0.0 Prediction for [1, 0, 0, 0, 0, 1, 1, 0]: 0.0 Prediction for [1, 0, 0, 0, 0, 1, 1, 1]: 0.9904451241415937 Prediction for [1, 0, 0, 0, 1, 0, 0, 0]: 0.0037297400166580452 Prediction for [1, 0, 0, 0, 1, 0, 0, 1]: 0.0 Prediction for [1, 0, 0, 0, 1, 0, 1, 0]: 0.9868293608071959 Prediction for [1, 0, 0, 0, 1, 0, 1, 1]: 0.0 Prediction for [1, 0, 0, 0, 1, 1, 0, 0]: 0.0 Prediction for [1, 0, 0, 0, 1, 1, 0, 1]: 1.0005750703927658 Prediction for [1, 0, 0, 0, 1, 1, 1, 0]: 0.0 Prediction for [1, 0, 0, 0, 1, 1, 1, 1]: 0.0 Prediction for [1, 0, 0, 1, 0, 0, 0, 0]: 0.978185223696475 Prediction for [1, 0, 0, 1, 0, 0, 0, 1]: 0.0 Prediction for [1, 0, 0, 1, 0, 0, 1, 0]: 0.0 Prediction for [1, 0, 0, 1, 0, 0, 1, 1]: 0.996672418245852 Prediction for [1, 0, 0, 1, 1, 0, 0, 0]: 0.0 Prediction for [1, 0, 0, 1, 1, 0, 0, 1]: 1.0098078328385265 Prediction for [1, 0, 0, 1, 1, 0, 1, 0]: 0.02614965193375296 Prediction for [1, 0, 0, 1, 1, 0, 1, 1]: 0.0 Prediction for [1, 0, 0, 1, 1, 1, 0, 0]: 1.021506800445949 Prediction for [1, 0, 0, 1, 1, 1, 0, 1]: 0.0 Prediction for [1, 0, 0, 1, 1, 1, 1, 0]: 0.0 Prediction for [1, 0, 0, 1, 1, 1, 1, 1]: 0.9905850685320421 Prediction for [1, 0, 1, 0, 0, 0, 0, 0]: 0.0 Prediction for [1, 0, 1, 0, 0, 0, 0, 1]: 0.026291252638558138 Prediction for [1, 0, 1, 0, 0, 0, 1, 0]: 0.9941147588590282 Prediction for [1, 0, 1, 0, 0, 0, 1, 1]: 0.0 Prediction for [1, 0, 1, 0, 0, 1, 0, 0]: 0.0 Prediction for [1, 0, 1, 0, 0, 1, 0, 1]: 1.009095066550013 Prediction for [1, 0, 1, 0, 0, 1, 1, 0]: 0.0 Prediction for [1, 0, 1, 0, 0, 1, 1, 1]: 0.0 Prediction for [1, 0, 1, 0, 1, 0, 0, 0]: 0.9663028405728395 Prediction for [1, 0, 1, 0, 1, 0, 0, 1]: 0.0 Prediction for [1, 0, 1, 0, 1, 0, 1, 0]: 0.02919126024439267 Prediction for [1, 0, 1, 0, 1, 0, 1, 1]: 0.9847873421545761 Prediction for [1, 0, 1, 0, 1, 1, 0, 0]: 0.0 Prediction for [1, 0, 1, 0, 1, 1, 0, 1]: 0.0 Prediction for [1, 0, 1, 0, 1, 1, 1, 0]: 0.9970769942890474 Prediction for [1, 0, 1, 0, 1, 1, 1, 1]: 0.0 Prediction for [1, 0, 1, 1, 0, 0, 0, 0]: 0.01585487948672304 Prediction for [1, 0, 1, 1, 0, 0, 0, 1]: 0.9825434600642078 Prediction for [1, 0, 1, 1, 0, 0, 1, 0]: 5.733499619120508E-5 Prediction for [1, 0, 1, 1, 0, 0, 1, 1]: 0.0 Prediction for [1, 0, 1, 1, 0, 1, 0, 0]: 0.9745718337150491 Prediction for [1, 0, 1, 1, 0, 1, 0, 1]: 0.0 Prediction for [1, 0, 1, 1, 0, 1, 1, 0]: 0.02243720460008225 Prediction for [1, 0, 1, 1, 0, 1, 1, 1]: 0.9907022446975686 Prediction for [1, 0, 1, 1, 1, 0, 0, 0]: 0.012388250171380122 Prediction for [1, 0, 1, 1, 1, 0, 0, 1]: 0.0 Prediction for [1, 0, 1, 1, 1, 0, 1, 0]: 0.8601439621258544 Prediction for [1, 0, 1, 1, 1, 0, 1, 1]: 0.008443715075368896 Prediction for [1, 0, 1, 1, 1, 1, 0, 0]: 0.00656092875897496 Prediction for [1, 0, 1, 1, 1, 1, 0, 1]: 0.9780745437644223 Prediction for [1, 0, 1, 1, 1, 1, 1, 0]: 0.0 Prediction for [1, 0, 1, 1, 1, 1, 1, 1]: 0.0 Prediction for [1, 1, 0, 0, 0, 0, 0, 0]: 0.970924857927824 Prediction for [1, 1, 0, 0, 0, 0, 0, 1]: 0.0 Prediction for [1, 1, 0, 0, 0, 0, 1, 0]: 0.0 Prediction for [1, 1, 0, 0, 0, 0, 1, 1]: 1.0052769644182953 Prediction for [1, 1, 0, 0, 0, 1, 0, 0]: 0.0 Prediction for [1, 1, 0, 0, 0, 1, 0, 1]: 0.0 Prediction for [1, 1, 0, 0, 0, 1, 1, 0]: 0.9590540526744582 Prediction for [1, 1, 0, 0, 0, 1, 1, 1]: 0.02927320097632702 Prediction for [1, 1, 0, 0, 1, 0, 0, 0]: 0.0 Prediction for [1, 1, 0, 0, 1, 0, 0, 1]: 1.0035538352746003 Prediction for [1, 1, 0, 0, 1, 0, 1, 0]: 0.0 Prediction for [1, 1, 0, 0, 1, 0, 1, 1]: 0.0 Prediction for [1, 1, 0, 0, 1, 1, 0, 0]: 0.9909433633924776 Prediction for [1, 1, 0, 0, 1, 1, 0, 1]: 0.0 Prediction for [1, 1, 0, 0, 1, 1, 1, 0]: 0.0011777992274741855 Prediction for [1, 1, 0, 0, 1, 1, 1, 1]: 0.993085311255697 Prediction for [1, 1, 0, 1, 0, 0, 0, 0]: 0.0 Prediction for [1, 1, 0, 1, 0, 0, 0, 1]: 0.0 Prediction for [1, 1, 0, 1, 0, 0, 1, 0]: 0.9963515065208348 Prediction for [1, 1, 0, 1, 0, 0, 1, 1]: 0.0 Prediction for [1, 1, 0, 1, 0, 1, 0, 0]: 0.0 Prediction for [1, 1, 0, 1, 0, 1, 0, 1]: 0.9877397234933212 Prediction for [1, 1, 0, 1, 0, 1, 1, 0]: 0.0 Prediction for [1, 1, 0, 1, 0, 1, 1, 1]: 0.0 Prediction for [1, 1, 0, 1, 1, 0, 0, 0]: 0.9929770959632833 Prediction for [1, 1, 0, 1, 1, 0, 0, 1]: 0.0 Prediction for [1, 1, 0, 1, 1, 0, 1, 0]: 0.0 Prediction for [1, 1, 0, 1, 1, 0, 1, 1]: 0.9943824528184289 Prediction for [1, 1, 0, 1, 1, 1, 0, 0]: 0.0 Prediction for [1, 1, 0, 1, 1, 1, 0, 1]: 0.0 Prediction for [1, 1, 0, 1, 1, 1, 1, 0]: 0.9861277557175328 Prediction for [1, 1, 0, 1, 1, 1, 1, 1]: 0.0 Prediction for [1, 1, 1, 0, 0, 0, 0, 0]: 0.0 Prediction for [1, 1, 1, 0, 0, 0, 0, 1]: 0.9818293603820227 Prediction for [1, 1, 1, 0, 0, 0, 1, 0]: 0.0 Prediction for [1, 1, 1, 0, 0, 0, 1, 1]: 0.004688849263500661 Prediction for [1, 1, 1, 0, 0, 1, 0, 0]: 1.0032522995944633 Prediction for [1, 1, 1, 0, 0, 1, 0, 1]: 0.0 Prediction for [1, 1, 1, 0, 0, 1, 1, 0]: 0.0 Prediction for [1, 1, 1, 0, 0, 1, 1, 1]: 0.9705504218666294 Prediction for [1, 1, 1, 0, 1, 0, 0, 0]: 0.0 Prediction for [1, 1, 1, 0, 1, 0, 0, 1]: 0.0 Prediction for [1, 1, 1, 0, 1, 0, 1, 0]: 1.0079339023459069 Prediction for [1, 1, 1, 0, 1, 0, 1, 1]: 0.0 Prediction for [1, 1, 1, 0, 1, 1, 0, 0]: 0.0018277217158573222 Prediction for [1, 1, 1, 0, 1, 1, 0, 1]: 0.9965352241074292 Prediction for [1, 1, 1, 0, 1, 1, 1, 0]: 0.0 Prediction for [1, 1, 1, 0, 1, 1, 1, 1]: 0.0 Prediction for [1, 1, 1, 1, 0, 0, 0, 0]: 1.0369556161258267 Prediction for [1, 1, 1, 1, 0, 0, 0, 1]: 0.0 Prediction for [1, 1, 1, 1, 0, 0, 1, 0]: 0.015679304778673853 Prediction for [1, 1, 1, 1, 0, 0, 1, 1]: 0.9786961004714962 Prediction for [1, 1, 1, 1, 0, 1, 0, 0]: 0.0 Prediction for [1, 1, 1, 1, 0, 1, 0, 1]: 0.0 Prediction for [1, 1, 1, 1, 0, 1, 1, 0]: 1.0181741748672017 Prediction for [1, 1, 1, 1, 0, 1, 1, 1]: 0.0 Prediction for [1, 1, 1, 1, 1, 0, 0, 0]: 0.0 Prediction for [1, 1, 1, 1, 1, 0, 0, 1]: 0.9848654370142089 Prediction for [1, 1, 1, 1, 1, 0, 1, 0]: 0.04328380465776327 Prediction for [1, 1, 1, 1, 1, 0, 1, 1]: 0.0 Prediction for [1, 1, 1, 1, 1, 1, 0, 0]: 0.9962928146061278 Prediction for [1, 1, 1, 1, 1, 1, 0, 1]: 0.0 Prediction for [1, 1, 1, 1, 1, 1, 1, 0]: 0.0 Prediction for [1, 1, 1, 1, 1, 1, 1, 1]: 1.0215433789014763 BUILD SUCCESSFUL (total time: 20 seconds)
×
×
  • Create New...