A hidden layer sits between a neural network’s inputs and outputs. It is “hidden” because people provide inputs and see predictions, but do not directly observe the intermediate values. Each node combines its inputs using weights, then applies an activation function. The resulting values pass to the next layer. section 9.3 section 9.23
Estimating a collision
Imagine predicting whether a car collision will occur from speed, terrain quality, degree of vision, and driving experience. First, scale the four inputs. Then each hidden node calculates a weighted sum and applies an activation function such as sigmoid. One node might give terrain and vision stronger weights than speed and experience, making it especially responsive to their relationship. Finally, the output node combines the hidden nodes’ results to produce a prediction. The nodes work together; none needs to make the whole decision alone. section 9.3 section 9.4
Figure 9.12 Example of a hidden node comparing terrain quality and degree of vision
See how stronger connections can make one hidden node respond chiefly to terrain quality and degree of vision. section 9.3
The calculation need not run node by node. Put the four inputs in a vector and the weights for five hidden nodes in a 4 × 5 matrix. One matrix multiplication gives all five weighted sums; applying the activation function gives the layer’s output. A learning-oriented Python implementation expresses this as `hidden = sigmoid(np.dot(inputs, input_weights))`, then passes `hidden` through another weighted, activated layer. section 9.21 section 9.4
More hidden layers can capture higher-level relationships and more complex classification boundaries, but there is no universally ideal count of layers or nodes. Choose an architecture by considering the data and testing changes. During training, backpropagation traces how weights inside hidden layers affect the prediction and its error, so those weights can be adjusted. section 9.13 section 9.26







