brain.js

Machine Learning : Tensorflow v/s Tensorflow.js v/s Brain.js [closed]

早过忘川 提交于 2020-06-24 08:02:24
问题 Closed . This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed 2 years ago . Improve this question I've recently started coding with Machine learning techniques and had been going back and forth between Machine learning implemented in different platforms. The frameworks i worked a lot with were Tensorflow (Python), Tensorflow.js and Brain.js . And i've got

Resuming training on a Brain.js Neural Network Model

老子叫甜甜 提交于 2020-02-02 11:58:05
问题 I am looking to incrementally train a neural net using Brain.js, but can't find a solution using the current version. There is a similar answer to this same problem but it uses a deprecated function parameter keepNetworkIntact . How is this done? 回答1: You simply need to import the json into the neural network, and continue training: const net = new brain.NeuralNetwork(); net.fromJSON(json); net.train(trainingData, trainingOptions); The feature was deprecated because we only want to keep the

Use brain.js neural network to do text analysis

让人想犯罪 __ 提交于 2020-01-12 02:19:27
问题 I'm trying to do some text analysis to determine if a given string is... talking about politics. I'm thinking I could create a neural network where the input is either a string or a list of words (ordering might matter?) and the output is whether the string is about politics. However the brain.js library only takes inputs of a number between 0 and 1 or an array of numbers between 0 and 1. How can I coerce my data in such a way that I can achieve the task? 回答1: new brain.recurrent.LSTM(); this

Training brain.js multiple times?

大兔子大兔子 提交于 2019-12-23 03:34:18
问题 How can I train new information(Only the new information,not everything again, since it would cost too much performance) to my neural network made with brain.js after the first training? 回答1: Its a little rough but you could achieve that using this structure: if we join 2 training data sets, old with new one and then retrain with keepNetworkIntact: true then our NN will be retrained much much faster than as if we retrain it from scratch. let net = new brain.NeuralNetwork(); // pre-training

brain.js correct training of the neuralNetwork

百般思念 提交于 2019-12-21 20:54:11
问题 I must clearly have misunderstood something in the brain.js instructions on training I played around with this repl.it code const brain = require('brain.js'); const network = new brain.NeuralNetwork(); network.train([ { input: { doseA: 0 }, output: { indicatorA: 0 } }, { input: { doseA: 0.1 }, output: { indicatorA: 0.02 } }, { input: { doseA: 0.2 }, output: { indicatorA: 0.04 } }, { input: { doseA: 0.3 }, output: { indicatorA: 0.06 } }, { input: { doseA: 0.4 }, output: { indicatorA: 0.08 } },

How to take the data?

﹥>﹥吖頭↗ 提交于 2019-12-13 16:05:12
问题 I am learning to use neural networks, and have encountered a problem. I can not figure out how to convert data for a neural network. As I understand it, I need to normalize the data, after normalization and learning, the answer is always averaged. https://jsfiddle.net/eoy7krzj/ <html> <head> <script src="https://cdn.rawgit.com/BrainJS/brain.js/5797b875/browser.js"></script> </head> <body> <div> <button onclick="train()">train</button><button onclick="Generate.next(); Generate.draw();"

brain.js correct training of the neuralNetwork

扶醉桌前 提交于 2019-12-05 19:55:27
I must clearly have misunderstood something in the brain.js instructions on training I played around with this repl.it code const brain = require('brain.js'); const network = new brain.NeuralNetwork(); network.train([ { input: { doseA: 0 }, output: { indicatorA: 0 } }, { input: { doseA: 0.1 }, output: { indicatorA: 0.02 } }, { input: { doseA: 0.2 }, output: { indicatorA: 0.04 } }, { input: { doseA: 0.3 }, output: { indicatorA: 0.06 } }, { input: { doseA: 0.4 }, output: { indicatorA: 0.08 } }, { input: { doseA: 0.5 }, output: { indicatorA: 0.10 } }, { input: { doseA: 0.6 }, output: { indicatorA

Use brain.js neural network to do text analysis

青春壹個敷衍的年華 提交于 2019-12-03 03:03:45
I'm trying to do some text analysis to determine if a given string is... talking about politics. I'm thinking I could create a neural network where the input is either a string or a list of words (ordering might matter?) and the output is whether the string is about politics. However the brain.js library only takes inputs of a number between 0 and 1 or an array of numbers between 0 and 1. How can I coerce my data in such a way that I can achieve the task? new brain.recurrent.LSTM(); this does the trick for you. Example, var brain = require('brain.js') var net = new brain.recurrent.LSTM(); net