Neural Networks In JavaScript With Brain.js
Written by Nikos Vaggalis   
Friday, 11 January 2019

A fun and practical introduction to the underpinnings of AI. 

Working with AI is increasingly easier thanks to new and versatile libraries which encapsulate all the logic so you don't have to, to the extent that your AI skills are worth less than you think:

As exciting as the progress is, it’s bad news for both companies and individuals who have invested heavily in AI skills. Today, they give you a solid competitive advantage, as training a competent ML engineer requires plenty of time spent reading papers, and a solid math background to start with. However, as the tools get better, this won’t be the case anymore. It’ll become more about reading tutorials than scientific papers. If you don’t realize your advantage soon, a band of interns with a library may eat your lunch.

 

 

The truth is that it is the combination of those great libraries AND great tutorials that gives that competitive edge. Speaking of which, this one "Neural networks in JavaScript" with Brain.js by Robert Plummer on Scrimba fits the bill. It has 19 short focused and practical videos which make the acquaintance with neural networks very pleasant experience, in contrast to ones wanting you buried underneath a ton of mathematics.

Here's an overview of its contents:

1.Introduction
Provides a high level overview of the concepts.

2. Our first neural net!
Starting out with a very simple neural net; one layer of input, one layer of output and three hidden layers in between, each one consisting of 2 neurons. The input data are just combinations of bits 0 and 1 while the output is their XORed combination.You then let the network train through a few thousand of iterations until it learns how to XOR by itself.

3. How do they learn? Propagation
Propagation and BackPropagation made as simple as posting a question on Reddit's "Explain Like I'm Five" forum.

4. How do they learn? Part 2 — Structure
Inputs and outputs and activation functions.

5. How do they learn? Part 3 — Layers
The heart of the class, the lodown on layers

6. Working with objects & 7. Learning more than numbers
Neurons typically work on numbers. But that's not always the case, as these chapters demonstrate working with Objects
and other values

8. Counting with neural nets
Feed the network a range o values like 1,2,3,4 and watch it guess the next value in line, that is 5.

9. Stock market prediction - Normalization & 10. Stock market prediction — Predict next & 11. Stock market prediction — Predict next 3 steps
Applying neurons to forecasting stock prices in the future

12. Recurrent neural networks learn math
This is totally impressive.Give the network '0+0=0' , '0+1=1'...'1+2=3'...'3+2=5'... and it learns to do addition! Way cooler than REPL!

13. Lo-fi number detection
Image recognition or in this case recognizing numbers made from ASCII art.

14. Writing a children's book with a recurrent net
AI in storytelling. Feed a recurrent network a few sentences and let it mix and match to create new ones!

15. Sentiment detection
Yet another demonstration of recurrent networks, this time on sentiment analysis, or deriving sentiment from plain sentences.

16. Recurrent neural networks with … inputs? outputs? How?
Going behind the scenes of how a recurrent network works and how it transforms the input data.

17. Simple reinforcement learning
Yet again, a term and notion difficult to grasp, explained in lay man's terms, using once more the XOR example.

18. Building a recommendation engine
An all-time classic.What Amazon etc use to recommend stuff to potential buyers that are related to their preferences.

19. Closing thoughts

The closing thoughts are that Brain.js is a great library and this is a great tutorial. Even if you don't want to code, you ought to watch it if you are interested in gaining a good encyclopedic overview of how neural networks function in a way that is practical and very easy to understand.


Did I mention that it's free too? Highly recommended.

 

More Information

Neural networks in JavaScript with Brain.js

 

Related Articles

 aijs.rocks - JavaScript Enabled AI

Deep Angel-The AI of Future Media Manipulation

Visual Search Adopted by eBay 

 

 

To be informed about new articles on I Programmer, sign up for our weekly newsletter, subscribe to the RSS feed and follow us on Twitter, Facebook or Linkedin.

 

Banner


Second Gen Robot Dog On Kickstarter
15/09/2024

We covered Mini-Pupper's launch back in 2021 and now there is an even better, second generation, of this low-cost and capable quadruped robot. If you want to see what AI can bring to a small robot, th [ ... ]



TypeScript 5.6 Tightens Truthy And Nullish Checks
16/09/2024

TypeScript 5.6 has been released. The update has better handling of truthy and nullish checks and new iterator helper methods.


More News

 

kotlin book

 

Comments




or email your comment to: comments@i-programmer.info

Last Updated ( Friday, 11 January 2019 )