Created
March 12, 2019 10:17
-
-
Save erickedji/e78c3a806a1ff09f43d80cc297119be6 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const { loadOrTrain } = require("./utils") | |
const brain = require("brain.js") | |
const trainingData = require("./selectra-phone-dataset-numbers-only-normalized.json"); | |
const net = new brain.NeuralNetwork({ hiddenLayers: [3] }); | |
const stats = net.train(trainingData); | |
// const stats = loadOrTrain(net, trainingData); | |
console.log(stats); | |
let sampleInput = {"Processeur":0.5,"Mémoire vive (RAM)":0.5,"Mémoire interne":0.25,"Poids":0.7178217821782178,"Appareil photo frontal":0.3125,"Autonomie":0.6944444444444444,"Écran":0.43243243243243246} | |
console.log(net.run(sampleInput)); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment