diff --git a/sam-neurons-words.js b/sam-neurons-words.js index 1cf623a..39c909c 100644 --- a/sam-neurons-words.js +++ b/sam-neurons-words.js @@ -94,13 +94,16 @@ class NeuralNetwork { // Example usage: // Example dataset (XOR problem) -let strings = ["hello", "neural", "world"] +let strings = ["hello", "neural", "world", "how are", "you", "?"] let inputs = [ - [0, 0, 0], - [1, 0, 0], - [1, 0, 1], - [1, 1, 1] + [0, 0, 0, 0, 0 ,0], + [1, 0, 0, 0, 0, 0], + [1, 0, 1, 0, 0, 0], + [1, 1, 1, 0, 0, 0], + [1, 1, 1, 0, 1, 0], + [1, 1, 1, 0, 1, 1], + [1, 1, 1, 1, 1, 1] ]; let nn = new NeuralNetwork(strings.length, inputs.length, 1); // Increased hidden nodes to 4 @@ -109,7 +112,10 @@ let targets = [ [0], [1], [2], - [3] + [3], + [4], + [5], + [6] ]; if (targets.length != inputs.length) {