DEV Community

Salvietta150x40
Salvietta150x40

Posted on • Originally published at ma-no.org on

Is JavaScript good for machine learning?

TypeScript: Is JavaScript good for machine learning?

One of the things you always hear when you are talking to someone related to the M.L. world is that, one must learn Python because the vast majority of the major libraries are in that technology. You're probably right, but I chose JavaScript as the metal of my sword and decided to find out a bit about this statement and write a bit about it in case you ever wondered about it too.

Can I do Machine Learning with JavaScript ?

The short answer is yes.

You don't have to be a genius to know that if Google is working on https://js.tensorflow.org/, which is one of the most popular AI libraries in the industry, it's because they've already looked at the benefits and disadvantages of using JavaScript over Python.
But the purpose is to explore a little more about the current state of Machine Learning with JavaScript.

But what is Machine Learning?
To answer this you can read my previous post.

Some things that are said about JavaScript and the M.L.

  • Javascript is slow.
  • Handling Matrices is difficult with JavaScript.
  • Python got all the major libraries.

Let's analyze these statements one by one.

JavaScript is slow.
Short answer: It depends.
First we have to understand that JavaScript can run both in a browser (Client) which its CPU and memory capacity will be variable and can run in the Server with something called Node.js in which we will have a computer with the capabilities we have chosen in our Server.

The second thing is that a developer without a deep understanding of JavaScript in both design and architecture and best practices can create something of poor performance in any technology. You can find good performance concepts in these technologies in this JavaScript link in the Client and in this JavaScript link in the Server.

Read all

Top comments (1)

Collapse
 
shadowtime2000 profile image
shadowtime2000

There are some libraries for neuro-evolution and machine learning such as @liquidcarrot/carrot, synaptic, or neatapic, so it is not completely unsupported