Change a data point and see the prediction change instantly. Ideal for testing small-scale AI logic.
): Use the activation function to introduce non-linearity. In modern Excel, you can write this cleanly using the MAX function across your spilled array: =MAP(Z1_Spill_Range, LAMBDA(x, MAX(0, x))) Use code with caution. Calculate Output Layer ( Z2cap Z sub 2 A2cap A sub 2 ): Multiply the activated hidden layer ( A1cap A sub 1
Then, we can calculate the output layer output:
A basic neural network structure typically involves an input layer, hidden layers (optional for simple tasks), and an output layer. 1. Define Your Activation Function function to define your activation. For example, a function can be defined in the Excel Name Manager =LAMBDA(x, 1/(1+EXP(-x))) 2. Initialize Weights and Biases In a new sheet, use SEQUENCE() to generate a matrix of small random weights. Training a Neural Network in a Spreadsheet
Now, use the outputs of the hidden layer to calculate the final prediction. In cell (Output Sum), enter: =(M2*$I$2)+(O2*$I$3)+$J$2 In cell Q2 (Final Prediction Ŷcap Y hat ), enter: =1/(1+EXP(-P2)) 📉 Step 3: Calculate the Error (Loss)
Highlight all weights and biases: $B$3:$C$5, $B$7:$C$7, $B$10:$B$11, $B$13 .
You can map out iterations using Excel's built-in feature (found under Data > What-If Analysis) to copy the row updates down thousands of times without writing code. Option B: Use Office Scripts or VBA