Introduced in 2012, TypeScript is said to be the typed superset of JavaScript which helps in overcoming the limitations of JavaScript in large scale applications. The language has been gaining popularity because of its advantages and features, for instance, support for classes and modules, ES6 features, type-checking, and many more.

In this article, we list down 5 machine learning libraries which are written in this language.

(The list is in no particular order)

1| Machinelearn.js

Machinelearn.js is a machine learning library which is written in Typescript. The library resolves the issues of the complexities in machine learning through web technologies. This library is similar to Scikit Learn and it features both supervised and unsupervised models which include Random Forest, PCA, KMeans, Decision Tree, Naive Bayes, etc. 


You can set up Node.js environment and the installation can be done using either npm or yarn

For npm:  npm install –save machinelearn

For yarn: yarn add machinelearn

Click here to install.

2| TensorFlow Deep Playground

TensorFlow Deep Playground is an interactive visualisation of neural networks which is written in TypeScript using d3.js. The main goal of this framework is to make neural network more accessible as well as easier to learn. To run the visualisation locally, you have to run

Click here to install.

3| R.js

R.js is a machine learning library which includes packages of R language re-written in typescript for browsers. In this library, almost all the important components of R language have been ported into TypeScript language and it currently includes a total of 8 repositories. Binary Linear Algebra Subprograms (BLAS) is a linear algebra specification numerical library has been written completely into TypeScript. In fact, many numerical software applications use BLAS computations, including Armadillo, LAPACK, LINPACK, GNU Octave, Mathematica, MATLAB, NumPy, R, and Julia.

Click here to install.

4| Machine-learning

The machine-learning library is written in TypeScript which has a dependency on the nblas package for creating fast matrix operations. This library is in an early development phase and was last committed in 2017. It works by default on OSX and in Windows you may need  to install LAPACK, while in Linux you have to run: apt-get install libblas-dev.


The library can be installed via npm, type

npm i machine-learning 

Click here to install.

5| ML Classifier UI

ML Classifier is a machine learning engine written in TypeScript. This library can be used for training image classification models in your browser while consuming a shorter period of time. ML Classifier is a React front end for a machine learning engine for training the machine learning models. 


The library can be installed via npm or yarn:

For npm: npm install ml-classifier-ui

For yarn: yarn add ml-classifier-ui.

Click here to install.