ML libraries in JavaScript

You come from a JavaScript background and don't want to go through all the Python related setup to get going with some machine learning? Check out libraries for JavaScript, there are a few!

📄 Table of contents

“Enjoyment appears at the boundary between boredom and anxiety, when the challenges are just balanced with the person's capacity to act.” ― Mihaly Csikszentmihalyi

Machine learning tools JavaScript by mljs

On Github

This library is a compilation of the tools developed in the mljs organization. It is mainly maintained for use in the browser.

Covered tools:

  • Unsupervised learning
  • Supervised learning
  • Artificial neural networks (ANN)
  • Regression
  • Optimization
  • Math
  • Statistics
  • Data preprocessing
  • Utilities like
    • Bit array operations
    • Hash table
    • Pad array
    • Binary search
    • Number comparison functions for sorting

Actively maintained and a wide variety of features! Well done!

Machine Learning by junku901

On Github

Covered features:

  • Logistic Regression
  • MLP (Multi-Layer Perceptron)
  • SVM (Support Vector Machine)
  • KNN (K-nearest neighbors)
  • K-means clustering
  • 3 Optimization Algorithms (Hill-Climbing, Simulated Annealing, Genetic - Algorithm)
  • Decision Tree
  • NMF (non-negative matrix factorization)

It also offers an incredible browser demo here: http://joonku.com/project/machine_learning

Unfortunately it doesn't seem to be maintained :(

However, great job!

Convnetjs by karpathy

On Github

Covered features:

  • Common Neural Network modules (fully connected layers, non-linearities)
  • Classification (SVM/Softmax) and Regression (L2) cost functions
  • Ability to specify and train Convolutional Networks that process images
  • An experimental Reinforcement Learning module, based on Deep Q Learning

It also offers an incredible browser demo here: http://cs.stanford.edu/people/karpathy/convnetjs/index.html

Unfortunately it is not maintained :( But nevertheless a great package for learning and playing around.

Synaptic by cazala

On Github

A architecture-free neural network library for node.js and the browser

Covered features:

  • Neurons = synaptic.Neuron
  • Layers = synaptic.Layer
  • Networks = synaptic.Network
  • Trainers = synaptic.Trainer
  • Architects = synaptic.Architect

It also offers an incredible browser demo here: http://caza.la/synaptic/#/

and a great starting guide: https://github.com/cazala/synaptic/wiki/Neural-Networks-101

Not only is it currently maintained, but also evolving to a next release. Great package for getting started with neural networks! Well done!

Mind by stevenmiller888

On Github

A flexible neural network library for Node.js and the browser.

Covered features:

  • Vectorized - uses a matrix implementation to process training data
  • Configurable - allows you to customize the network topology
  • Pluggable - download/upload minds that have already learned

It also offers an incredible browser demo here: http://stevenmiller888.github.io/mindjs.net/

and a great starting guide: http://stevenmiller888.github.io/mind-how-to-build-a-neural-network/

Another awesome package for neural networks! Well done!

Thanks for reading my article! Feel free to leave any feedback!

Cover photo: Photo by Daniele Levis Pelusi on Unsplash - https://unsplash.com/photos/aRf1hjEHlhA

Learn Something New Everyday,
Connect With The Best Developers!

Sign Up Now!

& 500k+ others use Hashnode actively.

Comments (4)

Calvin Koepke's photo

It's awesome to be able to stay in the same language, but isn't JS poorly suited for ML? I always figured Python was the way to go because it's basically made for something as intensive as ML...

Show +1 replies
Daniel Deutsch's photo

Aspiring Web Developer with Business Law Background. Pushing the limits to make the world a better place. Open for Projects of any kind.

Hi Calvin Koepke ! Great question! There are various discussions on the web about this topic.

Here is another great article that got me going: hackernoon.com/machine-learning-with-javasc..

I think to start in ML you can use whatever language you like. The problems that arise in ML are mostly language agnostic and as I figured out, the difference between the languages are minimal. I simply don't want to copy python code when most of the time I am working with JS. I will reconsider my findings when I reach the limitations of JS, but for now I am far from it :)

Calvin Koepke's photo

Software developer.

Great answer, thanks!