An Introduction to Machine Learning with JavaScript

What is Machine Learning?

Where does JS fit in the picture?

Another reason is momentum. Since the most comprehensive, best-maintained machine learning libraries tended to be written in Python, anybody doing machine learning would learn Python, creating a feedback loop. These things are still true, but over the past few years, the situation has gotten much better for JavaScript developers who want to learn machine learning without switching languages.

Perhaps the biggest force in increasing the feasibility of using JS for ML has been the improvements brought by the TensorFlow.js project. Supporting WebGL acceleration, the 1.0.0 version of TensorFlow JS was released in early 2019. Around the same time, support for binding to a C API and leveraging a GPU was added to the node version of the library. These developments, as well as the continued emergence of other libraries for ML with JS, haven’t exactly leveled the playing field with Python, but they have made it much more plausible to seriously engage with ML using JS.

As these libraries and others continue to evolve, and standards like WebGPU continue to move forward, this trend will likely continue. Even if you find you want to build and train a model in Python, it’s possible to convert that to a format that can be used for prediction or even further trained on the web. When no server-side call is required for making a classification, a lot of possibilities open up for using ML to enhance the user experience without increasing server load and without concerns about privacy.

What if I don’t need a neural network?

Conclusion

Many practical use cases may be adequately addressed by these tools as well, particularly if you find yourself in need of a neural network and you’re not trying to teach your computer to drive. However, as you start to deal with larger amounts of data or more particular problem spaces, you may still find yourself pushed towards Python and its more mature ecosystem.

For more information, check out a podcast we did with Charlie Gerard on the extent of machine learning training required for a system to get ‘good’ and how to have fun while programming.

SitePen is a full development team that has extensive experience working with enterprise teams. Feel free to contact us if we can help you out with a project or for more information!

Originally published at https://www.sitepen.com on October 19, 2020.

--

--

Modernizing Apps, Tools & Teams | sitepen.com | Twitter: @sitepen

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store