ML

How a Neural Network Makes a Prediction

Follow the calculation from a single input to the output layer.

From one input to many

A neuron multiplies its input by a weight and adds a bias. For bike demand, a model might use several features, such as temperature, hour, and humidity.

y = wx + b
Weighted sum of n features plus a bias

Hidden layer

With n input features and m hidden neurons, the first layer uses an m by n weight matrix. Each row holds the weights of one neuron.

z equals W superscript (1) times x plus b superscript (1)
See the individual neuron equations
Weighted sum for hidden neuron 1
Weighted sum for hidden neuron 2
Weighted sum for hidden neuron 3
Weighted sum for hidden neuron 4
Weighted sum for hidden neuron 5
Ellipsis
Weighted sum for hidden neuron m

Activation and output

Sigmoid and ReLU are two activation functions. The slide applies sigmoid element by element to z to obtain a. The input layer supplies features, the hidden layer transforms them, and the output layer produces the prediction.

Sigmoid formula
ReLU of x equals max of zero and x
a equals sigmoid of z
Prediction equation from the slide
Build a network →

Source: Neural Networks Bike Demand, v3. Equation images and diagrams are reproduced from the PowerPoint.