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

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

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

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

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.

ml.js

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.


Comments