A Prelude to Data Science & Machine Learning with Javascript
Photo by Leon on Unsplash

A Prelude to Data Science & Machine Learning with Javascript

In this article, I will give you a classical introduction to JavaScript libraries for data science and machine learning, data visualization, deep learning, natural language processing and computer vision. I will point you to good materials to get started with using Javascript for data science.

WHAT YOU WILL LEARN:

  • Why Javascript for Machine learning & its future.
  • Procedures to learn machine learning with javascript.
  • Javascript Libraries for Machine Learning and Data Science.
  • Javascript Libraries for Data visualization.
  • Javascript Libraries for Deep Learning.
  • Javascript Libraries for Computer Vision & Natural Language processing.

Why use JavaScript for machine learning?

JavaScript makes machine learning accessible to web and front-end developers. Javascript library makes it possible to define, test, and run ML models in web browsers. JS has the largest community of developers of all languages, which makes it easier to find the right team to work on your project.?

Traditionally, JavaScript is not commonly used in machine learning for several reasons, including limited library support and implementation complexities.

Nonetheless, JavaScript has gained popularity recently, mainly because of the extensive opportunities available in deploying machine learning applications entirely on the client side.

Web applications are the future of creating smart, innovative, modern and future-ready solutions for businesses to captivate customers’ attention and interest. JavaScript is one of the leading programming languages used by most app developers for creating web applications. Hence integrating machine learning capabilities in JavaScript is the sure way of getting your web applications future-ready and competent in this intense competition-driven market.

Presently as we speak python is more popular and used but I think Javascript will be a competitive language to use for machine learning in the future because of its popularity for building web and mobile apps with versatile libraries like Reactjs, Nodejs, React Native and so on.

Let me drop my intake, Python is currently the lead programming language for machine learning but let’s lookout for how javascript will fast track the integration of machine learning with software as its popularity grows for machine and deep learning.

I think introducing javascript to machine learning will spike the interest of front end &?backend developers, software engineers to collaborate in building lots of ML/DL applications.

Procedures to learn machine learning with javascript:

  • Official Documentation- Software documentation is written text or illustration that accompanies computer software or is embedded in the source code. The documentation either explains how the software operates or how to use it and may mean different things to people in different roles.
  • Massive Open Online Courses (MOOCs) are free online courses available for anyone to enrol. MOOCs provide an affordable and flexible way to learn new skills, advance your career and deliver quality educational experiences at scale.
  • Check code samples, build projects share them with the public get feedback and keep improving.

This is why In this article I will be sharing the following to make you get a good grasp of machine learning with javascript.

  • Link to the official documentation of libraries?
  • Github repository
  • Free courses/articles that will get you started.

Note: Make research also by building projects, building projects is one of the best ways to understand concepts.

Learn wide and go deep.

Javascript Libraries for Machine Learning and Data Science

Machine learning (ML) is?the subset of artificial intelligence (AI)?that focuses on building systems that learn—or improve performance—based on the data they consume. Artificial intelligence is a broad term that refers to systems or machines that mimic human intelligence.

  • Danfo.js

GitHub — https://github.com/opensource9ja/danfojs

Website - https://danfo.jsdata.org/

Tutorial to get started with Danfo.js - https://danfo.jsdata.org/examples/titanic-survival-prediction-using-danfo.js-and-tensorflow.js

Danfo.js was released in August 2020. Danfo.js is to Javascript what Pandas his to Python. Danfo.js is a JavaScript library that is heavily inspired by Python’s Pandas library. It offers a high-performance data structure that is quite intuitive and easy to use. It is built on top of tensorflow.js and hence supports tensor operations out of the box. This library can be quite useful to manipulate data for your machine learning or data science work in JavaScript.

  • Machinelearn.js

Github - https://github.com/machinelearnjs/machinelearnjs

Machinelearn.js is a javascript library for machine learning that targets simplicity for people who are not experts. It provides APIs for various machine learning algorithms that can be run on the web browser. Machinelearn.js offers ML algorithm APIs for SVM, Linear Models, Ensemble models, Decision Trees, clustering to name a few along with utilities for feature extraction, preprocessing, and model selection.

Javascript Libraries for Data Visualization

  • D3.js

Github - https://github.com/d3/d3

Official website - https://d3js.org/

Tutorial to get you started - https://youtu.be/_8V5o2UHG0E

D3.js is a very flexible data viz library that follows a data-driven approach to DOM manipulation. It helps bring data to life using HTML, SVG, and CSS. It emphasizes web standards and has full support for all modern browsers.

D3 also works well in areas of animations, data analysis, hierarchical data, and interaction — in fact, D3 is renowned for animation and interaction.

  • Toast UI Chart

Github - https://github.com/nhn/tui.chart

Website - https://ui.toast.com/tui-chart/

Toast UI Chart is intuitive and easy to use. It’s also worth noting that it integrates well with today’s two most popular open-source front-end libs/frameworks: React and Vue.js.

Toast UI Chart is a beautiful statistical data visualization library. Like Highcharts, Toast UI Chart also offers substantial support for legacy browsers. As a result, it guarantees an identical look across all browsers. It also draws fast with impressive performance and requires no polyfills.

  • Chart.js

Github - https://github.com/chartjs/Chart.js

Website - https://www.chartjs.org/

Tutorial to get you started - https://youtu.be/sE08f4iuOhA

Chart.js is quite easy to use and also very customizable. It’s also open-source, with extensive documentation maintained by open-source developers and over eight chart types, including built-in chart types.

?

JAVASCRIPT LIBRARY FOR DEEP LEARNING

  • Tensorflow.js

GitHub https://github.com/tensorflow/tensorflow

Website - https://www.tensorflow.org/

Tutorial to get you started - https://youtu.be/tPYj3fFJGjk

Tensorflow is an end-to-end open-source machine learning platform and a JavaScript library for training and deploying deep learning models in the browser and NodeJS. This Deep learning JavaScript Library aims to create machine learning models for mobile, desktop, cloud and web easier for beginners and experts.

?It offers the following interesting pre-trained models –

  • Image Classification
  • Object Detection
  • Body Segmentation
  • Pose Estimation
  • Text Toxicity Detection
  • Universal Sentence Encoder
  • Speech Command Recognition
  • KNN Classifier
  • Simple Face Detection
  • Semantic Segmentation
  • Face Landmark Detection
  • Hand Pose Detection
  • Natural Language Question Answering


  • ML5.JS

Github - https://github.com/ml5js/ml5-library

Website - https://ml5js.org/

Tutorial to get you started with Ml5.js - https://youtu.be/jmznx0Q1fP0

ML5.js is an open-source Javascript library for machine learning built on top of Tensorflow.js with support for GPU acceleration. Google Education Grant actually funded this project.

it comes with many pre-trained models for detecting human poses, generating text, styling an image with another, composing music, pitch detection, and common English language word relationships, and so on.

  • Brain.js

Github - https://github.com/BrainJS/brain.js

Website - https://brain.js.org/

Tutorial to get started - https://youtu.be/6E6XecoTRVo

Brain.js is an open-source JavaScript library for neural networks with support for GPU acceleration. It exposes various APIs to help you create and train neural networks by abstracting you from underlying complexities. But you do not have the flexibility to experiment with your own architectures apart from what Brain.js offers you. At the time of writing this, it supports the following neural network types and their variations out-of-box –

  • Feed-forward Neural Network (with and without GPU)
  • Recurrent Neural Network
  • Long Short Term Memory

There are many machine learning development companies that are using this library for the easy execution of their projects.

Deeplearn.js

Github - https://github.com/tambien/deeplearnjs

It is a hardware-accelerated and open-source JS-based library for deep learning models development. Initially created by the Brain PAIR team of Google, this JavaScript library helps to generate intuitive, deep learning tools for the web browser. In addition to this, this library also allows a researcher to train the neural networks in a browser.

?

Javascript Libraries for Natural Language Processing

Natural language processing (NLP) is?the ability of a computer program to understand human language as it is spoken?and written -- referred to as natural language. It is a component of artificial intelligence (AI).

Libraries

  1. Natural
  2. Nlp.js
  3. Compromise.js
  4. Neuro.js

  • Natural

Github - https://github.com/NaturalNode/natural

Tutorial to get you started - https://youtu.be/X15wjox816c

Natural is a natural language processing JavaScript library for node.js that offers a wide range of NLP operations. You can carry out basic to advanced NLP operations like tokenization, stemming, tf-idf, pos tagging, sentiment analysis, spellchecks etc. Another interesting thing about Natural is its integration with Wordnet but it is just in the experimentation phase.

  • NLP.js

Github - https://github.com/axa-group/nlp.js

NLP.js is a full-fledged natural language processing library in Javascript with support for node.js. In this library, you can find advanced NLP functions for entity extraction, NLU, Microsoft bot framework, sentiment analysis, etc.

NLP.js is a perfect node.js library for building chatbots. Documentation is very clear, and usage is very easy.

  • Compromise.js

Github: https://github.com/spencermountain/compromise/

Tutorial to get you started - https://youtu.be/tk_JGu2AbJY

Compromise is a Javascript library for Natural Language Processing that can do some really cool stuff in your browser. It provides a long and impressive list of APIs to do basic and advanced NLP operations parsing, tokenization, case conversion, part of speech tagging, sorting, splitting, etc.

  • Neuro.js

Github - https://github.com/janhuenermann/neurojs

Website - https://neuro.js.org/

Tutorial to get you started - https://neuro.js.org/learn/#introduction

Neuro.js is a JavaScript framework for Natural language processing that is focused on building AI assistants and chatbots. Its standout features include multi-label classification, real-time classification, and online learning. Besides the core capabilities, it also offers feature engineering functionalities to help you build robust modes.


Javascript Libraries for Computer Vision

Computer vision is a field of artificial intelligence (AI) that enables computers and systems to derive meaningful information from digital images, videos and other visual inputs — and take actions or make recommendations based on that information. If AI enables computers to think, computer vision enables them to see, observe and understand.

  • OpenCV.js

Github - https://github.com/ucisysarch/opencvjs

Tutorial to get you started - https://youtu.be/-E8pdgsZ-ds

OpenCV.js is a javascript library for computer vision that is based on the popular OpenCV framework. It supports only limited modules of the Python version of OpenCV. The supported modules include –

  • Core
  • Image processing
  • Photo
  • Shape
  • Video
  • Object detection
  • Features framework
  • Image codecs


  • WebGazer.js

Github - https://github.com/brownhci/WebGazer

Tutorial to get you started - https://youtu.be/Wh77ZGdIaZQ

WebGazer.js is a simple eye-tracking Javascript library that uses the webcam to infer the eye gazing of the visitors. It can be integrated easily with any website and runs purely in the user’s browser hence no data is sent back to the server.

WebGazer.js can help track user’s attention on the website and provide user experience accordingly. Its real-time gaze prediction is compatible with all major browsers.?

  • Face-api.js

Github - https://github.com/justadudewhohacks/face-api.js/

Tutorials to get you started - https://youtu.be/CVClHLwv-4I

Face-api.js is a JavaScript API for face recognition built on top of tensorflow.js that is compatible with the node.js and browser. Beyond regular facial recognition, it offers other capabilities as well like Face Similarity, Face Expression Recognition, Face Landmark detection, Realtime Face Tracking.

  • Pico.js?

Github - https://github.com/nenadmarkus/picojs

Pico.js is a face detection JavaScript library that can detect faces in real-time within a streaming video from the webcam. Although there are similar APIs for face detection, the creator of Pico.js Nenad Markus has focused on keeping it lightweight with just 200 lines of code that is 2KB when minified.

Conclusion

JavaScript is emerging as one of the most prominent languages used with subjects like deep learning and machine learning. Since JS is one of the most popular base programming languages, it brings incredible convenience for developers to work with algorithms and develop new solutions for many challenges.


?

?

Really gained a lot.....thanks for sharing this

David Oyelade

Full Stack Software Engineer (Web, Mobile, 3D) @ Razorlabs | LinkedIn Top Voice Data & Web | Data Scientist | Certified Digital Marketer

3 年

Can't wait to check this out! Thanks for sharing ??

Busuyi Adebayo, PhD

Model-Based Drug Discovery & Development | Bio/Chemical & Biological Process Digital Twin Development: Mechanistic, Empirical (AI, ML, DL) & Hybrid Modeling for Design, Monitoring, Prediction, Optimization & Control

3 年

What an awesome piece!

Maybell Obadoni

Technical Writer | Software Developer | AI Enthusiast

3 年

A lot revealed her though... Gift Ojeabulu?Thanks for sharing

要查看或添加评论,请登录

社区洞察

其他会员也浏览了