{
const net = new brain.NeuralNetwork();
const trainingData = [
{
input: {
workout1Distance: 1,
workout2Distance: .8,
},
output: {
similarity: 1
}
}, {
input: {
workout1Distance: .5,
workout2Distance: 1,
},
output: {
similarity: 0
}
}
];
net.train(trainingData, { log: true });
console.log(net.run({ workout1Distance: 1, workout2Distance: .8 }));
console.log(net.run({ workout1Distance: .5, workout2Distance: 1 }));
console.log(net.run({ workout1Distance: .5, workout2Distance: .5 }));
}