8 Machine Learning JavaScript Frameworks to Explore

DZone 's Guide to

8 Machine Learning JavaScript Frameworks to Explore

In this post, you will learn about different JavaScript framework for machine learning: DeepLearn.js, PropelJS, ML-JS, ConvNetJS, KerasJS, STDLib, Limdu.js, and Brain.js.

· AI Zone ·
Free Resource

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

  • Simple linear regression
  • Multi-variate linear regression
  • Logistic regression
  • Naive Bayesian
  • K-nearest neighbor (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 JavaScript 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 purposes such as training neural networks in the browser, understanding ML models, for education purposes, etc. You can run pre-trained models in inference mode. One can write the code in Typescript (ES6 JavaScript) or ES5 JavaScript. Ypi can get started very quickly by including the following code within a head tag in the HTML file and writing 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 JavaScript library, provides a GPU-backed numpy-like infrastructure for scientific computing. It could be used both for NodeJS apps and in the browser. The following is the setup code for the browser:

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

The following code can be used for a 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 browsers. The ML JS tool can be set up using the 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 the 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 the 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 the 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 the Naive Bayesian classifier:

npm install classifier


In this post, you learned about different JavaScript libraries that can be used for training machine learning models in the browser or the Node.js 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.

ai ,deep learning ,javascript ,machine learning ,neural networks

Published at DZone with permission of Ajitesh Kumar , DZone MVB. See the original article here.

Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}