Complete the code to calculate the error between predicted and actual output.
error = predicted - [1]The error is the difference between the predicted value and the actual value.
Complete the code to compute the gradient of the loss with respect to weights.
gradient = error * [1]The gradient is calculated by multiplying the error by the input to the neuron.
Fix the error in updating the weights using gradient descent.
weights = weights - [1] * gradientWeights are updated by subtracting the learning rate times the gradient.
Fill both blanks to calculate the derivative of the sigmoid activation function.
sigmoid_derivative = [1] * (1 - [2])
The derivative of sigmoid is sigmoid_output times (1 minus sigmoid_output).
Fill all three blanks to update bias using gradient descent.
bias = bias - [1] * [2] * [3]
Bias update uses learning rate times error times 1 (since bias input is always 1).
