8 Machine Learning Javascript Frameworks to Explore


Javascript developers tend to look out for Javascript frameworks which can be used to train machine learning models based on different machine learning algorithms. The following are some of the machine learning algorithms using which models can be trained using different javascript frameworks listed in this article:

  • Simple linear regression
  • Multi-variate linrear regression
  • Logistic regression
  • Naive-bayesian
  • K-nearest neighbour (KNN)
  • K-means
  • Support vector machine (SVM)
  • Random forest
  • Decision tree
  • Feedforward neural network
  • Deep learning network

In this post, you will learn about different Javascsript framework for machine learning. They are some of the following:


Deeplearn.js is an open-source machine learning Javascript library by Google which can be used for different purpose such as as training neural networks in browser, understanding ML models, for education purpose etc. You can run pre-trained models in inference mode. One can write the code in Typescript (ES6 Javascript) or ES5 Javascript. One can get started very quickly by including following code within head tag in HTML file and write JS programs for building the model.

<script src="https://cdn.jsdelivr.net/npm/deeplearn@latest"></script>
<!-- or -->
<script src="https://unpkg.com/deeplearn@latest"></script>


Propel, a Javascrupt library, provides a GPU-backed numpy-like infrastructure for scientific computing. It could be used for both, NodeJS app as well as in browser. The following is the setup code for browser:

<script src="https://unpkg.com/propel@3.1.0"></script>

The following code can be used for NodeJS app:

npm install propel
import { grad } from "propel";

Here is the documentation for PropelJS (Propel Doc). Here is the Github page for Propel


ML-JS provides machine learning tools for working with NodeJS and browser. The ML JS tool can be setup using following code:

<script src="https://www.lactame.com/lib/ml/2.2.0/ml.min.js"></script>

The following machine learning algorithms are supported:


ConvNetJS is a Javascript library for training Deep Learning models (Neural Networks) entirely in your browser. This library can also be used in NodeJS app.

In order to get started, get the minified version of ConvNetJS from this page, ConvNetJS minified library. This is a release page for ConvNetJS.

<script src="convnet-min.js"></script>

The following are some important pages:


With KerasJS, you can run Keras models in the browser, with GPU support using WebGL. Models can also be run in Node.js, but only in CPU mode. Here is the Github page on Keras. The following is the list of Keras models which can be run in the browser:

  • 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 a Javascript library which can be used to build advanced statistical models and machine learning libraries. It can also be used for plotting and graphics functionality for data visualization and exploratory data analysis.

The following is a list of libraries in relation to ML:

  • Linear regression via Stochastic gradient descent (@stdlib/ml/online-sgd-regression)
  • Binary classification via Stochastic gradient descent (@stdlib/ml/online-binary-classification)
  • Natural language processing (@stdlib/nlp)


Limdu.js is a machine-learning framework for Node.js. It supports some of the following:

  • Binary classification
  • Multi-label classification
  • Feature engineering
  • SVM

One can go about installing limdu.js using following command:

npm install limdu


Brain.js is a set of Javascript libraries for training neural networks and Naive-bayesian classifier. The following can be used to setup Brain.js:

npm install brain.js

One can also include the library in browser using the following code:

<script src="https://raw.githubusercontent.com/harthur-org/brain.js/master/browser.js"></script>

The following can be used to install Naive-bayesian classifier:

npm install classifier


In this post, you learned about different Javascript library which can be used for training machine learning models in Browser or Nodejs app. For articles on machine learning, we recommend you check out our machine learning archives.

Did you find this article useful? Do you have any questions or suggestions about this article in relation to Javascript frameworks for machine learning? Leave a comment and ask your questions and I shall do my best to address your queries.

Ajitesh Kumar

Ajitesh Kumar

Ajitesh is passionate about various different technologies including programming languages such as Java/JEE, Javascript, PHP, C/C++, mobile programming languages etc, and, computing fundamentals related with cloud-native technologies, application security, cloud computing platforms, mobile apps, big data etc.

He has also authored the book, Building Web Apps with Spring 5 and Angular.
Ajitesh Kumar

Leave A Reply

Time limit is exhausted. Please reload the CAPTCHA.