Need help with machinelearnjs?
Click the “chat” button below for chat support from the developer who created it, or find similar developers for support.

About the developer

504 Stars 51 Forks MIT License 805 Commits 49 Opened issues


Machine Learning library for the web and Node.

Services available


Need anything else?

Contributors list


machinelearn.js is a Machine Learning library written in Typescript. It solves Machine Learning problems and teaches users how Machine Learning algorithms work.

Build Status Build status FOSSA Status Slack ZenHub

User Installation

Using yarn

$ yarn add machinelearn

Using NPM

$ npm install --save machinelearn

On the browsers

We use jsdeliver to distribute browser version of machinelearn.js

Please see for more details.


By default, machinelearning.js will use pure Javascript version of tfjs. To enable acceleration through C++ binding or GPU, you must import

for C++ or
for GPU.
  1. C++
  • installation
yarn add machinelearn-node
  • activation
import 'machinelearn-node';
  1. GPU
  • installation
yarn add machinelearn-gpu
  • activation
import 'machinelearn-gpu';


  • Machine Learning on the browser and Node.js
  • Learning APIs for users
  • Low entry barrier


We welcome new contributors of all level of experience. The development guide will be added to assist new contributors to easily join the project.

  • You want to participate in a Machine Learning project, which will boost your Machine Learning skills and knowledge
  • Looking to be part of a growing community
  • You want to learn Machine Learning
  • You like Typescript :heart: Machine Learning


machinelearn.js provides a simple and consistent set of APIs to interact with the models and algorithms. For example, all models have follow APIs:

  • fit
    for training
  • predict
    for inferencing
  • toJSON
    for saving the model's state
  • fromJSON
    for loading the model from the checkpoint


Testing ensures you that you are currently using the most stable version of machinelearn.js

$ npm run test


Simply give us a :star2: by clicking on


We simply follow "fork-and-pull" workflow of Github. Please read for more detail.

Further notice

Great references that helped building this project!



Thanks goes to these wonderful people (emoji key):

Jason Shin

📝 🐛 💻 📖 ⚠️ |

💬 🤔 📢 |
Oleg Stotsky

🐛 💻 📖 ⚠️ |

💬 🎨 📢 🐛 💻 |
Christoph Reinbothe

💻 🤔 🚇 👀 |
Adam King

💻 ⚠️ 📖 | | :---: | :---: | :---: | :---: | :---: | :---: |

We use cookies. If you continue to browse the site, you agree to the use of cookies. For more information on our use of cookies please see our Privacy Policy.