A Prelude to Data Science & Machine Learning with Javascript
Gift Ojeabulu
Data Scientist | AI/ML Dev Advocate ?? | AI/ML/SWE Community Builder & Manager| 3x AWS Community Builder (Machine Learning)
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 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:
This is why In this article I will be sharing the following to make you get a good grasp of machine learning with javascript.
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.
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 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
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.
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.
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
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 –
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.
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 –
There are many machine learning development companies that are using this library for the easy execution of their projects.
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
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.
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.
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.
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.
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 –
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.?
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.
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.
?
?
Software Engineer
3 年Really gained a lot.....thanks for sharing this
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 ??
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!
Technical Writer | Software Developer | AI Enthusiast
3 年A lot revealed her though... Gift Ojeabulu?Thanks for sharing