if the output value is represented as aL and the value of the neuron in the layer preceding this is represented as a(L-1)
and we represent the weight acting on a(L-1) as wL and the bias as bL and have a non-linear function called sigmoidfunction
then aL = sigmoidfunction(wL a(L-1) + bL) and to simplify this we can use zL = wL a(L-1) + bL so we can get:
to ascertain how much a change in the value of wL results in a change in value of the cost, we can use the chain rule in calculus:
now taking the derivative of cost, dCost/daL = 2(aL - y)
and, daL/dzL = derivative of zL
and, dzL/dwL = a(L-1)
thus dCost/dwL = 2(aL - y) * derivative of zL * a(L-1)
when there are additional neural layers, this needs to be expanded to add each layer effect
likewise when there are more than one neuron in each layer, this needs to be applied to each neuron in the layer PLUS add weight effects for how a neuron in one layer effects EACH neuron in the next layer, and then the cost is the sum of all the individual neuron costs
and the model then needs to obtain these for each training example and average them to come up with an average cost when using those weights and biases
a simple model may have over 10,000 weights and biases to assess
backpropagation uses the above concept to go backwards through each layer to ascertain delta cost to ascertain the minima of the cost function
AI_gradient_descent is the iterative process of ascertaining the change in cost with a change in a weight to calculate the change vector (a mvertical matrix of all the weights and bias delta cost values) to find the negative gradient and then change the weights in that direction preferentially targeting those weights which have the greatest effect (ie. delta colst value) and then to speed up the process of converging on this minima
-