Python has long been the dominant language for training and using machine learning models, but things are changing.
“We are bringing machine learning tools into the JavaScript ecosystem,” said Laurie Lay, senior software engineer at Ippon Technologies. “Doing so will make this technology accessible to the JavaScript community, the largest and most active developer community in the world.”
At this year’s devmio International JavaScript Conference, Lay demoed five open source JavaScript libraries currently available to front-end and web developers who want to get serious about machine learning. Lay specializes in full-stack development and is part of Ippon Technology’s AI Center of Excellence.
These five libraries provide JavaScript developers with a way to start using machine learning and working with models in JavaScript, she said.
1.danfo.js
Pandas in Python can clean, transform, and structure data, Ray said. Pandas is basically a Python wrapper around C that makes data manipulation very easy.
The JavaScript ecosystem includes: Danfo.jsThis is “heavily inspired by pandas,” she said. She outlined what Danfo.js offers:
- Data manipulation and processing.
- Preparing and cleaning data before training the model.
- Easy data wrangling integrated with APIs like Pandas, TensorFlow.js.
“JavaScript introduces data frames and series data structures, which are used to process relational and labeled data,” she said. “Danfo.js is about understanding what’s happening in your data. [if] Any deviations or outliers require you to go back and correct them. ”
There are also VS Code extensions, she added.
2. Nature Library
nature library Ray said it’s a lightweight tool for natural language processing. She said the Nature Library offers:
- Natural language processing (NLP). Things like tokenization, splitting text into words, or stemming, which breaks down words into their root forms.
- A simple API for tokenization, stemming, classification, and sentiment analysis.
- Fast and effective text-based ML tasks.
3. Synapse
synapse A JavaScript library for building neural networks.
“This is what I was saying is it’s a little bit easier to build a neural network within JavaScript because you don’t need another language like Python,” Ray said. “Synaptic neural networks are very easy to set up.”
Ray’s slides showed that Synaptic is used for:
- Neural network.
- It is architecture-free, highly modular, and supports complex network types. and
- I’m experimenting with a custom neural network architecture.
4. TensorFlow.js
TensorFlow.js is an open source JavaScript library that allows developers to use and build ML models directly within a web browser or Node.js environment.
“When you need to perform complex tasks like image or audio classification, you can take advantage of TensorFlow.js’ powerful pre-trained models,” says Lay. “This is the undisputed heavyweight champion of production-grade deep learning.”
TensorFlow.js is used for:
- General purpose and deep learning.
- A large ecosystem of pre-trained models, accelerated by powerful GPUs. and
- Intensive model training, deep learning, and image/audio tasks.
5. Scikit.js
Scikit.js Used for predictive data analysis and machine learning. According to the npm notes, it aims to be a TypeScript port of the scikit-learn python library.
“Finally, if you want to leverage classic machine learning algorithms familiar from the Python machine learning ecosystem, or if you are familiar with Python’s scikit-learn API, you may want to choose something like Scikit.js, which is a near-identical API,” says Lay.
Use Scikit.js to:
- Traditional ML models.
- Familiar scikit-learn API, a wide range of classic algorithms.
- Developers migrating from scikit-learn in Python.
“These tools are available now,” Ray said. “The community is growing, and the best way to take advantage of it is to choose one of our libraries, find the data set you’re interested in, and start building. Because as JavaScript developers, we can shape the future of an intelligent, data-driven web.”
P.S.: As Lay’s colleague at Ippon Technologies, Julian Wikison-Duran, shared at the same conference, there is a sixth option for working with machine learning models in the browser. For more information, see JavaScript libraries run machine learning models in the browser.
YouTube.COM/THENEWSTACK
Technology moves fast, so don’t miss an episode. Subscribe to our YouTube channel to stream all our podcasts, interviews, demos, and more.
Subscribe
