4 ms·
To those wondering why someone would want ML in JS, there are loads of reasons. For starters, node.js, which makes most of the arguments regarding server/clien
by morganherlocker 13y ago
To those wondering why someone would want ML in JS, there are loads of reasons.
For starters, node.js, which makes most of the arguments regarding server/client moot.
Secondly, there are many client side applications for these types of algorithms as well. K-means clustering, for example, is already used by many mapping libraries to group together large numbers of points[1].
I personally use neural networks and affinity propagation in many of my applications for predictive analysis. This does not have to only be educational, or of a 'toy' nature.
[1] http://danzel.github.io/Leaflet.markercluster/example/marker-clustering-realworld.388.html http://danzel.github.io/Leaflet.markercluster/example/marker...
- nashequilibrium 13y agoNodejs is for i/o, i know it has workarounds for long running tasks(threadpool) but it does not excell at that. Training your model, updating your model, validation, matrix factorization on large datasets etc, i just don't see how Javascript helps here. Maybe just taking the http request and dumping it onto a rabbitmq queue to to classify something but you still have a whole host of other stuff to deal with.
- thrush 13y agoI think they are making the argument for capability rather than best of class. This is really exciting for Javascript and NodeJS devs right now because of the "Give me an inch and I'll take a foot" mentality.
- morganherlocker 13y ago> Nodejs is for i/o Node is a general purpose language that can be used for all kinds of things. I switched from Python to node.js about a year ago for exactly the sort of tasks you are describing and could not be happier. Right off the bat I had huge speed improvements. Also, io is one of the biggest issues with web based data analysis, so it really should not be underestimated. I can do more with less with node than I could with Python. This is especially true with long running tasks where a 1 minute processing time vs a 20 minute processing time might mean you need 1/20th the number of servers in a cluster ($$$). Of course, this could be a pretty good argument for something even faster/lower level, but for me, node.js struck a good balance between performance and ease of development/ecosystem. As usual, YMMV. One last point. The language you choose cannot always be the best language for every task you need. Typically you choose a stack based on the most common/important tasks in your infrastructure, then for less common tasks you just make it work with what the chosen language provides. In this case node.js does not need to be the best solution for ML, it just needs to check the box for being possible, so that devs who needed node.js for other reasons now have the ability to add ML to their toolbox.
- kimmel 13y ago> Node is a general purpose language that can be used for all kinds of things. Node is a library that can be used for all kinds of things. FTFY
- morganherlocker 13y agoFair enough, it is not a language, but I would not call it a library either. Perhaps a platform?[1] It contains many libraries, but also has a cli tool, packages a runtime, a debugger, and even includes a package manager. It contains the sorts of things that would be packaged when you install languages like Python or Ruby. [1] http://nodejs.org/ http://nodejs.org/