AI: the layers
In the basic model architecture the AI is made up of layers. There are three types of layers but most models may have many more than that. The three layers are the input layer, the hidden layer and the output layer.
Each layer has one or more nodes (usually many), these nodes do two things they add up the inputs into the node and use something called an activation function to pass on to the nodes in the next layer.
Every node in a layer is connected to every node in the next layer and so on from the input layer, through the hidden layer(s) to the output layer. These connections (sometimes called edges) have weights. These are initially just a random number between 0 and 1.
There is only one input layer and one output layer but there can be many hidden layers. The layers don’t have to be the same size, they can have as many nodes as you want. So there is a great flexibility in how many hidden nodes you have and how many nodes on each of these hidden nodes.
The input layer is fixed depending on what are the inputs, these could be how many bedrooms and bathrooms a house has and the output is also fixed by what is the outcome which could be the price.
So imagine that you collected lots of data about the housing market including price and you fed the data in and the AI could predict how much a house should cost if it hasn’t been valued yet. You may think that it doesn’t need something as elaborate as an AI but if you add in 20 features about a house then it will get complex very quickly.
You may be wondering how many hidden layers you would need and how many nodes you would need. The thing is there is no set way of doing this. You might be tempted to have many hidden layers with many nodes because a bigger brain is better than a smaller brain.
It may surprise you that the bigger the neural network (for that is what it is) the worse it performs. It will also take much longer and you may not want to sit around waiting for it to finish.
The best way to find out is to practice and play with different types of architecture. The shape is only one thing you can vary. There are many other parameters we haven’t mentioned yet with which you can fiddle with. It is a matter of trial and error and after a while you will get a sense of what is appropriate, certainly in the initial stages.