We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9cf354d commit 1d74270Copy full SHA for 1d74270
examples/recommendation-engine/index.html
@@ -39,17 +39,17 @@
39
40
function nextTry(rating){
41
document.getElementById('result').innerHTML = '';
42
-
+
43
+ if(undefined !== ratingItem){
44
+ trainingData.push({ input: ratingItem.trainingInformation, output: { wanted: rating / 4 } });
45
+ }
46
47
const network = new brain.NeuralNetwork({
48
activation: 'sigmoid',
49
hiddenLayers: [4]
50
});
51
network.train(trainingData);
- if(undefined !== ratingItem){
- trainingData.push({ input: ratingItem.trainingInformation, output: { wanted: rating / 4 } });
- }
52
53
let suggestionItemsText = '';
54
let suggestionItems = [];
55
for(i=0;i<itemsInStock.length;i++){
0 commit comments