3 ms·
I wrote the the original machine learning for our company using a fork of brain.js. We launched to 300k+ users the first day with a model training time of under
by poorman 10y ago
I wrote the the original machine learning for our company using a fork of brain.js. We launched to 300k+ users the first day with a model training time of under 10 seconds. I've since re-written our machine learning in Go. For getting something out the door quickly, Javascript is great.
It worked well for us because we had to stream the data into the network for training, --all the training data did not fit into RAM on Heroku's 1G dyno. Node.js does this IO transfer really well. (Full disclosure, I wrote the streaming implementation for brain.js.)
Also, training artificial neural networks is a serial computation for the most part. (Lots of sigmas). There are parallel optimizations you can make but probably won't see the benefits (in terms of training speed) until you have high dimensional data. Doing this sort of thing on a GPU is also orders of magnitude faster.
One thing to note however, if you plan on serving a high number predictions from trained models in Javascript, you will see blocking because each prediction does require a small bit of computation and Javascript / Node.js is single threaded.