Skip to main content

Machine Learning Libraries for JavaScript - 2019

Photo by Franck V. on Unsplash
Machine learning has seen enormous growth in recent years. It is actively transforming every industry all around us. From autonomous vehicles to chess players, a simple path following robots to Sophia and from recognizing horrible handwritten text to extremely intelligent new Google Assistant, Machine Learning is everywhere. Thanks to Big Data, high power CPUs, giant GPUs and of course to researchers who brought ML from something to everything. For raising reality straight out of a fantasy (sounds filmic. Doesn't it?). Thanks for saving us from the thing that most of the real human being hate. I'm talking about the holy MATHS. Ok, enough.

The blessed and the noble human (researchers and innovators) are working hard to come up with more accurate and efficient techniques which work in a constrained environment. One of the major efforts of ML & JS communities is to let us implement ML in JavaScript using JavaScript machine learning libraries. If you are a JavaScript Ninja and want to dive into machine learning or you are a machine learning expert and have a strong desire to try out JavaScript, we present here some JavaScript libraries which you may find interesting. The libraries are listed irrespective of any rating or importance or anything. Choose on your personal preference.


Brain.js is an open source library developed for Neural Networks. Creating neural nets and training them is a math-intensive job which requires a lot of work even if you are a math genius. Brain.js simplifies the entire process by limiting the API to just a few function calls. All you need is to just install the library and start using it. The library can be used with Node.js as well as in the browser. It can train neural net models asynchronously and also supports streams, Ellman networks and blocked recurrent network devices as well.


TensorFlow.js is a JavaScript version of papular machine learning library, TensorFlow developed and supported by Google. It provides easy to use API to create, train and implement different machine learning modules. It allows you to train a new neural network or retrain an existing neural net without leaving the browser. If you love Keras and want to try out TensorFlow, try TensorFlow.js Layers API and you will feel comfortable. And above all, it has a comprehensive tutorial set which will help you get started with no or little trouble. Check out the official tutorials here.


Keras.js is also an open source framework for implementing machine learning models in web browsers. Both Keras.js and TensorFlow.js have many things in common, such as both provide GPU support using WebGL and provide a high-level API which hides abstractions provided by backend frameworks. Keras.js can be used with Node.js too but only in CPU mode. 
The library officially offers a rich set of demos, written in Vuejs. Check out the following cool list of examples:
  • Basic Convnet for MNIST
  • Convolutional Variational Autoencoder, trained on MNIST
  • Auxiliary Classifier Generative Adversarial Networks (AC-GAN) on MNIST
  • 50-layer Residual Network, trained on ImageNet
  • Inception v3, trained on ImageNet
  • DenseNet-121, trained on ImageNet
  • SqueezeNet v1.1, trained on ImageNet
  • Bidirectional LSTM for IMDB sentiment classification


STDLib is open source JavaScript libraries which provide a robust set of mathematical and statistical functions which can help you to create high-performance machine learning models and other libraries as well.
The library is equipped with data visualization tools to help its users to analyze their data and get a better understanding. In order to perceive meaningful insights from data in a more manageable way, the library offers utility functions which are used to group, filter, map and transform data even in browsers as well as on servers. To get a quick review of the library, go to the documentation page here. Although the given list of categories over there has some design issues and looks pretty boring but the detail pages are very user-friendly and informative.


If you are looking for a complete package of tools for JavaScript/Node.js either for math work or machine learning job, ml.js is for you. It is a set of open-source tools for numerical analysis and machine learning. I would say ml.js is a swiss army knife for The JavaScript developers. It provides you with utility tools for data manipulation and libraries for running different machine learning models on browsers and of course on Node.js environment. The package offers a separate library for neural nets, KNN, K-means clustering, Naive Bayes, and regression and decision tree and random forest and PCA and ... Go to the docs, please.


Popular posts from this blog

How Big Data Analytics Can Help You Improve And Grow Your Business?

Big Data Analytics There are certain problems that can only solve through big data. Here we discuss the field big data as "Big Data Analytics". The big data came into the picture we never thought how commodity hardware is used to store and manage the data which is reliable and feasible as compared to the costly sources. Now let us discuss a few examples of how big data analytics is useful nowadays. When you go to websites like Amazon, Youtube, Netflix, and any other websites actually they will provide some field in which recommend some product, videos, movies, and some songs for you. What do you think about how they do it? Basically what kind of data they generated on these kind websites. They make sure to analyze properly. The data generated is not small it is actually big data. Now they analysis these big data they make sure whatever you like and whatever you are the preferences accordingly they generate recommendations for you. If you go to Youtube you have noticed it kn…

How Computers Understand Human Language?

How Computers Understand Human Language? Natural languages are the languages that we speak and understand, containing large diverse vocabulary. Various words have several different meanings, speakers with different accents and all sorts of interesting word play. But for the most part human can roll right through these challenges. The skillful use of language is a major part what makes us human and for this reason the desire for computers that understand or speak human language has been around since they were first conceived. This led to the creation of natural language processing or NLP.
Natural Language Processing is a disciplinary field combining computer science and linguistics. There is an infinite number of ways to arrange words in a sentence. We can't give computers a dictionary of all possible sentences to help them understand what humans are blabbing on about. So, an early and fundamental NLP problem was deconstructing sentences into small pieces which could be more easily…

The Limits of Artificial Intelligence

If you are here, it means that you are familiar with term artificial intelligence. Either you have read about it in school or have seen it in sci-fi movies or somewhere else. Talking about the limitations of AI, let me ask you one simple question first, do you know the definition of AI? You might be thinking to answer me with a yes, yes I know what is artificial intelligence. But what if I tell you that AI is a buzzword and it is almost impossible to properly define. It is this way because the definition of artificial intelligence is moving. People don’t call the things AI that they used to call. For example, a problem that seemed too complex to be solved by human and was solved by AI algorithm is no longer a problem of AI. Playing chess, is one of the examples. It was considered the peek level of artificial intelligence back in previous century. Now it hardly fits the criteria for AI. It is presented to the world as a super power that when given to a computer, it magically starts li…