Artificial neural networks for dummies.

Artificial neural networks may sound like a very complex concept (which it kind of is), but they are far from impossible to understand.

In fact, the idea behind them is very intuitive, and if you put enough attention to this article, I'll guide you through a basic explanation on them, so whenever you hear or read about them again you'll know what they are, (approximately) how they work and what can they be used for-which as you'll see, is virtually anything you want.


The person who wrote this article is not an expert, therefore this text may contain several serious mistakes.

Please, do not use this text as a reliable information source for any academic work -nor any other kind of serious research task.

Also, if you're reading this and notice any mistakes, please let me know via e-mail (

1.What the heck are artificial neural networks?

Artificial neural networks, (ANNs, for short) are computing systems (systems of one or more computers and associated software with common storage) programmed in such a way that they are able to detect patterns -vaguely resembling the how a biological brain works.

That property of being able to "see" patterns makes them a very powerful tool: if they detect patterns they can associate concepts (which is the base of human thinking and information management), which makes them able to predict phenomena, identify elements, recognize and classify images, sounds and many other things.

From identifying illnesses at early stages to predicting divorce cases, there are tons and tons of different applications to machine learning.

Note: If you already know javascript and want to develop your own projects related to this topic, you can find a series of tutorials here.

The clue is to give the machine enough time, power, cases to study (a.k.a. training set) and obviously enough parameters. For example, it won't be able to predict Kepler's laws of planetary motion if you only give it daily information on the style and the color of the US' president underwear and the distance of the different planets to the Sun throughout the year, because it won't have access to the parameters it needs (no matter how many planets you tell your machine about); however, the machine might be able to find some curious patterns, if there are any.

2.How do they work?

You could think about machine learning algorithms like a "black box", with a hole that you put information into (which we'll call inputs) on one side and another hole that we will get information from (which we'll call outputs) on the other side. Inside that box there is something mysterious that they call "hidden layers", which I'll tell you more about later.

This box is a very special object because of its contents: it is a teachable machine, which means that you can make it learn to give specific outputs to given inputs.

The input information is set up in tensors, which are geometric objects that describe scalars, vectors, matrices, etc. (which is the reason why we use libraries such as "TensorFlow.JS").

So, what the black box does is to give an output to every input value, by analyzing and operating with values of the information received with other values called "weights", which define the importance of any given parameter in every possible layer-to-layer relationship. Every "hiden layer" that lays inside the black box(get it? a layer that lays? okay, I better stop it) analyzes some information coming from the previous layer, giving it a weight.